Hello,
I have noticed that setting some other parameters using Pseg + Pfunc of external synths from within Patterns do not obey latency. Consider the following code:
( // simple noise synth with low pass filter
SynthDef(\noise, { |ff=100|
Out.ar(0, LPF.ar(WhiteNoise.ar(0.2)!2, ff))
}).add
)
// synth instance
n = Synth(\noise);
n.set(\ff, 1500) // set filter frequency
n.set(\ff, 100)
(
s.latency = 0.1;
Pbindef(\latency_test, *[
instrument:\default,
legato:0.05,
decay:0,
amp:0.3,
dur:1/2,
filtfreq: Pseg([100,10000], [4,0], \lin, inf),
setfiltfreq: Pfunc({|ev| n.set(\ff, ev.filtfreq )})
]).play(quant:2)
)
My expectation was that Pseg with Pfunc would ‘honor’ the latency setting. But this seems to not be the case.
When using latency 0.02 the effect is not noticable, but when I have a lot of processing, 0.02 is too tight and produces “late” messages and it has consequences that can be heard, and I need to raise the latency towards 0.1 when this is then noticable.
Is there a way around this? Is there a way to create an offset with quant for example? I could separate code with Pseg & Pfunc to achieve sync of x.set() of externally running synth (an effect synth) in my composition.
Any help more than appreciated!