[PD] multiple-curve ADSR

Phil Stone pkstone at ucdavis.edu
Thu May 17 21:19:28 CEST 2007


Greetings,

I have been working on envelopes lately, and I have come up with
something that I'd like to share. I started out with the basic ADSR in
Miller's examples; I wanted variable envelope curves, but I didn't want
the overhead of on-the-fly sqrt's or complex expr's. Therefore,
[multiCurveAdsr] uses table-lookup for enveloping, with just one
multiplication for level-scaling. The lookup table only needs to be
computed when the "curve factor" is changed.

Three basic curve types are possible. C (curve factor) = 1 gives the
basic linear envelope. C > 1 gives a continuous range of fatter,
"ead"-like envelopes. C < 1 is a special case; for any value of C less
than 1, you get one "quadric"-like, hollow curve. (I really like the
way this one sounds, by the way).

The math in the [pd makeTable] subpatch is not elegant -- I took an
empirical approach, tweaking things until I got the shapes I wanted --
but it works well enough. One little hitch I ran into was that sustain
level varied with different curve factors, so I made a corrective
subpatch that keeps sustain values consistent across the different
curves. This subpatch only comes into play when the sustain value or 
curve factor changes.

The right output emits 1 on attack, and 0 after release is complete. I
use this to switch~ the voice being enveloped, for further CPU-cycle
economy.

The help patch shows the effect of the different curve factors
graphically. I don't think there are any dependencies outside of
"Miller Vanilla" PD.

I use [multiCurveAdsr] for my own synthesis abstractions, and find that
it sounds pretty good, plus it's thrifty on CPU-usage, even with many
voices. I hope somebody else finds it useful. Any suggestions for
improvement will be greatly appreciated.



Phil Stone
Davis, CA




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: multiCurveAdsr.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070517/3425ca35/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: multiCurveAdsr-help.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070517/3425ca35/attachment.txt>


More information about the Pd-list mailing list