// impulse3.ck // copyright 2007 Les Hall // This software released under the GNU General Protective License // experiments with creating music from the impulse response of filters // the patch(es) Impulse i => BPF f1 => JCRev r => dac; i => BPF f2 => r => dac; i => BPF f3 => r => dac; i => BPF f4 => r => dac; i => BPF f5 => r => dac; // set up BPF f1.Q(100); f2.Q(100); f3.Q(100); f4.Q(100); f5.Q(100); f1.gain(0.70); f2.gain(1.00); f3.gain(0.50); f4.gain(0.50); f5.gain(0.50); // set up the reverb r.mix(0.02); while (true) { // randomly set the gain Std.rand2f(100, 400) => float frequency; frequency => f1.freq; 2 * frequency => f2.freq; 3 * frequency => f3.freq; 4 * frequency => f4.freq; 5 * frequency => f5.freq; // pluck the string 300.0 => i.next; // advance time Std.rand2f(1, 7) * 100::ms => now; }