Main Archive Specials Wiki | FAQ Links Submit Forum

Inverted parabolic envelope

Type : envellope generation
References : Posted by James McCartney
Code :
dur = duration in samples
midlevel = amplitude at midpoint
beglevel = beginning and ending level (typically zero)

amp = midlevel - beglevel;

rdur = 1.0 / dur;
rdur2 = rdur * rdur;

level = beglevel;
slope = 4.0 * amp * (rdur - rdur2);
curve = -8.0 * amp * rdur2;


for (i=0; i level += slope;
slope += curve;


Added on : 11/04/02 by krakengore[ AT ]libero[ DOT ]it
Comment :
This parabola approximation seems more like a linear than a parab/expo envelope... or i'm mistaking something but i tryed everything and is only linear.

Added on : 13/04/02 by ex0r0x0r[ AT ]hotmail[ DOT ]com
Comment :
slope is linear, but 'slope' is a function of 'curve'. If you imagine you threw a ball upwards, think of 'curve' as the gravity, 'slope' as the vertical velocity, and 'level' as the vertical displacement.

Added on : 17/01/05 by asynth(at)io(dot)com
Comment :
This is not an approximation of a parabola, it IS a parabola.
This entry has become corrupted since it was first posted. Should be:

for (i=0; i<dur; ++i) {
    out = level;
    level += slope;
    slope += curve;

Add your own comment
Comments are displayed in fixed width, no HTML code allowed!


Are you human?

Site created and maintained by Bram
Graphic design by line.out | Server sponsered by fxpansion