[sdiy] Digital VU
ben.pi.bradley at gmail.com
Fri Aug 4 04:19:44 CEST 2017
I did it again, folks, I "posted" to the original poster rather than
the list. That may be an intentional list "feature" but I much prefer
the list itself be the default reply rather than the OP. Here's what I
sent to Tim four hours ago:
There's a lot of details left out of this conversation, so excuse me
if you're already thinking along these lines, but I'd think peak hold
should be the highest level of every sample (within the last
half-second or however long you want it to hold) before filtering.
This gives the most useful value of "how close am I to clipping?" The
average/RMS/whatnot levels are useful, especially if you're used to
the response of old-fashioned analog meters, but it seems to me the
"VU meter" standard was to give a consistent response between
different devices, even though they were all known to be imperfect and
less than theoretically possible, but a good compromise at the time.
The original "VU meter standard" specified copper oxide rectifiers!
Nowadays you can make the attack and rolloff of these values just
about whatever you want them to be.
So the meter response and whatnot may be partly determined by
who is going to use it. The problem with an average (or RMS, anything
integrated over time) level is it won't show when a short peak goes to
clipping, so (IMHO) you need to show peak at the same time, perhaps as
a single lighted LED above the LED-bar average level.
For the filtering, a leaky integrator might be what you want. It can
do low-pass filtering at cutoff frequencies orders of magnitude below
the sample rate, yet takes a whole lot less computation (basically a
single MAC operation per sample) than other methods. Offhand (meaning
I haven't actually thought this through), I'd think you could do two
or three in cascade with leak constants adjusted to get a faster
rolloff slope and still properly detect the lowest frequencies.
More information about the Synth-diy