Abstract. A possible explanation for why audiophiles prefer vinyl: beats and other distortions due to not completely applying Nyquist's theorem.
Update 11/20/2023: Upon showing this to the big brain types who read Astral Codex Ten the concern described below may well be already taken care of by oversampling. It depends on how many delay lines there are in the Finite Impulse Response filter used for the upsampling. I have further research to do... (My prior research on oversampling didn't yield a good description of the process. The Internet has gotten better since then.) |
Snap! Crackle! Pop! The venerable LP is now outselling the compact disk. How did that happen? Vinyl records are subject to scratches. They take up space. They warp. They need to be flipped. The needle skips if you dance too close to your record player.
Some possible explanations:
Over the years I have seen quite a few explanations for why vinyl records might sound better:
Here, I am going to suggest another possible explanation: beats and other distortions from not fully applying Nyquist's Theorem.
Nyquist's sampling theorem states that if a signal is filtered so that there is nothing in the signal above the critical frequency, then it is possible to perfectly recreate the signal if you evenly sample the signal at two samples per period of the critical frequency. That is,
where $\Delta $ is the time between samples and${f}_{c}$ is the Nyquist critical frequency.
For example, if we set $\Delta $ to be 1, the cosine of the critical frequency is sampled as follows:
The green curve is the actual function. The red dots are the sampled values. Eyeballing the picture, one can envision an interpolation function which takes those points and converts them back into the original cosine function.
But what if we do a phase shift? Behold the sine of the same frequency!
How do you interpolate a bunch of zeroes into a sine wave? And what should be the magnitude of that wave? This question bugged me greatly when I first encountered Nyquist's sampling theorem many years ago.
The answer is: Nyquist's theorem applies below the critical frequency. So let's dial down the frequency to 97% of the critical frequency:
Hmmm, any kind of localized spline is going to produce some serious beats! And we see the same thing for the cosine:
The reason why we can theoretically recreate the original signal is that Nyquist's theorem uses a very nonlocal spline! From Numerical Recipes:
The weight function for the sample at time equals zero is:
This function is zero at all other the sample points, but in between it is nonzero and only drops off as $\frac{1}{t}.$ (And, by the way, in order to have a sine wave that is close to the Nyquist frequency, it needs to run a long time and die off gently in order for the envelope to not broaden the signal beyond the Nyquist frequency.)
I know of no analog filter that would get rid of the beat artifacts seen earlier — other than filtering out the signal as well. To truly recover the full signal requires applying sinc functions from quite a few points to interpolate between the samples.
How many? I haven't done the experiment. I would note that for audio, the amplitude of the signal can vary by orders of magnitude. Remember that we have bass note fundamentals mixed in with the high harmonics we are trying to recover. We might have to go out thousands or even tens of thousands of points before the series above converges sufficiently.
Update 11/20/2023: OK, my understanding reading magazine articles back in the day was that A/D converters generated a jaggy curve which was then filtered by an analog filter to take out the jaggies. Upon finally finding a resource on how oversampling works, maybe the Finite Impulse Response filter used for oversampling approximates the Nyquist formula sufficiently. I need to do more research. |
To strictly apply Nyquist's theorem, we should simply apply the convolution above to an entire track, to have at least one interpolated point between each sample point, and then have the analog filter working well outside the audible range. This is feasible for some types of players, this is not an acceptable solution for streaming. Exactly how much buffering would be required to up the quality of streaming audio is unknown at this point. I doubt that it is more than a second since the denominator hits the maximum range of a 16 bit integer in around 10,000 steps.
(And, by the way, computing over an entire track is an order$N\left(log\right(N\left)\right)$ job. I leave it as an exercise for the reader to figure out how.)
If these beats are only significant when we are close to the Nyquist limit, then the simple solution is to just have an analog filter that trims off the top of the theoretically recoverable signal and let those with high frequency hearing buy vinyl LPs.
Let's look at the plots for some lower frequencies and use our eyes to estimate where the need for digital interpolation ends.
It appears to me that we need to get down around half the Nyquist frequency before we have enough points that a local spline would recover something close to the original function. Exactly how well an analog filter would behave like such an interpolator is unknown to me.
But if I were to numerically interpolate, I would like to compute more than one point between each sample and then have the analog filter operate well outside the audible range.
I do not know what A/D chips are available for taking advantage of such an interpolated string of numbers.
Unless modern CD players are playing some tricks I don't know about, digital music introduces significant spurious beats for the entire top octave of human hearing.
Whether people can hear these beats is unknown to me. We are talking about a range that is just for upper harmonics, snare drums, and crickets. But I do seem to recall audiophiles using the term "harsh". And a rapidly varying envelope can be harsh.
Tags: music nyquist frequency audio compact disk
Bernard Baruch Carman on Nov 2, 2023 7:30 PM
i suppose the meaning for “won” here has merely to do with the concept that audiophiles prefer vinyl to digital. i’m certainly no audiophile, but merely an audio engineer whose ears might as well hear nails on a chalkboard to all the pops, ticks, and needle noise on vinyl, even with pricey equipment… but at least it sounds “warm” to them.
regarding quality of audio for the masses, we already know they don’t care. we know this not merely because of the digital streaming being the most popular method of listening to music. but also because low compression mp3 formats for digital audio are still being widely used. the more discerning music listener often chooses a higher quality digital format. i convert my CDs (which i still purchase) to the Apple lossless format in their Music app.
i cannot follow all the math you presented regarding Nyquist limits, etc. but i can share that for perhaps a couple decades now, many (if not most) multi-track pro recordings are sampled at a rate of 192kHz @ 24 or 32 bit depth. the final that many people hear is “CD quality” which is 44.1 @ 16 bit.
however, as time marches on more “audiophile” type 2-track mixes are being made available via digital means at higher rates, like 96kHz. and yes, earlier digital technology was not as good sounding as compared with advances over time, eliminating unwanted artifacts and these apparent “beats”.
ironically, there are various DAW plug-ins these days which actually introduce analog noise, for example tape wow & flutter and even the pops & ticks of vinyl noise. creators will occasionally use these tools on some instrument tracks for a specific effect.
so sure, vinyl may be the audiophile favorite temporary. however, digital ultimately “wins”, not only for the masses who don’t necessarily care about sound quality to that degree, but also for audiophiles with such good ears who can enjoy the extra depth of sound from the higher sampled digital formats.
for my ears, i’m quite happy with the 44.1 @ 16 bit “CD quality” format, which i convert to a lossless format allowing me to have my entire CD collection on my phone. to me, that one aspect of the matter trumps any physical format.
regardless, i’m glad music listeners have a choice! 8-)
Carl Milsted, Jr on Nov 2, 2023 7:40 PM
in response to
comment_103_1
One of my points is that digital can match vinyl if it is indeed a quality issue. However, for digital to do so, either the sampling rate needs to be at least doubled over CDs or the CD data needs to be interpolated according to Nyquist's theorem.
What I need to do is to get the CD version of some my my Environments records and compare how the CD version sounds compared to my vinyl versions.
Not sure either of us is a good tester for this. Age reduces high frequency response. Back in grad school I could hear the flyback transformers on cathode ray tube monitors. Some could give me a headache. I don't have an old VT52 monitor to test if my hearing still goes that high.
Carl Milsted, Jr on Nov 2, 2023 7:43 PM
And, of course, I'd rather listen to 50s rock on an AM radio than today's Autotuned to death crooners. As far as vocalists are concerned, we have sunk back to the days of hand cranked 78s.
Bernard Baruch Carman on Nov 5, 2023 12:28 AM
in response to
comment_103_3
yet another reason why i don't listen to pop. ;-)
Carl Milsted, Jr on Nov 20, 2023 2:12 PM
OK, after discussing the issue on the Astral Codex Ten substack, I may be mistaken as to how well CD players reconstruct the signal. If they use a deep enough Finite Impulse Response digital filter, then they are approximating the sinc function mentioned in this article.
It would be interesting to know how much digital signal processing is done on modern CD players -- as well as older players.
If I understand the terminology correctly, the number of times oversampling is not enough information to know.
You must be logged in to comment