Aaron Krister Johnson <akjm...@gmail.com>: Sep 15 01:22PM -0700
N.B.: if you apply `Pow()` to `MidiAdsr()`, I think the latter is 0-1
scaled, and depending on your base that you're raising from, you'll want to
re-normalize, likely by subtraction and multiplication
Consider that `Pow()` is like python's `math.pow()`, but applied to a
vector signal. So, you can see that:
math.pow(2, 0) = 1
math.pow(2, 1) = 2
and
math.pow(10, 0) = 1
math.pow(10, 1) = 10
so in general, after any signal ranging from 0-1 is applied as the
exponent, you'll want to subtract 1 and divide by the (base - 1)
so if the general form is
math.pow(b, x)
and x is your control or audio signal, you'll do:
base = Sig(<your_real_base>)
scaled_control = (Pow(base, MidiAdsr(...)) - 1) / (base - 1)
and your scaled control will now be between 0-1 in range, but have
analogous curvature that you want per a given power base.
This works similarly with `Log()`
Cheers,
AKJ
Aaron Krister Johnson
Music, etc.:
http://www.untwelve.org
https://www.youtube.com/channel/UC_utjGYbSizWE0dNyr0Vdmg
<http://www.untwelve.org>
https://soundcloud.com/aaron-krister-johnson
https://soundcloud.com/filtercreed
https://aaronkristerjohnson.bandcamp.com/ <http://www.untwelve.org>
Code:
https://github.com/akjmicro <http://www.untwelve.org>
|