I am building a VU meter. Searching in the Internet and coming up with some things on my own, I ended up with the following circuit
First, there is an amplifier whose role is to give the VU meter the amplitude it needs to work. I put a voltage follower after that stage to isolate the input impedance of the VU meter from the amplifier. The thing I don't understand about the circuit is why the diode circled in red (D1) is there.
I built the circuit on a protoboard and checked what happened if the diode was not there. The result was that, with D1 connected as shown in the picture, some LEDs turned on steadily when the input signal was a sinusoid (i.e. constant amplitude and frequency); as I took D1 out, some of the LEDs that were on turned off. Apparently, the amplitude the VU meter was "recieving" was reduced.
I came to think that perhaps the diode is acting like a clamping diode, due to some research I did on the subject. Nevertheless, I'm not too sure about this and, even if it was correct, I don't know how clamping is related to this specific circuit.
What's D1's function? And how can the behaviour described above been explained (I mean, the fact that less LEDs turn on when D1 is not connected)?