[0.0, 0.0] @=> float tilts[]; 0 => int newTilt; int i; 1 => int notDone; Impulse glot => OnePole pole => TwoPole f1 => TwoZero zs => NRev rev => dac; pole => TwoPole f2 => zs; pole => TwoPole f3 => zs; // 1.0 => zs.b0; // 0.0 => zs.b1; // -1.0 => zs.b2; 0.9 => pole.pole; 0.99 => f1.radius => f2.radius => f3.radius; SinOsc vib => blackhole; 6.0 => vib.freq; 0.2 => vib.gain; 0.02 => rev.mix; // Noise noiz => TwoZero bz => f1; // bz => f2; bz => f3; // 1.0 => bz.b0; 0.0 => bz.b1; -1.0 => bz.b2; Noise noiz => f1; noiz => f2; noiz => f3; 0.0 => float noizTarg => noiz.gain; 100.0 => float pitch; 0.01 => float period; spork ~ doGlot(); spork ~ smoothStuff(); [50, 51, 54, 55, 57] @=> int notes[]; float f1Targ,f2Targ,f3Targ; 100.0 => float pitchTarg; 0.0 => float gainTarg; OscRecv recv; 1337 => recv.port; recv.listen(); recv.event( "/accxyz, f f f" ) @=> OscEvent TOSCAccelMessage; recv.event( "/1/xy1, f f" ) @=> OscEvent TOSCTouchMessage; recv.event( "/1/fader1, f") @=> OscEvent TOSCFaderMessage; float x,y,z; float tx, ty; spork ~ watchAccel(); spork ~ watchTouch(); spork ~ watchFader(); while (notDone) { 0.1 :: second => now; } fun void watchAccel() { while (notDone) { TOSCAccelMessage => now; while (TOSCAccelMessage.nextMsg() != 0) { (TOSCAccelMessage.getFloat()+1.0)*0.5 => x; (1.0-TOSCAccelMessage.getFloat())*0.5 => y; TOSCAccelMessage.getFloat() => z; } <<< x, y, z >>>; 200+600*x => f1Targ; f1Targ+100+1700*y => f2Targ; f1Targ+f2Targ+500 => f3Targ; } } fun void watchTouch() { while (notDone) { TOSCTouchMessage => now; while (TOSCTouchMessage.nextMsg() != 0) { TOSCTouchMessage.getFloat() => tx; TOSCTouchMessage.getFloat() => ty; } // <<< tx, ty >>>; 40.0 + 400.0*(1.0-ty) => pitchTarg; tx => gainTarg; } } fun void watchFader() { while (notDone) { TOSCFaderMessage => now; while (TOSCFaderMessage.nextMsg() != 0) { TOSCFaderMessage.getFloat() => vib.gain; } } } fun void smoothStuff() { while (notDone) { 0.01 :: second => now; pitch*0.9 + 0.1*pitchTarg => pitch; glot.gain()*0.8 + 0.2*gainTarg => glot.gain; noiz.gain()*0.8 + 0.2*noizTarg => noiz.gain; f1.freq()*0.8 + 0.2*f1Targ => f1.freq; f2.freq()*0.8 + 0.2*f2Targ => f2.freq; f3.freq()*0.8 + 0.2*f3Targ => f3.freq; } } fun void doGlot() { while (notDone) { 1.0 => glot.next; 1.0 / pitch => period; period * (1.0 + (0.05* vib.last())) => period; period :: second => now; } } /**** SCurvIA test # 1 **********************/ ["eee","ihh","ehh","aaa","ahh","aww","uhh", "ooo","uuu","rrr","lll","mmm","ngg","nnn"] @=> string names[]; [[250.0,2600.0,3010.0], // eee [440.0,2500.0,2550.0], // ihh [620.0,2370.0,2480.0], // ehh [810.0,1950.0,2410.0], // aaa [850.0,1500.0,2440.0], // ahh [810.0,1170.0,2410.0], // aww [550.0,800.0,2390.0], // uhh [300.0,870.0,2240.0], // ooo [480.0,1120.0,2240.0], // uuu [450.0,1500.0,1690.0], // rrr [360.0,1200.0,1864.0], // lll [261.0,1175.0,2637.0], // mmm [208.0,1568.0,2489.0], // ngg [120.0,1290.0,1960.0], // nnn (last line is dupe of this) [120.0,1290.0,1960.0]] @=> float forms[][];