I'm using OSC to control the frequency of a sine wave, but I can't figure out how to portamento without introducing serious latency, which is weird because the Realtime Instrument Control example portamentos without much latency, and it uses .02 as the half-life! I have to check if kof=0 when I print OSC values to prevent overflow, so I'm not sampling too slow, right? My code:
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
kr=441
instr 1
iin OSCinit 7022
krx init 0
kof OSClisten iin,"/sixense/hydra/0/controller/left/position/x","f",krx
krx port krx,.01
aud poscil3 0dbfs/20,krx,1
out aud
;if(kof<1)goto end
;printk 0,krx
;end:
endin
</CsInstruments>
<CsScore>
f 1 0 16384 10 1
i 1 0 999
</CsScore>
</CsoundSynthesizer>
I've used oscil, oscili, poscil... I'd rather not use port, but ideally interpolate between the most recent OSC value and the value before that. Would I use lineto? I don't even know how to figure out how often I'm receiving OSC values. Thank you for your help.


