I used this circuit to generate a peak amplitude signal reference to compare to sine waveforms and trigger the output of the comparator to flash LED lights.
The input sine waveforms are audio signals filtered by a low pass filter under 200 Hz, so that the LED would flash according to the beats of a music, and the peak detector would make the circuit work for any volume and music style!