From: David R. Sky <davidsky@sh...> - 2007-09-09 16:34:42
The LFO waveform table code I posted previously works well, except
for extremely slow LFO rates.
For instance, when LFO rate is 0.001hz and waveform is pulse, the
5ms transition from +1 to -1 becomes a 5-second transition time.
So I scaled the 5ms transition time by the LFO rate in setting the
LFO waveform table:
(setf slope-time (* 0.005 rate))
and used this in the LFO pulse waveform table-setting:
; duty between 1 and 99 inclusive
(setf duty (* duty 0.01))
(pwl 0 1 duty 1 (+ duty slope-time) -1 (- 1.0 slope-time) -1 1 1 1)
(hz-to-step 1.0) t)))
[I removed the control-srate-abs 1024 ...) code because it sounded
a little 'clunky' to me.]
However, I still get a 0.5-second transition time with LFO rate of
0.001hz. Improved over 5 seconds transition time, but not the 5ms
transition time I'd like.
What else do I need to do? Inversely scale the control-srate by the
I suspect that people won't be using a 0.001hz LFO for panning
audio, but it is increasingly noticeable the slower the LFO rate
David R. Sky
Get latest updates about Open Source Projects, Conferences and News.