calculation of adsr from envelope
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.