programming.txt (Based on programming.txt - mostly out of date!)
// Plain .5 amplitude sine wave with // 10 ms de-click attack and release. Sine(P V=1) { struct { wtosc; panmix } w sine; p P a (V * .5); d 10 end .rel a 0; d 10 1() { force rel } } // Noise excited oscillator, based // on a resonant filter. FilterPitch(P V=1) { struct { wtosc; filter12; panmix } w noise; p (P + 1); lp 0; bp 0; hp 1 q 2; set q; cutoff P; set cutoff a (V * .01); set a end .rel a 0; d 100 d 2000 1() { force rel } } // Music box, using a short impulse to excite // a resonant filter. MusicBox(P V=1) { struct { wtosc; filter12; panmix } w pulse1; p -2; lp 0; bp 1; hp .5 q (2 + P); ifl (q - 1) { q 1 }; set q cutoff P; set cutoff a (V * .1); set a; d 1 *a .5; set a; w noise; p 4; a 0; d 5 d 4000 } // Bass sound using dual oscillators and a // resonant filter. PhattPig(P V=1) { struct { wtosc 0 1 wtosc o2 0 1 filter12 panmix } // Pitch scaled detune !detune (.005 * (1 - P)) ifl (detune - .001) { detune .001 } // Oscillator 1 w pulse30 a (V * .1); set a p (P - detune) // Oscillator 2 o2.w pulse20 o2.a (V * .1); set o2.a o2.p (P + detune) // Filter lp 1; bp 1; hp 0 q 3; set q; cutoff (P + 6); set cutoff // Filter envelope cutoff (P + 3), q .03; d 100 cutoff (P + 2), q .01; d 100 cutoff (P + .5); d 500 a 0; o2.a 0; d 500 end .rel // Release a 0; o2.a 0; cutoff (P - 1); q 0; d 100 d 500 // Wait for filter tail to end 1() { force rel } }