[sdiy] VU meter algorithms
rburnett at richieburnett.co.uk
rburnett at richieburnett.co.uk
Wed Mar 20 12:35:14 CET 2019
> rsdio at audiobanshee.com wrote:
>
> ...Thus, I see the Nyquist frequency as a limit that you can approach,
> but you can never actually reach it. At the very least, you can’t
> expect full amplitude at the Nyquist frequency.
Yes, I agree. You can't have a flat magnitude response up to the
Nyquist frequency and then infinite attenuation just 0.00001Hz beyond
it. So you either have to start rolling off any practical filter before
the Nyquist frequency and accept some pass-band rolloff, or move the
cutoff frequency up and accept some aliasing distortion (for an ADC,) or
imaging distortion (for a DAC.) The choice depending on which artefact
is considered to be the lesser of two evils in that particular
application.
> On your final point, Richie, I’d like to point out that there is
> always subsequent filtering. Any time you run a digital signal through
> a DAC, you need a reconstruction filter. That analog filter can
> produce voltages beyond the range of the DAC. The best DAC products
> run the analog power supply at least a few volts beyond the DAC power
> supply to allow headroom for the reconstruction filter. Certainly not
> all DAC circuits are this well designed, though.
>
> In my estimation, digital signal processing that never gets turned
> back into an analog signal at the end is kinda pointless. At least I
> can’t think of an example.
Yes, I totally agree. I guess what I was trying to get convey is that
the "inter-sample overs" problem can be thought of as a "playback
problem". So if I am a digital radio broadcaster I could rightly or
wrongly decide to not care about inter-sample overs, because they might
or might not result in clipping in any given implementation of a digital
radio receiver. After all, no clipping happened on the samples that *I*
made at *my end*. But I agree that it is highly likely that critically
sampled loud signals would clip when converted back into the
continuous-time domain. And there is obviously much talk about the
significance of inter-sample overs in online forums about mastering.
Regarding the bad implementation of peak hold functionality in digital
level meters in your other email.... I have also seem many
implementations where a slightly smaller signal peak is able to sneak
through unregistered if it falls within the hold time of a previous
larger peak. I also agree that it is wrong. However, I think this
implementation persists because it is so much easier to do than setting
up a ring buffer and keeping track of the current largest member in that
data set. I've seen various optimisations involving decimation and
binary searches proposed, but either way, it is more complicated than
just fudging it and hoping nobody will notice :-s
I've got my own personal favourite way of doing the peak hold thing on
LED bargraph displays but this is already a fairly lengthy email, so I
won't make it any longer with an explanation unless anyone is actually
interested.
-Richie,
More information about the Synth-diy
mailing list