Cyclist is an experiment I made in generating sound by describing samples directly as a function of time. This is easier to demonstrate than to explain.

<video type='video/webm; codecs="vp8.0, vorbis"' src="http://rhydd.org/~daf/misc/cyclist.webm" controls="true" width="640" height="368"

Video of a cyclist session.

Cyclist expressions are composed of simple arithmetical expressions (multiplication, division, addition, subtraction, exponentiation, modulus) and the functions sin() and saw(). t is a special variable denoting time; the expression is implicitly a definition of a function f(t). Free variables become implicit parameters the values of which are controlled by sliders.

Frequency and amplitude modulation can be expressed quite simply. Things get really interesting when you do higher-order modulations, as you can see in the video.

I wrote a MIDI input mode to Cyclist (piano.py). This makes it behave sort of like a programmable synthesiser such as the DX-7, except that there's no way to represent releasing a key, so it doesn't behave much like a keyboard. Connecting parameters to MIDI knobs would be easy.

Cyclist is written in in Python; expressions are evaluated by being translated to LLVM and JITted. This is probably overkill, but doing it this way was interesting and it meant that speed has never been a problem. Something like Theano or just plain NumPy would probably work fine.

I ended up writing a combinatoric parsing library when I couldn't work out why my original SimpleParse-based parser was incredibly slow. But that's another story.

Code: git repository