Archive for Generative Music

ChucK: Initial Impressions

I’ve been intrigued recently by a newer sound programming language, ChucK. I originally heard about it via an NPR piece on the Princeton Laptop Orchestra (PLOrk), which is just a cool idea in and of itself.

ChucK is, thankfully, being developed for all 3 major platforms, and there are versions of its smaller IDE, MiniAudicle, available for Linux, OS X, and Windows. Its development community is quite active, and the documentation is substantial without being overly-technical. ChucK’s concept and approach is not entirely dissimilar from that of SuperCollider. Though it is still in heavy, early development, and certain language features are broken or as-yet-unimplemented, I see a great deal of promise here. The code is released under the GPL, boding well for its ongoing development and expansion. There is a GUI control (sliders and such) package, but this only works on OS X.

I found that MiniAudicle was extremely easy to use and understand, with a crisp, simple interface. Language syntax is, to my eyes, straightforward and clear. I was modifying sample code within minutes, toying around for some time before even beginning to read its excellent documentation.

Other resources:

I tried to compile MiniAudicle on Ubuntu Intrepid, but this yielded only a slew of cryptic error messages. On, the other hand, there’s a working command-line-only ChucK package compiled for Jack in the repositories, so it’s no great loss.

I’ve been working on a ChucK class to generate chord progressions based on a flowchart. One attractive thing about the platform is that its midi out facilities could let me feed this kind of robo-improvisation to a VST host or Reason instrument. Or, I could use its synthesis engine and feed this to effects, via Jack.

When I reach a point at which I think the code might be of use for others, I’ll likely release this under the Creative Commons. Stay tuned.

An adventure in Wubi

I’ve been learning ActionScript 3 lately. It looks like Flash 10 (Astro)will have some interesting new support for doing sound synthesis that should be an improvement over the current hacks using the BitmapData class, so I’ll be on the lookout for that. At this point, I haven’t had a lot of time to work on any generative music algorithms in Flash, but I’m hoping that will change soon.

It seems that the wikified documentation for Pd objects that I posted about long ago, Pdpedia, may have never gotten very far off the ground. I believe I stumbled across it months ago, but now I can elicit nothing but an error from the staging server. Maybe this is a temporary situation. If you know otherwise, feel free to enlighten me.

I’ve been wanting to install Linux for some time, especially since I was a bit frustrated with the incomplete state of the SuperCollider port for Windows (Psycollider). I also just enjoy playing with Linux; I keep a headless web dev sever running Debian, but I have used Linux little on the desktop, at least for the last several years. The problem was that I had no free partitions on my desktop’s HD, and I didn’t want to resize any existing NTFS partitions. Then I found Wubi, which will install Ubuntu using a file on a Windows drive as its filesystem. This was remarkably easy, once I downloaded the Ubuntu ISO for the amd64 platform and dropped it in the same folder as the Wubi installer.

Once I had Ubuntu configured reasonably well, I started installing packages from the Ubuntu Studio project.

I’m still waiting for that to download and install, but I found that there is a port of the SuperCollider server for AMD64 in the form of a debian package. I have a wedding to attend today, but I’ll be installing that tonight. Hopefully I can get all the bells and whistles working, and perhaps play with puredata, Chuck, or Csound, too.

Generative Chord Explorer

One of the ideas I would like to implement is as follows.

The user would hold down a key on their MIDI keyboard (or possibly input a note in some other fashion). The software would choose a scale, possibly from a set constrained by the user. The algorithm would then play chord progressions chosen at random from a generalized chord progression map or flowchart, choosing embellished and inverted chords as well as common triads. These progressions would be simultaneously played through a MIDI instrument or internal synthesizer while being written to a MIDI file for later playback and editing. Meanwhile, the interface would show the user what chord it is playing, and what chords it had recently played, as well as the chosen scale and root note.

In this way, the user could audition a large number of progressions, chords, and scales in hopes of discovering a new basis for a song — whether a long progression or just a few chords that evoked a desired emotion.

The user might also be able to go back and edit which inversion and type of chord were played in a generated sequence, tweaking the temporal order or harmonics used.

I think that this could be realized in Pure Data with a relative minimum of fuss, maybe requiring that an extension be written in C. If I can dig up the code, I wrote a program in C with a subset of this functionality several years ago.

Comment if it sounds like an interesting tool, or if you have any ideas about how to realize this in PD, perhaps with a minimum of external coding.