Login / Register  0 items | $0.00 NewWhat is KVR? Submit News Advertise

LFO rates and parameter mapping

sagamusix
KVRist
 
43 posts since 5 Mar, 2007

Postby sagamusix; Thu Jun 08, 2017 2:54 pm LFO rates and parameter mapping

I am writing an internal LFO generator plugin for my host to control other plugins that do not have an LFO or whose LFOs are too limited (my favourite pet peeve: Synth1's LFO has no Saw Up waveform, only Saw Down). The LFO itself is essentially done, apart from the following two little UI issues. :D

The remaining issues boils down to two related things:
1. Frequency range. How fast is sensible?
Since we're mostly talking about VST2 plugins to be controlled by the LFO, the rate is of course pretty much limited by the processing block size (and anti-aliasing is not really impossible). The LFO frequency can be set in Hz and in cycles per beat, and from my observations, setting it to anything higher than 20 Hz or so is already pretty messy. Is there any merit in allowing much higher values? What's the maximum frequency you would choose?

2. Frequency range mapping.
Currently I'm using a slider control for setting the LFO frequency. I guess it would be desirable to have finer control over the low frequencies, so I thought about using a mapping (x^2)*MAX_RATE (where x is the parameter in range [0...1]). However, when using the tempo-synced mode, this makes choosing integer amounts for the cycles per beat difficult. That's of course pretty bad because that's what the tempo-synced mode is all about!
How would you map the frequency range, and what would you do for easily setting integer amounts?
MadBrain
KVRian
 
942 posts since 1 Dec, 2004

Postby MadBrain; Thu Jun 08, 2017 8:00 pm Re: LFO rates and parameter mapping

Atm the LFOs in my current project are on the following curve (with parameter in the 0..1 range):
Code: Select all
lfoHz = 0.25 * pow(2.0, parameter*8) - 0.25;

This gives a rate of 0hz to 63.75hz. (the 0hz is used for random per note offsets and the like)
The default is 6hz for general purpose LFO and 6.5hz for vibrato.

For beat-matched mode, I snap the rate to the nearest power of 2 of what the beat rate would be at 120bpm, *1 or *1.5 or *1.33333333333333.
xoxos
Mr Entertainment
 
12056 posts since 29 Apr, 2002, from i might peeramid

Postby xoxos; Fri Jun 09, 2017 5:48 am Re: LFO rates and parameter mapping

my typical lfo implementation runs from 110hz to ..geez.. about 5 minutes (i could knock an octave or two off that low end) pow(2, -12 to +3) * 13.75hz (synthedit scale.. 0-10 puts 440 at 5, 13.75 at 0, and 14080 at 10, nifty)

audio rates above 20hz will especially sound "messy" if modulation isn't sample rate, which depends both on host and instrument implementaiton of course. i like to hit at least 30hz, because effects like "trumpet growl" are around this range, and a bit of headroom above that (antialias for lfo, please ignore those threads and discussions, they're to screw up novice developers). audio rate lfos are pretty nice to have, there are many targets that can handle it.

for the bottom, at least 45 seconds to a minute minimum, again, an octave lower can't really hurt, can it. the only issue with wide ranges is the sensitivity of the setting interface.
you come and go, you come and go. amitabha xoxos.net free vst. neither a follower nor a leader be
tagore "where roads are made i lose my way"
where there is certainty, consideration is absent.
sagamusix
KVRist
 
43 posts since 5 Mar, 2007

Postby sagamusix; Fri Jun 09, 2017 12:42 pm Re: LFO rates and parameter mapping

the only issue with wide ranges is the sensitivity of the setting interface.

Precisely, which is why I'm having this issue in the first place.

For beat-matched mode, I snap the rate to the nearest power of 2 of what the beat rate would be at 120bpm, *1 or *1.5 or *1.33333333333333.

That sounds promising, I might try something like that.

Moderator: Moderators (Main)

Return to DSP and Plug-in Development