Envelopes
Posted: Sat Nov 07, 2015 8:33 pm
Here comes another so basic question, that it will be probably very hard for you to answer it in a way I understand
I was wondering how the standard ADSR envelope is working. I found out that A, D and R range from 0 to 4 times the sample rate. In other words, 0 to 4 seconds. That's cool, because I can now use this as a template for other values (5, 7, 10 secondes or whatever).
Unfortunately this system breaks with the sustain value. On most synths I use, the sustain is just as well expressed in time values (either seconds or note lengths, just like A, D and R).
In FS standard envelope there is no time information for sustain, but it ranges from 0 to 1. Also I can't find it referenced anywhere else than in these 2 lines (variable "s"):
So , sustain seems to influence the decay directly and later on it replaces val depending on the stage count with a constant value (since "s" is a fixed value)
How do I calculate the real lengths for d and s in seconds, and is there a way for s to act in the same way as a, d and r (= being calculated based on x*samplerate)?
EDIT: Corrected "brakes" into "breaks" (although it's funny imagining the system braking)
I was wondering how the standard ADSR envelope is working. I found out that A, D and R range from 0 to 4 times the sample rate. In other words, 0 to 4 seconds. That's cool, because I can now use this as a template for other values (5, 7, 10 secondes or whatever).
Unfortunately this system breaks with the sustain value. On most synths I use, the sustain is just as well expressed in time values (either seconds or note lengths, just like A, D and R).
In FS standard envelope there is no time information for sustain, but it ranges from 0 to 1. Also I can't find it referenced anywhere else than in these 2 lines (variable "s"):
Code: Select all
...
dStep = 16/d * (1-s);
...
val = (stage==2)&s + (stage!=2)&val;
...So , sustain seems to influence the decay directly and later on it replaces val depending on the stage count with a constant value (since "s" is a fixed value)
How do I calculate the real lengths for d and s in seconds, and is there a way for s to act in the same way as a, d and r (= being calculated based on x*samplerate)?
EDIT: Corrected "brakes" into "breaks" (although it's funny imagining the system braking)