Knob variable power function?
Posted: Sun Aug 06, 2017 8:30 am
I like to take a sine wave, and SOF it into the 0 to 1.0 range to use as a tremolo LFO (or any other LFO application). I also like to square or cube or beyond this sine wave so that it is "warped" but still smooth. What I'd like to do is have a knob that controls the level of warp from, say, 1 to 5. 1 would be the original signal, and 5 would be the signal to the 5th power.
Now of course I could do pot skipping and have each step be a different power step (via cascaded MULX instructions), but I want it to be smooth across pot rotation rather than jump between steps.
In regular math, I can do powers by taking the log, multiplying, and then taking the exponent of the result.
Super trivial example:
starting value is 100. I want to square this.
log10(100) = 2.
2 x 2 = 4.
10^4 = 10,000.
Suppose I want to do the "1.5" power:
log10(100) = 2.
2 x 1.5 = 3
10^3 = 1,000.
Anyone who wants to chime in with the answer is welcome to do so.
The goal:
Take an input control signal between 0.0 and 1.0.
Take a pot control signal and use this to continuously control "variable power" of the control signal from 1 to 5.
TIA,
DL
Now of course I could do pot skipping and have each step be a different power step (via cascaded MULX instructions), but I want it to be smooth across pot rotation rather than jump between steps.
In regular math, I can do powers by taking the log, multiplying, and then taking the exponent of the result.
Super trivial example:
starting value is 100. I want to square this.
log10(100) = 2.
2 x 2 = 4.
10^4 = 10,000.
Suppose I want to do the "1.5" power:
log10(100) = 2.
2 x 1.5 = 3
10^3 = 1,000.
Anyone who wants to chime in with the answer is welcome to do so.
The goal:
Take an input control signal between 0.0 and 1.0.
Take a pot control signal and use this to continuously control "variable power" of the control signal from 1 to 5.
TIA,
DL