Hi, I’m controlling an Eurorack from SuperCollider via an Expert Sleepers ES-8 module. The signal path is: SC server → Modular Synth → Back to SC . This round-trip adds ~30ms of latency compared to SC’s direct audio output.
For patterns, I use a negative \lag value to schedule events slightly earlier, compensating for the hardware round-trip:
Pbind(\instrument, \modular, \dur, 1, \lag, -0.03);
This works perfectly but I also would like to work ndefs instead of patterns:
Ndef(\trig, {
Decay.ar(Impulse.ar(t), 1);
}).play(out: 4);
I need to advance the signal by 30ms, but DelayN only adds positive delay.
Is there a way to apply a negative time offset to an Ndef signal? Or another approach to compensate for hardware round-trip latency?
Thank you.
A quant spec actually works with a negative phase (if I recall): specifying Quant(-1, -0.03) or [-1, -0.03] means “next bar minus 0.03 beats” – at 4/4, if the clock is currently at 5.something beats, this quant would resolve to 7.97 beats. (Phase is in beats, so you’d have to divide by the tempo to get seconds.)
AFAICS there’s no way for a NodeProxy to override the server’s latency value. If it could, then you could set 0.17 seconds latency only for the CV synths, while using the default for audible synths. This would be a good use case to log a feature request though.
hjh
Thanks for the support, @jamshark70.
I tried different options but couldn’t make it work:
Ndef(\modular, {
var sig = SoundIn.ar([2, 3]).sum;
Pan2.ar(sig, \pan.kr(0));
});
Ndef(\modular).quant = [-1, -0.03];
Ndef(\modular).play;
But it is ignoring it. Did I use it correctly?