Home Forums Sparkfun MP3 Shield Library Support Forum Reading Sound Volumes Reply To: Reading Sound Volumes

#1818

The cumulative patch .053 provide a VU meter feature. I have just added some functions to access it along with an Example command “V”. In the current pre-release version on my github

VU Meter
SCI_STATUS bit 9 enables VU meter, which calculates the peak sample value from both
channels and returns the values in 3 dB resolution through SCI_AICTRL3. The high 8
bits represent the left channel, the low 8 bits the right channel.
Values from 0 to 31 are valid for both channels.
The VU meter takes about 0.2MHz of processing power with 48 kHz samplerate.
Received command: 4
Playing: …
Enter 1-9,s,d,+,-,i,>,<,p,R,t,m,M,g,h,O,o,D,S,V :
Received command: V
VU meter = 1
Hit Any key to stop.
VU: L = 1 / R = 1 dB
VU: L = 1 / R = 1 dB
VU: L = 13 / R = 13 dB
VU: L = 11 / R = 14 dB
VU: L = 16 / R = 19 dB
VU: L = 15 / R = 18 dB
VU: L = 19 / R = 21 dB
VU: L = 20 / R = 21 dB
VU: L = 19 / R = 23 dB
VU: L = 22 / R = 19 dB
VU meter = 0
Enter 1-9,s,d,+,-,i,>,<,p,R,t,m,M,g,h,O,o,D,S,V :
Noting the Sensitivity is only 3dB and time averaged. It is not great at detecting peaks. I also see that it is measuring from before the output amplifier stage. So changing the volume does not affect it. You can see this while doing the SineWav Test at different Volumes.

Aside from this there is a Spectrum Analyzer plugin that can report bands.