Has anyone seen a clever way to generate a logic bit at the end of the the decay phase in an ADSR? A difference amplifier with comparator comes to mind. I wonder if I am missing something obvious? Thank you. The application is a simple set of 4 LEDs, one each for A,D,S,R.