I have two questions.
Question 1:
Suppose i have a set of triggers and a variable that latches on to a certain value depending on which trigger was triggered last. How do i do this?
SynthDef(\test, {
var trig1, trig2, trig3, trig4;
var mutableVar = 0;
trig1 = Trig.ar(crossBeginCond & chanCond1, 0.01);
trig2 = Trig.ar(crossBeginCond & chanCond2, 0.01);
trig3 = Trig.ar(curHeadCond & chanCond1, 0.01);
trig4 = Trig.ar(curHeadCond & chanCond2, 0.01);
//some pseudo code
if lasttrig == trig1
mutableVar = 0
else if lasttrig == trig2
mutableVar = 1
etc.
})
I feel like theres a simple solution to this. But i cant find it without making a mess.
I’d like to do this without the SendTrig, OSCFunc, synth.set way. So id like to keep this all inside the synth.
That brings me to question 2:
If i kept everything inside one synth instead of communication between client and server through osc messages and send trigs, would the timing improvement be significant?