// Drippy 01 version 0.1 testing // by Kijjasak Triyanond (kijjaz) - kijjaz@yahoo.com // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. class kjzDrippy01 { Step freq => SinOsc s => Gain s_g => Gain output; 3 => s_g.op; Impulse imp => Gain g => Gain g_fb => g => Gain drip_depth => s; g => LPF g_f => s_g; g_f.set(500, .5); 1000 => float lowFreq; 3000 => float highFreq; 2000 => float dripDepth; 400 => float dripDecay; 0 => float lowVel; .5 => float highVel; 100 => float lowDur; 1500 => float highDur; spork ~ run(); fun void run() { while(true) { Std.rand2f(lowFreq, highFreq) => freq.next; -dripDepth => drip_depth.gain; 1.0 - 1.0/dripDecay => g_fb.gain; Std.rand2f(lowVel, highVel) => imp.next; Std.rand2f(lowDur, highDur)::ms => now; } } } // test code kjzDrippy01 A; A.output => NRev rev => dac; rev.mix(.1); hour => now;