the Basics of Digital and Analog Audio

Jul 9, 2024 at 10:40 AM Thread Starter Post #1 of 171

Sha1rholder

Head-Fier
Joined
Oct 16, 2023
Posts
51
Likes
85
Location
Hangzhou, Zhejiang, China

Digitization of Sound​

Sound is vibration. On modern digital media, sound is stored as a waveform signal represented by discrete sampling points. Real sound signals are continuous, while digital audio signals are discrete, leading to inevitable information loss during recording.

r/headphones - discrete sampling
discrete sampling

Most digital audio is stored as Pulse Code Modulation (PCM). PCM involves high-frequency sampling of vibrations relative to a reference position. Each sampling point can take integer values between 0 and 2bit depth - 1.

PCM has two properties: bit depth and sampling rate. Bit depth determines the precision of the amplitude scale (y-axis), affecting dynamic range. The sampling rate determines the precision of the time scale (x-axis), affecting bandwidth. Higher sampling rates and bit depths of PCM result in better sound quality.

r/headphones - PCM
PCM

Direct Stream Digital (DSD) is a digital audio storage format with better sound quality than PCM. DSD quantizes the original analog audio signal into 1-bit digital audio at a much higher sampling rate than PCM. Each sampling point takes two values, + and -, indicating whether the current vibration position is "advancing" or "retreating" relative to the previous position. Higher sampling rates of DSD result in better sound quality.

r/headphones - PCM vs DSD
PCM vs DSD

Similar to how a single eye cannot accurately judge the position of an object, a single audio channel cannot create a sense of space. When played back through headphones, single-channel audio can cause In-Head Localization Effect, leading to dizziness. Therefore, many audio recordings have two or more channels.

The number of channels indicates the number of positions from which the sound is recorded (or pretends to be recorded). Theoretically, multichannel audio can produce better sense of space with properly placed speakers.

Producing spatial audio requires at least two channels, aka stereo system. Most music has and only has two channels, and all standard headphones are stereo systems. Audio with more channels is more commonly used in movies and video games, which require higher spatial perception. Stereo Systems like headphones require "downmix" to replay multichannel audio, which indicates mixing multichannel audio into stereo sound through algorithm. Both PCM and DSD can store multichannel audio as multiple independent tracks.

r/headphones - 9.1 multichannel
9.1 multichannel

Converting an analog signal to a digital signal requires Analog-to-Digital Conversion (ADC), and converting a digital signal to an analog signal requires Digital-to-Analog Conversion (DAC). DAC is essential for playing digital audio.

Storage of Digital Audio​

PCM and DSD are types of digital audio, not file formats. In practice, digital audio is often compressed into specific file formats using specific encoding schemes to balance file size and quality. Compression can be lossless or lossy, depending on whether the compression process is reversible and whether any data is lost. Generally, in terms of sound quality: Uncompressed = Lossless > Lossy. In terms of file size: Uncompressed > Lossless > Lossy.

r/headphones - audio formats
audio formats

Common formats for PCM audio files include wav and aiff, which do not compress audio data, resulting in larger file sizes. Lossless compression formats for PCM include flac and alac, which reduce file size without losing sound quality. Lossy compression formats for PCM include mp3, aac, and ogg, which further reduce file size but at the expense of sound quality. Some audio file formats, such as flac, can store metadata like cover art, lyrics, and album information, etc.

r/headphones - metadata
metadata

The improvement of DAC, the fact that bandwidth and network traffic has become one of the crucial costs and the bottleneck of streaming media, and copyright protection has now gained more attention, together led to the creation of Master Quality Authenticated (MQA), a highly compressed audio encoding format compatible with CD format. MQA compresses flac files by "folding" the original PCM lossily, attempting to store higher quality audio at lower bitrates, with some mechanisms to protect file copyright. Thus, it used to be favored by streaming services like Tidal.

However, complete unfolding of MQA files requires supported MQA decoders, otherwise, sound quality is further compromised. The principle that "Lossless > Lossy" still applies to MQA. Currently, with MQA's parent company going bankrupt, various music platforms and producers are now abandoning it.

r/headphones - garbage
garbage

Common formats for DSD audio files include dsf and dff. DSD files are usually much larger than PCM files and require better production and decoder, making them much less common than PCM. However, DSD can theoretically provide an extremely high sound quality.

r/headphones - DSD
DSD

Digital audio can also be stored and played using physical media like CD and SACD. CD uses the 16 bit/44100 Hz stereo PCM format and is the most common physical audio carrier. SACD (Super Audio CD) is a higher quality digital audio carrier that supports up to six channels. SACD carries high quality DSD, but is backward compatible with regular CD. SACD has copyright protection features and can only play DSD on SACD-compatible machines. Ordinary CD players can only read the CD layer, but SACD players usually also support playing regular CD. Through "ripping", CDs and SACDs can be losslessly converted to PCM or DSD files.

r/headphones - sacd
sacd

Analog Audio​

Analog audio is a very old storage format. It stores sound in the form of an analog signal, avoiding discrete sampling of sound. Vinyl records and tapes are two common carriers of analog audio. Both have relatively poor stability and higher background noise compared with digital medias, but they still have a market among audiophiles.

Vinyl records use mechanical engravings to record sound. The sound signal is converted into spiral grooves carved on the record's surface by a cutting knife. During playback, the stylus travels along the grooves, converting mechanical vibrations into electrical signals, which are then restored to sound through the sound system.

r/headphones - vinyl
vinyl

Tapes use magnetic materials to record sound signals and come in reel-to-reel and cassette tape forms. Reel-to-reel tapes were typically used in professional recording and production fields, offering higher sound quality and longer lifespan. Cassette tapes were widely used in consumer electronics markets and were popular in the 70s to 90s due to their portability.

r/headphones - Sony Walkman
Sony Walkman

Analog audio does not require DAC but needs corresponding analog audio equipment, such as turntables and tape players to play.
 

Attachments

  • walkman.jpeg
    walkman.jpeg
    652.2 KB · Views: 0
Last edited:
Jul 9, 2024 at 10:58 AM Post #2 of 171

Digitization of Sound​

Sound is vibration. On modern digital media, sound is stored as a waveform signal represented by discrete sampling points. Real sound signals are continuous, while digital audio signals are discrete, leading to inevitable information loss during recording.

r/headphones - discrete sampling
discrete sampling

Most digital audio is stored as Pulse Code Modulation (PCM). PCM involves high-frequency sampling of vibrations relative to a reference position. Each sampling point can take integer values between 0 and 2bit depth - 1.

PCM has two properties: bit depth and sampling rate. Bit depth determines the precision of the amplitude scale (y-axis), affecting dynamic range. The sampling rate determines the precision of the time scale (x-axis), affecting bandwidth. Higher sampling rates and bit depths of PCM result in better sound quality.

r/headphones - PCM
PCM

Direct Stream Digital (DSD) is a digital audio storage format with better sound quality than PCM. DSD quantizes the original analog audio signal into 1-bit digital audio at a much higher sampling rate than PCM. Each sampling point takes two values, + and -, indicating whether the current vibration position is "advancing" or "retreating" relative to the previous position. Higher sampling rates of DSD result in better sound quality.

r/headphones - PCM vs DSD
PCM vs DSD

Similar to how a single eye cannot accurately judge the position of an object, a single audio channel cannot create a sense of space. When played back through headphones, single-channel audio can cause In-Head Localization Effect, leading to dizziness. Therefore, many audio recordings have two or more channels.

The number of channels indicates the number of positions from which the sound is recorded (or pretends to be recorded). Theoretically, multichannel audio can produce better sense of space with properly placed speakers.

Producing spatial audio requires at least two channels, aka stereo system. Most music has and only has two channels, and all standard headphones are stereo systems. Audio with more channels is more commonly used in movies and video games, which require higher spatial perception. Stereo Systems like headphones require "downmix" to replay multichannel audio, which indicates mixing multichannel audio into stereo sound through algorithm. Both PCM and DSD can store multichannel audio as multiple independent tracks.

r/headphones - 9.1 multichannel
9.1 multichannel

Converting an analog signal to a digital signal requires Analog-to-Digital Conversion (ADC), and converting a digital signal to an analog signal requires Digital-to-Analog Conversion (DAC). DAC is essential for playing digital audio.

Storage of Digital Audio​

PCM and DSD are types of digital audio, not file formats. In practice, digital audio is often compressed into specific file formats using specific encoding schemes to balance file size and quality. Compression can be lossless or lossy, depending on whether the compression process is reversible and whether any data is lost. Generally, in terms of sound quality: Uncompressed = Lossless > Lossy. In terms of file size: Uncompressed > Lossless > Lossy.

r/headphones - audio formats
audio formats

Common formats for PCM audio files include wav and aiff, which do not compress audio data, resulting in larger file sizes. Lossless compression formats for PCM include flac and alac, which reduce file size without losing sound quality. Lossy compression formats for PCM include mp3, aac, and ogg, which further reduce file size but at the expense of sound quality. Some audio file formats, such as flac, can store metadata like cover art, lyrics, and album information, etc.

r/headphones - metadata
metadata

The improvement of DAC, the fact that bandwidth and network traffic has become one of the crucial costs and the bottleneck of streaming media, and copyright protection has now gained more attention, together led to the creation of Master Quality Authenticated (MQA), a highly compressed audio encoding format compatible with CD format. MQA compresses flac files by "folding" the original PCM lossily, attempting to store higher quality audio at lower bitrates, with some mechanisms to protect file copyright. Thus, it used to be favored by streaming services like Tidal.

However, complete unfolding of MQA files requires supported MQA decoders, otherwise, sound quality is further compromised. The principle that "Lossless > Lossy" still applies to MQA. Currently, with MQA's parent company going bankrupt, various music platforms and producers are now abandoning it.

r/headphones - garbage
garbage

Common formats for DSD audio files include dsf and dff. DSD files are usually much larger than PCM files and require better production and decoder, making them much less common than PCM. However, DSD can theoretically provide an extremely high sound quality.

r/headphones - DSD
DSD

Digital audio can also be stored and played using physical media like CD and SACD. CD uses the 16 bit/44100 Hz stereo PCM format and is the most common physical audio carrier. SACD (Super Audio CD) is a higher quality digital audio carrier that supports up to six channels. SACD carries high quality DSD, but is backward compatible with regular CD. SACD has copyright protection features and can only play DSD on SACD-compatible machines. Ordinary CD players can only read the CD layer, but SACD players usually also support playing regular CD. Through "ripping", CDs and SACDs can be losslessly converted to PCM or DSD files.

r/headphones - sacd
sacd

Analog Audio​

Analog audio is a very old storage format. It stores sound in the form of an analog signal, avoiding discrete sampling of sound. Theoretically, it has infinite information and bandwidth. Vinyl records and tapes are two common carriers of analog audio. Both have relatively poor stability and higher background noise compared with digital medias, but they still have a market among audiophiles.

Vinyl records use mechanical engravings to record sound. The sound signal is converted into spiral grooves carved on the record's surface by a cutting knife. During playback, the stylus travels along the grooves, converting mechanical vibrations into electrical signals, which are then restored to sound through the sound system.

r/headphones - vinyl
vinyl

Tapes use magnetic materials to record sound signals and come in reel-to-reel and cassette tape forms. Reel-to-reel tapes were typically used in professional recording and production fields, offering higher sound quality and longer lifespan. Cassette tapes were widely used in consumer electronics markets and were popular in the 70s to 90s due to their portability.

r/headphones - Sony Walkmanwalkman.jpeg
Sony Walkman

Analog audio does not require DAC but needs corresponding analog audio equipment, such as turntables and tape players to play.
Uh-huh. What is your point?

Analog audio is a very old storage format. It stores sound in the form of an analog signal, avoiding discrete sampling of sound. Theoretically, it has infinite information and bandwidth.
What theory are you talking about? Theoretically cows can fly.
 
Jul 9, 2024 at 11:03 AM Post #3 of 171
Jul 9, 2024 at 11:11 AM Post #4 of 171
Last edited:
Jul 9, 2024 at 11:27 AM Post #6 of 171
Well... I've tried to keep it precise. I said "analog signals" are "theoretically XXX" but had avoided saying vinyl and types are XXX.
It is still a false claim.
 
Jul 9, 2024 at 11:52 AM Post #7 of 171
Real sound signals are continuous, while digital audio signals are discrete, leading to inevitable information loss during recording.
Analog recording requires a transformation that is also losing information. In practice, analog recordings were very much limited by the physical constraints of the medium starting with speed(affecting at least noise and bandwidth directly), and that both while recording and playing it back.

Theoretically, it has infinite information and bandwidth.
Same thing. It does not! Any analog recording solution has limited speed, dynamic and precision. So I agree with @Leporello, this is clearly incorrect.

Each sampling point can take integer values between 0 and 2bit depth - 1.
I don't get what the bolded part means?







I give you bonus points for Furina and Migi.
 
Jul 9, 2024 at 3:47 PM Post #11 of 171
Direct Stream Digital (DSD) is a digital audio storage format with better sound quality than PCM.
44.1 kHz 16 bit PCM is audibly transparent (audibly perfect). Audibly better than audibly transparent is not possible, so DSD can not be audibly better than 44.1 kHz 16 bit PCM.
From a technical viewpoint: as an audio storage format DSD is highly inefficient, a waste of space.
(DSD was invented to backup analog tapes to digital and at that time it was easy to convert analog tapes to DSD, or something like that. Later someone at Sony got the idea to market DSD as a higher resolution format. And with that they changed their own story. First Sony (correctly) claimed that the CD (and hence 44.1 kHz 16 bit PCM) was audibly perfect, and later they (falsely) claimed the contrary to create a fictitious reason for people to need/want SA-CDs and SA-CD players.)

If you think you hear different sound listening to some music title in DSD compared to the same title in 44.1 kHz 16 bit PCM then one of the following is probably the case:
1. You are comparing different masters.
2. You didn't properly level-match (should be less than 0.1 dB difference).
3. Your DAC doesn't properly convert one or both of the formats (your DAC is not audibly transparent for one or both of the formats, or your DAC produces erronous ultrasonic signals with one (or different with both) of the formats and something in your playback chain (for example the speakers or headphones) is producing audible intermodulation distortion as a result of that).
4. The DSD version actually contains inaudible ultra sonic content and something in your playback chain (for example the speakers or headphones) is producing audible intermodulation distortion as a result of that.
5, Expectation bias or some other form of bias or perceptual error.
 
Jul 9, 2024 at 4:37 PM Post #12 of 171
Real sound signals are continuous, while digital audio signals are discrete, leading to inevitable information loss during recording.

You mean digitizing, and it's still wrong. An analog signal can be reproduced perfectly accurately by a DAC as long as the signal was band limited. All the information is there. The only "quality" factor will be noise related to quantization error, which will be exceedingly low and uncorrelated with the signal if dither is used to produce the final file (and it virtually always is if the file is meant for listening as opposed to production).


Higher sampling rates and bit depths of PCM result in better sound quality.

Not exactly. The sample rate determines the highest frequency that can be encoded (half the sample frequency), while the number of bits determines the depth of the noise floor. A lower noise floor is good, of course, but 16-bit is plenty low for listening purposes. As for the sample rate, if it was really low, like 10 KHz, you'd only be able to reproduce an analog signal up to 5 KHz, and that would sound pretty awful for music. CD-quality sound has a sample rate of 44.1 KHz, enough to handle the entire range of human hearing without a problem.

So what you're saying is true in an exteme case. A 4-bit signal with an 8 KHz sample rate would sound like a really bad phone call. But as you increase those values, you get to a point where it doesn't matter anymore. A 16-bit signal with a 44.1 KHz sample rate sounds about as good as it can possibly get and then some (provided the original analog signal was recorded well, of course).


Higher sampling rates of DSD result in better sound quality.

No. DSD effectively compensates for using only 1-bit by using a very high number of samples. You could hypothetically use 1-bit samples with PCM at a much lower rate and still reproduce the analog signal as long as you adhere to Nyquist-Shannon, but the quantization error would be much too high to be listenable. I mention it just to illustrate the different approaches. PCM can reproduce the analog signal perfectly accurately, and a sufficient bit depth (16 is plenty) keeps the noise floor low enough to be inaudible under anything resembling normal conditions. Basically, DSD doesn't gain us anything.

I've never bothered to dig too deeply into DSD's marketing because it seems very much like a solution in search of a problem.

Ultimately DSD isn't going to produce sound any better (or worse) than PCM. Any differences noticed are going to be down to things like using different masters, as @sander99 notes above.


Similar to how a single eye cannot accurately judge the position of an object, a single audio channel cannot create a sense of space. When played back through headphones, single-channel audio can cause In-Head Localization Effect, leading to dizziness. Therefore, many audio recordings have two or more channels.

No idea where this is coming from. To my knowledge, stereo was not created for headphones, and I've certainly never heard of anyone having an issue with mono recordings. If anything, stereo tends to be problematic for headphones, especially for older recordings where instruments were commonly hard-panned to one side. This is why things like cross-feed exist.


Lossy compression formats for PCM include mp3, aac, and ogg, which further reduce file size but at the expense of sound quality.

Sort of. What is meant by "sound quality" here? If we mean transparency -- the inability to tell the difference between the lossy file and the uncompressed original -- then a lossy file can have the same "quality" as the original, provided the bit rate is high enough and a quality, modern encoder is used.


SACD carries high quality DSD, but is backward compatible with regular CD.

No, it isn't. Commonly SACDs are sold as hybrid CDs, meaning there's a CD layer and an SACD layer. A CD player will read the former, while an SACD player will read the latter.

However, some SACDs are not hybrid and can only be played in an SACD player. (I had one of these -- Peter Gabriel's "Passion" -- back when I fell for the marketing and thought I wanted to build an SACD collection. I've since sold it.)
 
Last edited:
Jul 9, 2024 at 5:25 PM Post #14 of 171
We are going through the same basic stuff regarding digital and analog audio over and over again... :rolling_eyes:

There is always someone new (or old) here claiming the superiority of analog audio or the superiority of hi-res/DSD compared to CD quality etc. It gets tiring to explain the same fundamental things again and again and then "debate" about them as if they weren't established facts...
 
Jul 9, 2024 at 6:49 PM Post #15 of 171
It gets tiring to explain the same fundamental things again and again and then "debate" about them as if they weren't established facts...

Yep, and I say that as someone who usually lurks. Worse, this thread is titled like it'll be educational, but the same old misunderstandings (if I'm being charitable) are all there, along with one or two new ones. A pinned post that actually covers the basics of digital and analog audio would be useful.
 
Last edited:

Users who are viewing this thread

Back
Top