Envelopes

For general discussion related FlowStone
Post Reply
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Envelopes

Post by tulamide »

Here comes another so basic question, that it will be probably very hard for you to answer it in a way I understand :lol:

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)
"There lies the dog buried" (German saying translated literally)
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Envelopes

Post by MyCo »

The release is handled like attack and decay, so it's in samples. The only difference is, that attack and decay are calculated in the first hop section and release is calculated in the second hop section.
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Envelopes

Post by tulamide »

MyCo wrote:The release is handled like attack and decay, so it's in samples. The only difference is, that attack and decay are calculated in the first hop section and release is calculated in the second hop section.

I know.
That's why I didn't ask about release. I asked about sustain ;)
"There lies the dog buried" (German saying translated literally)
adamszabo
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Envelopes

Post by adamszabo »

Sustain is not really a measure as a variable of time, since its always constant as long as you hold down a note. The synth wont know how long you will keep holding down a note no? ;)
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Envelopes

Post by KG_is_back »

Sustain can be a little misleading. The knob does not control any time parameter (unlike A D and R). It controls a level (volume). During Attack phase, the volume rises from 0 to 1. During the decay, the volume drops from 1 to S (S being the volume set by sustain knob). Finally during release the volume drops from S level to zero.

Sustain level shouldn't affect the length of decay or release - it only affects the steepness of the drop (since the level has to "drop" more for low sustain value and less for higher sustain value and vice versa for the release)
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Envelopes

Post by tulamide »

Thank you both! I don't know exactly where I was taking the wrong path - but you both are of course totally right :oops:

(If I think of all the envelopes I've set up in all those years - why could I even ask? Maybe I was just overly tired)
"There lies the dog buried" (German saying translated literally)
Post Reply