My project to control pitches of two precision analog oscillators from SuperCollider using the
"Remote Control the BELA" code driving my Pepper cvs is producing this message:
"underrun detected: 1 blocks dropped" .
The messages seem related lto an occasional loss of control over the CV Bus which
mixes up past with subsequent commands in a confusing... and sometimes hair-raising way!
Here's the code defining the Buses and SythDefs of the code that rwrites to it running on BELA
parts to control Pepper cvs from my laptop:
cvsOutInit {
cvsOut = Synth(\cvsOut).postln;
{
frqBus = Bus.control(s,2); frqBus.set(0,0);
cvsOut.map(\frqs,frqBus);
ampBus = Bus.control(s,2); ampBus.set(0,0);
cvsOut.map (\amps,ampBus);
modFrqBus = Bus.control(s,2); modFrqBus.set(0,0);
cvsOut.map (\modFrqs,modFrqBus);
devBus = Bus.control(s,2); devBus.set(1,0);
cvsOut.map (\devs,devBus);
}.defer(0.1); // wait for ~cvsOut compilation
{ this.curBusVals }.defer(1.0)
}
loadSynthDefs {
SynthDef(\cvsOut,{|frqs = #[0,0],amps = #[0,0],
modFrqs = #[0,0],devs = #[0,0]|
AnalogOut.kr([0,1,2,3,4,5,6,7],
[frqs,amps,modFrqs,devs].flatten)
}).send(s);
SynthDef(\frqSigOut,{|bus=0,range=0.1,spd=1,
startFrq=0.1025 |
Out.kr(bus,SinOsc.kr(spd,0,range,startFrq))}).send(s);
SynthDef(\segCtlEnvs, { |pBus = 0, aBus=2, gate = 1|
var pitchEnv,ampEnv,curvesEnv,pEnvCtl,aEnvCtl,crvEnvCtl;
pitchEnv = Env.newClear(maxMelSize);
ampEnv = Env.newClear(maxMelSize);
curvesEnv = Env.newClear(maxMelSize);
pEnvCtl = \pitchEnv.kr(pitchEnv.asArray);
aEnvCtl = \ampEnv.kr(ampEnv.asArray);
crvEnvCtl = \curvesEnv.kr(curvesEnv.asArray);
Out.kr(pBus, EnvGen.kr(pEnvCtl, gate));
Out.kr(aBus, EnvGen.kr(aEnvCtl, gate, doneAction:2));
}).add;
I'd appreciate an explanation of what might be causing the overrun messages and
suggestions of what I can try to prevent them from occurring !
thanks for any help
Chris