
This is what happened after "yes". But the problem (mode switch detected on the audio thread) still shows up after i get back to my code:
s = Server.default;
s.options.numAnalogInChannels = 8;
s.options.numAnalogOutChannels = 8;
s.options.numDigitalChannels = 16;
s.options.blockSize = 16;
s.options.numInputBusChannels = 2;
s.options.numOutputBusChannels = 2;
s.options.postln;
s.waitForBoot({
"Server Booted".postln;
SynthDef(\pressSensorL, {arg inbus = 0, outbus = 0;
var toe, heel, signal;
toe = AnalogIn.ar(0);
heel = AnalogIn.ar(1);
signal = toe * heel;
Out.kr(outbus, signal);
}).add;
SynthDef(\pressSensorR, {arg inbus = 0, outbus = 0;
var toe, heel, signal;
toe = AnalogIn.ar(0);
heel = AnalogIn.ar(1);
signal = toe * heel;
Out.kr(outbus, signal);
}).add;
//System Specifications
~variableMappingRate = 0.01;
// create Buses
~leftBus = Bus.control(s, 1);
~rightBus = Bus.control(s, 1);
// create Variable
~leftVar = 0;
~rightVar = 0;
// Which Bus should be
l = Synth(\pressSensorL, [\outbus, ~leftBus] );
r = Synth(\pressSensorR, [\outbus, ~rightBus]);
Tdef(\VariableSwitch, {
loop{
~leftBus.get({arg value; ~leftVar = value;});
~rightBus.get({arg value; ~rightVar = value;});
~variableMappingRate.wait;
}
}).play;
SynthDef('pm', {arg freq=200, amp=0.5, pan=0, dur=1, modfreq=200, idx=0.1, modphase=0, trig=1;
var sig, env;
sig = PMOsc.ar(freq, modfreq, idx, SinOsc.ar(modfreq 3));
env = EnvGen.ar(Env.perc(0.01, 1), trig, timeScale: dur, doneAction: 2);
Out.ar(0, Pan2.ar(sig env * amp, pan));
}).add;
Tdef(\Test_The_VariableSwitch, {
~synthPm = Synth(\pm, [\out, 1]);
loop {
~synthPm.set(\freq, ~leftVar);
~synthPm.set(\dur, ~leftVar);
~synthPm.set(\amp, ~rightVar);
}});
Tdef(\Test_The_VariableSwitch).play;
})
Do you have any ideas what the problem could be?
Best,