I would like to filter an audio signal (line level) for input into an Arduino analog input, in order to detect the approximate level of signal (loudness). I'm thinking to sample this on the order of every 10 ms, to detect loud sound peaks i software and take some appropriate actions (flash "lighting" to match audio thunder).
I am not trying to record or reproduce the audio, just detect approximately how loud it is, about 100 times per second.
I also need to not distort the input audio (which is between a sound source and an amplifier input).
I'm thinking of a circuit something like this. Am I on the right track? Pointers, or tips?
Thoughts: Op Amp to isolate and amplify, diode to rectify, capacitors and series resistors for low pass, bleed resistor to discharge capacitor. I suspect this is naive, and could use some help.
One other alternative was to just sample frequently and then average, but that would eat a lot of processor time (and would be stalled while busy controlling an LED strip). So in a sense this is just trying to use some external analog circuitry to reduce the processor load.
(what I would probably do is average the square of each sample-512, if the signal is biased at VCC/2, which is closer to giving the energy of the signal).
Any thoughts on the tradeoffs between these two approaches (analog filtering and digital filtering)? Or other circuit tips?