Sound and effects help

Hi all,

I'm implementing some effects in a little looper project and need some help with a couple of things:

  1. In Lua the delay effect doesn't have a setLength() method like the C equivalent, in order to change the delay length I'm having to hack it, unsurpringly this crashes on hardware if you change too quickly (debounce is definitely needed), am I missing something or is it just a gap in the API?
delayAEffect:setAmountListener(function(value)
	--todo debounce?
	sound.removeEffect(delayFx)
	delay = map(value, 0.0, 1.0, 0.0, 5.0)--remap the normalised value to 0 to 5 seconds
	delayFx = sound.delayline.new(delay)
	sound.addEffect(delayFx)
end)
  1. In order to boost recorded audio a little I'm applying overdrive, I've seen in example code :setGain(2.0) but can't find any documentation on valid ranges. I assume with most params unless otherwise specified it's a normalised 0.0 to 1.0 value but that doesn't seem the case here.
overdriveEffect:setAmountListener(function(value)
	overdrive:setGain(map(value, 0.0, 1.0, 0.0, 3.0))--map normalised value to 0.0 - 3.0
end)
  1. Lastly just confirming when I add a delay line tap I don't need to do anything else to attach it to an audio source if I'm not using channels? When the user changes the delay length I'm adding a couple of taps like so:
delayAEffect:setAmountListener(function(value)
	--todo debounce?
	sound.removeEffect(delayFx)
	delay = map(value, 0.0, 1.0, 0.01, 5.0)
	delayFx = sound.delayline.new(delay)
	sound.addEffect(delayFx)
	delayTapA = delayFx:addTap(delay)
	delayTapB = delayFx:addTap(delay)
end)

They can then mutate the tap delay anywhere within the new delay max, does this all sound correct?

delayTapA:setDelay(map(value, 0.0, 1.0, 0.0, delay))

Thanks in advance for any help, I think I'm just missing a bit of clarity on a few things and there's a bit of guesswork going on