Skip to content

Instantly share code, notes, and snippets.

@lvm
Last active August 23, 2019 02:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lvm/e9ad38b1de6a89614d0def4ff6f8232b to your computer and use it in GitHub Desktop.
Save lvm/e9ad38b1de6a89614d0def4ff6f8232b to your computer and use it in GitHub Desktop.
s.boot;
(
SynthDef(\simple, { |freq=440, pos=0, amp=0.5|
Pan2.ar(SinOsc.ar(freq), pos, amp);
}).add
;
SynthDef(\simple_rev, { |sig, mix=0.5, room=0.5, damp=0.1|
FreeVerb.ar(sig, mix, room, damp);
}).add
;
SynthDef(\simple_crush, { |sig, crush=1|
Decimator.ar(sig, 44100/crush);
}).add
;
)
(
f = { |key=\default| SynthDescLib.global.at(key).def.func };
)
// With ProxySpace
ProxySpace.push(s);
~simple.clear;
~simple.play;
~simple[0] = f.(\simple);
~simple[10] = \filter -> { |sig| RLPF.ar(sig, 420); };
~simple[20] = \filter -> f.(\simple_rev);
~simple[21] = \filter -> f.(\simple_crush);
~simple[30] = \set -> Pbind(\mix, Pwhite(0.1, 0.9), \room, Pwhite(0.5,0.9), \freq, Pwhite(220, 440), \crush, Pwhite(1,16), \dur, 1);
// Without ProxySpace
Ndef(\simple).clear;
Ndef(\simple).play;
Ndef(\simple)[0] = f.(\simple);
Ndef(\simple)[10] = \filter -> { |sig| RLPF.ar(sig, 420); };
Ndef(\simple)[20] = \filter -> f.(\simple_rev);
Ndef(\simple)[21] = \filter -> f.(\simple_crush);
Ndef(\simple)[30] = \set -> Pbind(\mix, Pwhite(0.1, 0.9), \room, Pwhite(0.5,0.9), \freq, Pwhite(220, 440), \crush, Pwhite(1,16), \dur, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment