A Csound Sample Rush

A buttery smooth sample roll (or snare rush, or a particular kind of stutter edit, or that thing when a sample repeats faster and faster until it turns into a pitched, buzzy sound) is a beautiful thing.

Dealing with tempo operations or painstaking MIDI placement using a DAW in order to achieve this sort of effect is a real pain, though. So I’ve used Csound to build a sample roller. Csound’s sample accuracy and concise orchestra syntax made it a reasonable tool for the job. In some ways, Csound’s enormous limitations as a language posed some challenges (the control flow syntax is particularly verbose and frustrating), but you can, in general, do quite lot with very little code and it all sounds very good.

I use Csound’s high-precision looping sample player, lposcil3, to playback the sample in loop mode. The basic idea is to increase the rate at which the sample is played by modifying the “end loop point” over time using a variety of k-rate signals. At the moment, there are 4 signal options for the ramp shape, but I have plans to add more options to this aspect of the instrument, including random scaling of several varities (the sorts that I previously implemented in a Max external), periodic scaling, and using other samples to scale the signal. I’d also love to add optional fades on the loop region in order to reduce pointy edges in the resulting roll.