-
... k, Color.rand]]) .mouseDownAction_({ a = { EnvGen.kr(Env.adsr, doneAction: Done.freeSelf) * SinOsc.ar(440, 0, 0.4) }.play; }) .action_({ |butt, mod| a.release(0.3); }); w.front; }) ) ⧉ ✔ If you drag a function to a button, the button's acti ...
-
... itches.size.do{ |i| { var freq = pitches[i].midicps; var env = Env.perc.ar(Done.freeSelf); SinOsc.ar(freq) * 0.1 * env }.play; 0.2.wait } } ) ⧉ ✔ . put ( index , item ) From superclass: ArrayedCollection Put item at index starting from 0, r ...
-
... 00, amp = 0.2| var sig = SinOsc.ar(freq, 0.5pi) * Env.perc(0.001, 0.06).ar(Done.freeSelf, levelScale: amp); OffsetOut.ar(0, sig.dup) }).add; }); ) // create a synchronized clock l = LinkClock(1).latency_(Server.default.latency); // GUI to w ...
-
... , fcurve, rq) * EnvGen.kr(Env.adsr(0.04, 0.2, 0.6, 0.1), gate, doneAction: Done.freeSelf) * amp; Out.ar(out, sig ! 2) }).add; ) ( TempoClock.default.tempo = 128/60; // Pmul does only one thing here: take ~amp from each event // and replace ...
-
... = 0.3| OffsetOut.ar(out, Pulse.ar(freq) * EnvGen.kr(Env.perc, doneAction: Done.freeSelf) * amp) }).add; ) // number of channels ~numChans = 5; // values in a Pattern may be set in various ways // here we use control buses, except for \dur ...
-
... tart); sig = sig * amp * EnvGen.kr(Env.linen(0.01, dur, 0.01), doneAction: Done.freeSelf); Out.ar(out, sig ! 2) }).add; ) ( TempoClock.default.tempo = 1; p = Pfset({ ~buf = Buffer.read(s, ExampleFiles.child); 0.2.yield; // sync seems to be ...
-
... ar snd, env; env = EnvGen.kr(Env.perc(dur * 0.01, dur * 0.99), doneAction: Done.freeSelf); snd = SinOsc.ar(freq, mul: amp); snd = snd * env; snd = snd!2; Out.ar(out, snd); }).add; ) ⧉ ✔ You can try the synth using: Synth(\instrView) ⧉ ✔ We' ...
-
... \feedback.kr(1.0))*\amp.kr(0.5); var env = EnvGen.kr(Env.perc, doneAction: Done.freeSelf); sig = Pan2.ar(sig*env, 1.0); // map the output to the right channel Out.ar(out, sig); }).add; // play the synth according to the markov transition ma ...
-
... ance2.ar(x[0], x[1], bal); x = x * EnvGen.kr(Env.cutoff, gate, doneAction: Done.freeSelf); Out.ar(out, x); }, [0.1, 0.1, 0.1, 0.1, 0.1, 0] ).add; // make the window w = Window("another control panel", Rect(20, 400, 230, 250)); w.front; // m ...
-
... ])); var env = EnvGen.kr(Env.asr(atk, 1, rel), gate * gateEnv, doneAction: Done.freeSelf); Out.ar(out, sig * env * amp) }); ⧉ ✔ The control sustainTime determines playback duration based on the firstFrame and lastFrame. The control gate all ...