Y'all know me from the list...
Inspired by Formlet, which does something like formant synthesis by outputting short sinusoidal grains in response to impulses, I thought, what if we replace the sine grains with an arbitrary impulse response? You could do that with TGrains, but as the pitch goes up, so does the number of overlapping grains and CPU use along with it. But, convolution of a chain of impulses should be the same as granular synthesis, if the grain contents are used as the convolution kernel (impulse response). The first example does this with a buffer containing BrownNoise (shaped by a Hanning envelope). The second example adds timbre control by crossfading between three different Convolution2 results. To avoid clicks in the output when crossing buffer boundaries, I had to ensure that even-numbered buffers always go into XFade2's leftmost input and odd ones into the second input. (Note, the second example could be made more efficient/scalable by using just two Convolution2 units, and providing a trigger to the third input whenever its calculated buffer number changes. Exercise for the reader...)
A quick demo of one way to allocate server-side resources (SynthDefs, Buffers) that works in RT/NRT with minimal modification. You'll need Jonatan Liljedahl's ScoreClock quark: // Mac OSX / Linux Quarks.install("ScoreClock"); // Windows, see http://swiki.hfbk-hamburg.de/MusicTechnology/883
A quick and dirty recursive approach to finding valid solutions for a set of constraints by backtracking. The constraints are: Given a set of phrases (defined as Pbinds), randomly string them together so that the total duration is one "bar" (where the bar could have any number of beats, of course -- here it's 9). A phrase can be truncated, but it's not valid to change the duration of a note. That's for the first version of the ~backtracking function. The second version adds one more constraint: the bar must not end with a 16th note. The only difference between the two versions is an additional condition in the 'case' statement, which causes the solution to be rejected if the last duration is 0.25.
I needed to demonstrate the importance of the Nyquist frequency to a class, so I wrote this visual, interactive demonstration. Use the slider at the bottom to set the frequency -- 1.0 corresponds to one cycle shown in the window. Tested with Qt and Swing GUIs. Should work in cocoa, but not tested.