Adding decay (fall-off) to comparator circuit
To complement Wouter's answer here is another option.
If you want to avoid the diode drop that occurs with a passive peak detector, then you can use an active peak detector:



We can see in the simulation the full peak voltage is present blue is the input, the green output):



If there is significant load on the output, then you will probably want to add a buffer (a dual opamp would be good for the complete circuit)