Electronic – calculation of adsr from envelope

audiomanufacturing

In audio synthesis, we have ADSR envelope;

enter image description here

Now, let us say I wanted to detect A,D,S and R given a signal. We can determine the beginning and end of relevant signal with a simple gate, and find the envelope with an envelope follower. My proposed solution for detecting everything else is look for critical points (first/second derivative test) of the envelope.

Is this a possible/the best solution? What is a ballpark price estimate for 10 units of an IC that will do this? 100 units?

Many thanks in advance

Joe

Best Answer

Pass the signal through an envelope detector, and differentiate the envelope, either electronically, or in software. The four periods should show as a positive level (Attack), a negative (Decay), (near) zero (Sustain), and again negative (Release).

Telling how much a solution will cost is not possible unless you tell us what you want to do with the result. Do you want to log the 4 time values? Display them? In those cases you'll need a microcontroller anyway, and then you can do the differentiation in software, that would save you a few cents. The envelope detector is a (precision) diode, a capacitor, and a resistor.
AFAIK that's the most application-specific you can go for these low quantities. The microcontroller will cost you anything between a few tens of cents and a few dollar. If you need a display the sky is the limit.

edit
Since you only want to log the data connect an EEPROM to the microcontroller (maybe it has storage available on-chip) and provide a serial interface to a PC.