[sdiy] Digital VU

Richie Burnett rburnett at richieburnett.co.uk
Thu Aug 3 20:44:33 CEST 2017


You can use simple 1st order IIR digital filters for the attack and decay "ballistics". Sure the cutoff frequency is very low compared to the sample rate, but you just need to make sure you keep track of the current filter state to a sufficient number of bits of resolution.

I would be wary of decimating. You might actually need to do some interpolation if you are to avoid missing peaks that occur at instants that are between samples. Search about "inter-sample overs".

You'll probably also want to do some sort of log approximation too, to make the display scale linear in dB. Or use exponentially spaced illumination thresholds for your LEDs.

-Richie,

Sent from my Xperia SP on O2

---- Tim Ressel wrote ----

>Hi,
>
>I'm looking at doing a VU meter in digital land. Sample the audio and do 
>all the work in code. I am wondering what is the best way to approach 
>the filtering. There needs to be a lowpass filter thingie with a very 
>low cutoff, which makes the ratio of cutoff to sample rate very small. 
>The obvious solution is to decimate the signal and get the sample rate 
>down to a reasonable number. My concern here is the lp filter is low 
>order and tails way out in frequency. Is decimation going to affect its 
>ability to display transients? Another approach is to have a huge FIR 
>filter, but we are talking lots of calculations per sample.\
>
>Any thoughts?
>
>-- 
>--Tim Ressel
>Circuit Abbey
>timr at circuitabbey.com
>
>_______________________________________________
>Synth-diy mailing list
>Synth-diy at synth-diy.org
>http://synth-diy.org/mailman/listinfo/synth-diy



More information about the Synth-diy mailing list