I’m quite new to SuperCollider so I hope my questions isn’t too naive.
I’ve been loading the MiRings ugen from here and I have it up and running with MIDI which I send from a keyboard and orca.
The Rings module takes a pitch and a trigger and can play up to four notes. Timing is a therefore a problem because the pitch change and trigger for two notes cannot happen at the same time, or the module won’t play both.
This is not a problem when I play on the keyboard because my timing isn’t perfect so there is never an overlap. But when sequencing from Orca the notes often fall at the same time but they can’t both ring out.
Here’s a stripped down example of my approach:
(
SynthDef(\dong, { arg pit = 60, trig = 0;
Out.ar(0, MiRings.ar(pit: pit, trig: trig, poly: 4, model: 2));
}).add;
)
(
var notes, on, off, theRings;
MIDIClient.init;
MIDIIn.connectAll;
theRings = Synth(\dong);
on = MIDIFunc.noteOn({ |veloc, num, chan, src|
theRings.set(\pit, num, \trig, 1);
});
off = MIDIFunc.noteOff({ |veloc, num, chan, src|
theRings.set(\trig, 0);
});
q = { on.free; off.free; theRings.free; };
)
So my question is, can I somehow queue up or delay the pitch changes and triggers? And can I send an impulse on noteOn
instead of manually setting the trig back to 0
(because that is obviously also horrible…).
Again, I hope this isn’t too naive. Thank you!