diff options
-rw-r--r-- | classes/ZZZ.sc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/classes/ZZZ.sc b/classes/ZZZ.sc index 50cbe8b..24ba9a0 100644 --- a/classes/ZZZ.sc +++ b/classes/ZZZ.sc @@ -10,18 +10,26 @@ ZZZ{ < noteVoltageRangeMax = 7.0, < noteCpsRangeMin = 4.088, < noteCpsRangeMax = 16744.036; - var <channels; + var <channels, <server; *new{ - arg channels; - ^super.newCopyArgs(channels); + arg channels, server; + ^super.newCopyArgs(channels, server); } *initClass{ StartUp.add{ - // adding SynthDef for clock - SynthDef(\ZZZClock, { |out = 0, freq = 2, iphase = 0, width = 0.5, mul= 1.0| - Out.ar(out, LFPulse.ar(freq, iphase, width, mul)-0.5); + SynthDef(\ZZZGate, {|bus = 0, in = 1.0, out = 0| + Out.ar( + out, + DC.ar(in: in) * In.kr(bus) + ); + }).add; + SynthDef(\ZZZClock, { |out = 0, bus = 0, iphase = 0, width = 0.5, mul = 1.0, add = 0.0| + Out.ar(out, LFPulse.ar(In.kr(bus), iphase, width, mul, add)); + }).add; + SynthDef(\ZZZClockKorg, { |out = 0, bus = 0, iphase = 0, width = 0.5, mul = 1.0, add = 0.0| + Out.ar(out, LFPulse.ar(In.kr(bus) * 2, iphase, width, mul, add)); }).add; // adding SynthDef for constant notes SynthDef(\ZZZConstant, { |out = 0, mul= 0.0| |