[PD] [multiCurveAdsr] v.2

Claude Heiland-Allen claudiusmaximus at goto10.org
Sat May 19 21:20:24 CEST 2007


Frank Barknecht wrote:
> Hallo,
> Phil Stone hat gesagt: // Phil Stone wrote:
> 
>> It would be pretty easy to modify this to have a separate C (curve) 
>> parameter for attack and decay/release (or even separate C's for decay 
>> and release as well, if one were so inclined).  
> 
> Actually I believe that it's not that easy at all, if you want to get
> retriggered envelopes right. If you need to enter a release
> phase with a concave curve, while your still in an attacke phase with
> a convex curve, it's tricky to do this in a clickless way
> 
> Ciao

Agreed, and given that an abstraction I made for something similar using 
fexpr~ used 20% of my CPU for just one instance, I went the C route and 
made my first DSP external, which is around 10 times faster.

Source code here:

https://devel.goto10.org/listing.php?repname=maximus&path=%2Fanalogue%2F&rev=0&sc=0

It operates completely in the signal domain.

inlets:
~ trigger (rising edge triggers attack, falling edge triggers release)
~ attack time
~ peak level
~ decay time
~ sustain level
~ release time
~ threshold (when the output rises above the threshold (values just 
below 1 work best), the mode switches from attack to decay+sustain)

output:
~ curved envelope (true exponential decay shapes for all phases, as 
documented here: 
http://www.music.mcgill.ca/~gary/306/week11/envelopes.html )


Claude
-- 
http://claudiusmaximus.goto10.org




More information about the Pd-list mailing list