// title: P1 // author: codepool // description: // Migration from the old SourceForge wiki. // code: p = ProxySpace.push(s.boot); p.makeTempoClock; ~out.play; ~hh.play; ( SynthDef("lc", { arg out, freq, min, max, sustain=1; Out.kr(out, SinOsc.kr(Line.kr(freq, 0, sustain, doneAction:2)).range(min, max)); }).store; SynthDef("who", { arg freq, gate=1, out=0, ffreq=800; var x, e, env; env = Env.asr(0.1, 0.2, 0.01); e = EnvGen.kr(env, gate, doneAction:2); x = Pan2.ar(Formant.ar(freq * (1+e), ffreq, 130, e), Rand(-1.0, 1.0)); Out.ar(out, x); }).store; ) ~c.kr; ~c.fadeTime = 0; ~out = { BPF.ar(~form.ar, [300, 400]) }; ~f = { MouseX.kr(100, 1000, 1) * LFNoise1.kr(7, 0.1, 1) }; ( ~c = Pbind( \instrument, \lc, \freq, Pseq([1, 3, 19, 2, 45, ~f], inf), \min, 200, \max, 300, \dur, 1/3 ); ) ( ~form = Pbind( \instrument, \who, \degree, Pseq(#[0, 1, 3, 0, 1s, 3], inf), \octave, Pseq(#[3, 1, 2, 3],inf), \ffreq, Pseq([100, ~c], inf), \legato, Pshuf(#[1.3, 1.1, 0.2, 1.5, 0.2],inf), \dur, Pshuf([1, 2, 1, 3, Prand([1, Pseq(#[1,1,1,1]/1)]), 2],inf) * 0.25 ); ) ~f = { LFSaw.kr(0.5).range(100, 1000) }; ( ~hh = { Pan2.ar( Decay2.ar(Impulse.ar(LFClipNoise.kr(0.5).range(4, 8), 0, 0.01), 0.005, 0.02, BPF.ar(WhiteNoise.ar(10), 16000)), ToggleFF.ar(~hh.ar) * 2 - 1 ) }; ) ************ /* authors so far: (c) jrh */