Doesn't matter, but for the records : in a "for i=0 to "
loop, i'm multiplying (which the part i'm fading) by i/
What i do is a linear fade in (in this case). Perfectly working (great
live looping tool). But i wonder what are the ways to do other fades
curve. And it's always the time i remember maybe i shouldn't have spent
my math classes playing pinball.
> but for the records : in a "for i=0 to " loop, i'm
> multiplying (which the part i'm fading) by i/.
Makes sense (although to be finicky, it should probably be fade
length - 1).
> But i wonder what are the ways to do other fades curve.
I tend to do this kind of thing as a normalisation (which you're
doing, I guess: fade goes from 1.0 to 0.0) then just pass the value
through a function providing the fade curve. (I can't remember
offhand what an equal-power curve looks like, for instance - just a
bit of sine/cosine as I recall, so map your 0.0..1.0 into 0.0..pi/2
nick rothwell -- composition, systems, performance -- http://
i would suggest to scale your fade values between 0 and 1 (or 1 to 0
for fade out) and raise to a desired exponent.
an exponent of 1 would give you a linear fade.
an exponent smaller than 1 will give you a faster fade in (slowing
down) - useful for crossfades.
an exponent bigger than 1 will give you a slower fade in (which is
"accelerating") - useful for fade in/out.
for sinusoidal fades scale your values between 0 and pi/2 and take
sine or cosine resp.
and there are a lot more, i guess.