b Riding East: December 2007

Wednesday, December 12, 2007

Chuck Engine Piece

I'm building out my Chuck toolbox. Recall Chuck is a Strongly-timed, Concurrent, and On-the-fly Audio Programming Language developed by Ge Wang and friends over at Princeton.

I think I may have the necessary tools for the engine fugue I contemplate. I now have a proof of concept for the piece. The building blocks for my fugue include:

- Creation of a metrical framework to allow all parts to highlight and modulate a given meter and phrase rhythm. In the attached example, I use a 'bar' of 2.5 seconds (just modify the 'bar' variable to change the meter). All drones and other sound sources are strict multiples of this bar. Of course the bar may briefly expand or contract, etc., but also by a relationship of this bar.

- Creation of complex metrical drones from concrete sounds. These drones will conform to the bar structure, and will echo or reverb as a multiple of the bar. All drones in this sample come from 'engines', including a lawnmower, hairdryer, hedgetrimmer, mixer, xBox360, and leafblower.

- Warping. This is the term I use to describe an iterative linear transformation of a sound source. In the case of the drones, a typical warp function varies the gain with the radius of a two pole filter. Variations of warping include oscillations, where a given drone will warp(x,y) and then warp(y,x) over a given time interval, T (which will always be a function of the bar length).

- Creation of a new panning class and four-channel (soon eight) sound. This new class allows me to write sophisticated multi-channel output from chuck. This class allows me to 'place' a sound source anywhere in a 'room', and can pan that sound location realtime. In the sample attached, you'll notice my lawnmower drone comes from the back-left and moves to the middle of the room before returning. Later, the mixer drone literally circles the room. Etc.

- And of course, Multi-Channel PanWarp. The concept of warping is applied in panning. Via sporking, the effects of Warping and PanWarping are combined with synchronized time intervals.

- Two Chuck instruments that I modified, including the TubeBells and StifKarp. With the TubeBells, I modify speed and depth as a f(sin(T)). This, in effect, modulates the bell, emphasizing a different sets of overtones. With the StifKarp, I've built 'slide', 'trill', and dynamice 'phrase generation' functions, allowing a linear warp of struck partial-tones between two pitches.

Here are example chuck programs that do 4, 8, 16, & 18 channel sound with panning:

Chuck 4-channel panning example (square)
Chuck 8-channel panning example (rectangle)
Chuck 16-channel panning example (sphere)
Chuck 18-channel panning example (sphere)

Here is the Chuck example program (about 1K lines of code):

Chuck Engine Example
Zip of data files for engine program (put in data/ directory)

Note that unless your machine and soundcard have serious horsepower, you should run the Chuck Engine program from your commandline with the -s option to generate the wave files.

Here are the four channel wave files output from this example:

Front Left
Front Right
Back Right
Back Left

Stereo version (not the same!):

Stereo MP3

Happy Chucking!