> cool, but I only see 1 exponential parameter for all lines.
 
then look closer ;-) the shape given as creation argument applies to all segments, but you can also set the shape for each segment, e.g.: sending [100 exp 4( to the third inlet will create a 100 ms decay segment with a fast rising exponential curve.
 
> and its minimum value is "1".
 
it certainly isn't, "exp -4" works as expected.
 
Christof
 
Gesendet: Sonntag, 14. Juli 2019 um 01:40 Uhr
Von: "Alexandre Torres Porres" <porres@gmail.com>
An: "Christof Ressi" <christof.ressi@gmx.at>
Cc: Pd-List <pd-list@lists.iem.at>
Betreff: Re: Re: [PD] best non linear envelope design?
 
 
Em sáb, 13 de jul de 2019 às 05:40, Christof Ressi <christof.ressi@gmx.at> escreveu:
Hey,
 
> I actually know of two other adsr envelopes out there for Pd, both non linear, they are: bsaylor/aenv~ and creb/eadsr~ - both are hardcoded.
 
attached you'll find my own personal envelope generator (cadsr~) which allows you to set the shape individually for each segments.
 
cool, but I only see 1 exponential parameter for all lines.
 
Exponential segments take another argument to control the shape ( >0 fast rise, <0 slow rise).
 
and its minimum value is "1".
 
 
For a "natural" envelope generator, like those found in analog synthesizers, you can use a 1-pole lowpass filter and change the frequency for each segment to emulate the behavior of a capacitor.
 
I see, makes total sense.
 
with 5 time constants, the envelope generator will reach 99.3% of the target value. Note that the target value is always approached asymptotically and - at least in theory - never fully reached.
 
I see, so that's what asymptotic means then. The bsaylor/aenv~ object says it's asymtotic, so I bet it uses the same 1-pole design (I'm yet to check the code). Anyway, I was able to make envgen~ get to a pretty close curvature to your patch with a time value of "5". I used an exponential value of 4 and that did fit reasonably well. I don't thin the difference is perceivable in any significant way. So I guess I'm going with that approach to the design of my hardcoded adsr~ exponential setting.
 
Thanks