## Curves & math

Jun 18, 2006 at 8:35am

# Curves & math

#26462
Jun 18, 2006 at 11:47am

On 18 Jun 2006, at 09:35, f.e wrote:

I’m not sure I understand this: you’re dividing all the sample
amplitudes by something called “fadeTimeL”. Is that what you intend?

What exactly is it that you’re trying to achieve? Periodicity? One-

– N.

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com

#79127
Jun 18, 2006 at 4:18pm

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/
length>.
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.

cheers

f.e

#79128
Jun 18, 2006 at 4:42pm

On 18 Jun 2006, at 17:18, f.e wrote:

> 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

– N.

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com

#79129
Jun 18, 2006 at 5:50pm

That’s precisely what you don’t remember that i need. If you get a hand
on this, don’t forget to drop a mail.

cheers

f.e

#79130
Jun 18, 2006 at 6:18pm

maybe the msp examples on spatialization can help?

-thijs

#79131
Jun 18, 2006 at 9:28pm

hi fe,
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