I want to add a portamento effect to certain notes on a track (pitch glides smoothly from the starting note to the ending note). Anyone have tips on how to do that? I was thinking maybe an LFO modulating the pitch of the synth, or something like that.
This is how I did it for now, by using sound.lfo:setDelay():
-- Glide (Portamento) controller
local bass_glide = snd.lfo.new(snd.kLFOSquare)
bass_glide:setRate(0.01)
bass_glide:setRetrigger(true)
bass_glide:setDelay(0, (15/tempo))
bass_glide:setCenter(-1)
vco_1:setFrequencyMod(bass_glide)
It ramps from -1 to 0, which means the frequency glides from 1 octave below the pitch up to the target pitch. Also, you can use sound.lfo:setDepth() to change the glide amount and direction (negative value to glide down).
EDIT: I guess you can also do it with a control signal. Probably more straightforward that way.