set right chan

master
Leo Coogan 9 months ago
parent 0913795834
commit 3ff392c6ef
Signed by: lcoogan
SSH Key Fingerprint: SHA256:vnrR5ilHkdr6L4t2yOMUMINFPpxEh+53N3nMel66mCw

@ -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;
});
});
)

Loading…
Cancel
Save