diff --git a/padsynth practice EF-edit.scd b/padsynth practice EF-edit.scd index d2aedcf..dbee357 100644 --- a/padsynth practice EF-edit.scd +++ b/padsynth practice EF-edit.scd @@ -40,24 +40,30 @@ SynthDef(\rhubarb, { MIDIdef.noteOn(\noteOnTest, { arg vel, nn, chan, src; // [vel, nn].postln; - ~notes[nn] = Synth.new( - \rhubarb, - [ - \freq, nn.midicps, - \amp, vel.linexp(1,127,0.01,0.3), - \gate, 1, - \detune, 0, - \cutoff, 400, - \rq, 0.5, - ] - ); + + if (chan == 0, { + ~notes[nn] = Synth.new( + \rhubarb, + [ + \freq, nn.midicps, + \amp, vel.linexp(1,127,0.01,0.3), + \gate, 1, + \detune, 0, + \cutoff, 400, + \rq, 0.5, + ] + ); + }); }); MIDIdef.noteOff(\noteOffTest, { - arg vel, nn; + arg vel, nn, chan; // [vel, nn].postln; - ~notes[nn].set(\gate, 0); - ~notes[nn] = nil; + + if (chan == 0, { + ~notes[nn].set(\gate, 0); + ~notes[nn] = nil; + }); }); )