Thanks @julian, I'm getting closer using your advice.
I set up an Ndef in SC that outputs a continuous level:
Ndef(\cvDef, { | freq = 440, lag=0.01 |
var lagFreq = Lag.kr(freq, lagTime: lag);
LinLin.ar( log2(lagFreq/440), -1, 9, 0, 1);
}).play(0);
The params to LinLin
are calibrated for my external oscillator's 1v/oct range. Outputting 0-1 from this Ndef results in a 0-10v signal through my ES-9 audio interface.
Then I'm able to control it through this synth:
~dirt.soundLibrary.addSynth(\cv, (play: {
Ndef(\cvDef).wakeUp; // make sure the Ndef runs
Ndef(\cvDef).set(\freq, ~freq);
})
);
And in tidal:
d1 $ n "a6 a5" # s "cv"
Result:
It's nice also that I can get true portamento that can also be patterned, via the Lag
ugen.
The part I'm hung up on is routing the Ndef's output buffer to the dirt synth somehow so it's not just always playing. However, this is just a nice-to-have since the CV will be gated by a signal on a separate channel. I may look into writing a module to emit Ndef(\cvDef).start
and .stop
commands.
I tried using the playInside
functionality but couldn't get it to work. See How to add a synth with `dirt.soundLibrary.addSynth` and playInside.