A concise explanation of digital vs. analog?

Discussions about anything analog, digital, MIDI, synth technology, techniques, theories and more.
User avatar
madtheory
Supporting Member!
Supporting Member!
Posts: 5429
Joined: Mon May 01, 2006 12:45 pm
Real name: Tomas Mulcahy
Gear: Wurlitzer Opus 1536, Model F, Morovdis Arpeggiator, Maplin My First EQ, Jeff Wayne Thunderchild rack, Thermostat, Buck Owens' Moog.
Location: Cork, Ireland
Contact:

Re: A concise explanation of digital vs. analog?

Post by madtheory » Wed Nov 20, 2013 4:13 pm

A concise explanation of digital audio is that digital is analogous to the original waveform. :)
commodorejohn wrote:...I'm just saying that it is a key characteristic - the key characteristic - of digital audio...
No, it's not a key characteristic, it's just that some people insist on joining the dots with straight lines, even though DACs don't and can't work that way. It's not steps, it's a series of points. Simple analogy: it's like the ADC is making a graph of the waveform. The filter joins the dots. You get "smoothness" when the system conforms with Nyquist/ Shanon.

User avatar
cornutt
Moderator
Moderator
Posts: 2117
Joined: Sun Dec 02, 2007 6:03 am
Gear: 6th
Location: Rocket City USA
Contact:

Re: A concise explanation of digital vs. analog?

Post by cornutt » Wed Nov 20, 2013 7:35 pm

Hmm. Let's do the math. Take your garden variety 16-bit DAC, set up for an output voltage range of 0 to 10 volts. 16 bits provides 65536 (2^16) possible output values. Assuming the DAC's output is scaled linearly, the step increment between any two adjacent values is about 0.15 millvolts. Any value N that I send the DAC will result in an output that is N * 0.15 mV.

The DAC will hold that output value until I send it another value. When I do send it another value, its output will jump more or less instantaneously to the new value. If I send it output values on a periodic basis, I can approximate a waveform. The "easiest" waveform to reproduce with the DAC is a square wave. To make a square wave, I send it output value A, let that hold for a period of time, send it output value B, let that hold for an equal period of time, send output value A again etc. How fast I can send these values determines the maximum frequency of square wave I can produce. I need to send two values (A once and B once) for each cycle. So if I can send values to the DAC at a rate of, say, 16000 times per second, then given that I need to send two per output cycle, the maximum frequency of square wave I can produce is 8 KHz.

We can use the DAC to send values that allow us to approximate other waveforms. However, any other waveform we generate is going to have the frequency spectrum of a square wave imposed on it. How "loud" this square wave is in the output depends on the waveform we're approximating, but it's always there to some extent or another. The fundemental frequency of this square wave is half of the DAC output rate, per our example above. This is why we need output clocking filters: to get that unwanted square wave out of the output. The filter has to take effect at a low enough frequency to get adequate cutoff of the square wave fundemental. As a practical consequence, this usually means we need to set up the system so that frequency is somewhat above the highest frequency that we wish to produce in the output, since practical filters have finite slope.

Most pro audio ADC/DAC systems operate at a minimum frequency of 48 Khz. That gives a frequency for the "clock" square wave fundemental of 24 KHz, above the maximum 20 KHz frequency that we generally take as the top end of the audio spectrum. Back in the day, the sampling frequency for the ordinary audio CD format was chosen to be 44.1 KHz, giving a clock frequency of 22.05 KHz, just barely above the 20 KHz maximum desired frequency. This caused a lot of problems with early CD players since the difference is only about 1/10 of an octave, and with technology of the day it was very difficult to build a filter that would go from passband to a high degree of rolloff in that short a span, and early CD systems had a lot of problems with the clocking filters not being flat at the upper end of the audio spectrum, producing a variety of undesirable effects. Filters have gotten better since then, but the trend in pro audio has been to go to much higher sampling frequencies to move the clock frequency further away from the audio band, which makes it easier to build a good clock filter.

Incidentally, the above applies to any sampling process, whether it's analog or digital. Analog delays that use bucket-brigade samping have the same problems with stepping and needing clock filters.
Switches, knobs, buttons, LEDs, LCD screens, monitors, keys, mice, jacks, sockets. Now two joysticks!

User avatar
silikon
Supporting Member!
Supporting Member!
Posts: 1247
Joined: Mon Jul 31, 2006 1:21 am
Real name: Ms. Jackson
Gear: Random bullshit with knobs and buttons.
Band: Year with no summer
Location: East.
Contact:

Re: A concise explanation of digital vs. analog?

Post by silikon » Wed Nov 20, 2013 8:25 pm

madtheory wrote:A concise explanation of digital audio is that digital is analogous to the original waveform. :)
commodorejohn wrote:...I'm just saying that it is a key characteristic - the key characteristic - of digital audio...
No, it's not a key characteristic, it's just that some people insist on joining the dots with straight lines, even though DACs don't and can't work that way. It's not steps, it's a series of points. Simple analogy: it's like the ADC is making a graph of the waveform. The filter joins the dots. You get "smoothness" when the system conforms with Nyquist/ Shanon.
This video (not saying it's the end-all answer) pretty much states what madtheory is also asserting. I'd recommend a viewing.

echo 1 > /dev/awesome

commodorejohn
Synth Explorer
Synth Explorer
Posts: 1589
Joined: Mon Aug 12, 2013 2:39 am
Real name: John
Gear: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, Oberheim SEM
Location: Sacramento, CA
Contact:

Re: A concise explanation of digital vs. analog?

Post by commodorejohn » Wed Nov 20, 2013 9:17 pm

madtheory wrote:No, it's not a key characteristic, it's just that some people insist on joining the dots with straight lines, even though DACs don't and can't work that way. It's not steps, it's a series of points. Simple analogy: it's like the ADC is making a graph of the waveform. The filter joins the dots. You get "smoothness" when the system conforms with Nyquist/ Shanon.
So what you're telling me here is that, because the filter which is commonly integrated into the DAC smooths out the series of discrete values produced by the actual DAC stage of the DAC, the DAC stage never outputs a series of discrete values in the first place.

Right.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73

User avatar
Bitexion
Synth Explorer
Synth Explorer
Posts: 4230
Joined: Fri Apr 15, 2005 7:43 pm
Gear: Alesis Andromeda A6
Roland D-50
Creamware Minimax
Yamaha DX7s
Analogue Systems modular
Ensoniq SQ-80
Waldorf Blofeld
Location: Drammen, Norway

Re: A concise explanation of digital vs. analog?

Post by Bitexion » Wed Nov 20, 2013 10:52 pm

No matter what, the sound YOU hear is "analog" since it comes from the speaker that pushes in and out according to the signal. And there is no way an airwave is "stepped" and "digital".

commodorejohn
Synth Explorer
Synth Explorer
Posts: 1589
Joined: Mon Aug 12, 2013 2:39 am
Real name: John
Gear: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, Oberheim SEM
Location: Sacramento, CA
Contact:

Re: A concise explanation of digital vs. analog?

Post by commodorejohn » Thu Nov 21, 2013 6:18 am

Air can't instantaneously change pressure by an arbitrarily large amount, no, but it's plenty capable of carrying distortion from a poorly-constructed digital sound source in the range that makes any difference to us. As filters go, it's pretty weak, and the passband encompasses well more than our range of hearing. (Just ask your dog.)
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73

User avatar
Big Gnome
Active Member
Active Member
Posts: 414
Joined: Fri Aug 04, 2006 3:14 am
Gear: E-mu Proteus 2500
Ensoniq ESQ-1
Ensoniq VFX
SCI Prelude
Waldorf Blofeld
Band: The Nondescript
Location: Oakland, CA
Contact:

Re: A concise explanation of digital vs. analog?

Post by Big Gnome » Thu Nov 21, 2013 9:31 am

commodorejohn wrote:...the filter which is commonly integrated into the DAC smooths out the series of discrete values produced by the actual DAC stage of the DAC...
Yes. That's what a DAC is. Why argue over such a purely academic point?
Air can't instantaneously change pressure by an arbitrarily large amount, no, but it's plenty capable of carrying distortion from a poorly-constructed digital sound source in the range that makes any difference to us.
That's indisputably true, but the topic at hand is not analog audio vs. bad digital audio. You're making an assertion of poor quality when it's not really germane the the conversation; sure, crappy digital audio sucks, but so does crappy analog--at that point we might as well start arguing over whether truncation distortion or RF interference is the bigger problem.
As filters go, it's pretty weak, and the passband encompasses well more than our range of hearing. (Just ask your dog.)
I'm really not sure what you're talking about here. The bandwidth of the passband is entirely a function of the sampling rate--that can go well into the superaudible range, but that isn't necessarily the case at all--for instance, the redbook standard for CD audio is 44.1kHz in order to faithfully represent frequencies up to 20kHz, the generally agreed upon limit to human hearing, plus a few kHz extra for the (normally very aggressive) filter to do its thing.
"Sure that's fine in practice, but what about in theory?"
Some of my c**p

commodorejohn
Synth Explorer
Synth Explorer
Posts: 1589
Joined: Mon Aug 12, 2013 2:39 am
Real name: John
Gear: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, Oberheim SEM
Location: Sacramento, CA
Contact:

Re: A concise explanation of digital vs. analog?

Post by commodorejohn » Thu Nov 21, 2013 10:25 am

Big Gnome wrote:That's indisputably true, but the topic at hand is not analog audio vs. bad digital audio. You're making an assertion of poor quality when it's not really germane the the conversation; sure, crappy digital audio sucks, but so does crappy analog--at that point we might as well start arguing over whether truncation distortion or RF interference is the bigger problem.
I'm not asserting poor quality - I've said multiple times over the course of the thread that yes, these issues are usually taken care of satisfactorily, which people have entirely ignored because (as near as I can tell) they get all huffy when someone mentions the inherent pitfalls of digital audio at all, even while pointing out that they can be worked around satisfactorily. But the question in the OP is what the fundamental difference is, and that is the fundamental difference. That, at the most basic level, is what distinguishes one from the other. The workarounds we use are good, but they're irrelevant to the question of what the basic difference is.
I'm really not sure what you're talking about here. The bandwidth of the passband is entirely a function of the sampling rate--that can go well into the superaudible range, but that isn't necessarily the case at all--for instance, the redbook standard for CD audio is 44.1kHz in order to faithfully represent frequencies up to 20kHz, the generally agreed upon limit to human hearing, plus a few kHz extra for the (normally very aggressive) filter to do its thing.
I was speaking analogously of air-as-filter since bitexion brought it up, pointing out that yes, air does affect the sound, but it doesn't (as he seemed to be suggesting) suffice to remove digital artifacting - at least not at a distance shorter than a city block or so.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73

User avatar
Big Gnome
Active Member
Active Member
Posts: 414
Joined: Fri Aug 04, 2006 3:14 am
Gear: E-mu Proteus 2500
Ensoniq ESQ-1
Ensoniq VFX
SCI Prelude
Waldorf Blofeld
Band: The Nondescript
Location: Oakland, CA
Contact:

Re: A concise explanation of digital vs. analog?

Post by Big Gnome » Thu Nov 21, 2013 12:21 pm

commodorejohn wrote:I'm not asserting poor quality - I've said multiple times over the course of the thread that yes, these issues are usually taken care of satisfactorily, which people have entirely ignored because (as near as I can tell) they get all huffy when someone mentions the inherent pitfalls of digital audio at all, even while pointing out that they can be worked around satisfactorily. But the question in the OP is what the fundamental difference is, and that is the fundamental difference. That, at the most basic level, is what distinguishes one from the other. The workarounds we use are good, but they're irrelevant to the question of what the basic difference is.
Fair enough. But (excuse me if I'm misreading you here--I'm really not getting huffy, I just think that either you are mistaken or we're talking across one another) you seem to be suggesting that storing or generating audio signals as a series of discreet values is a deficiency of the format when that's simply not the case (assuming adequate resolution for the task, of course, but essentially the same consideration applies to analog audio; e.g., try running a high impedance source into a much lower impedance input).
I don't understand what "workarounds" you're referring to? Filtering in the conversion process? That's a fundamental component of the process and is no more a workaround for clear digital audio than a read head on a tape machine is for analog.
"Sure that's fine in practice, but what about in theory?"
Some of my c**p

mute
Active Member
Active Member
Posts: 640
Joined: Thu May 08, 2008 6:51 pm

Re: A concise explanation of digital vs. analog?

Post by mute » Thu Nov 21, 2013 4:50 pm

Despite there being some good explanations on the interwebs, by incredibly smart people attempting to break it down for those less gifted in physics and math, some people just never will get the full picture. It's quite like the guys over @ Head-Fi and other "audiophile" forums. 98% of those people will never "get" it and seem to be stuck in some sort of "but it was 1's and 0's at one time! resolution is lost!" mentality. The main point they always seem to get stuck on is DAC quality vs. the actual process of AD<->DA, which are entirely different subjects really..specially when you are talking oscillator/sound generation (this topic). On a hardware based V/A for example, there could be multiple stages/DACs involved before you "hear" any output. Or on the flipside - on a VST/Computer synth.. what does the DAC have ANYthing to do with the quality of the synthesis/sound generation at all? Nothing. You could have a 2 dollar soundcard with a shitty chinese DAC from 1995 on your computer or a brand spanking new high end one from 2013.. it is totally arbitrary.

User avatar
synthroom
Senior Member
Senior Member
Posts: 879
Joined: Sat Sep 08, 2012 3:16 pm
Real name: Kirk
Gear: Fairlight IIx(!), JP-8, D-50, S-50+550, S-760, JX-3P, JD-800, EII, Emax II, Mini, ARP 2600, P-5 Rev.1, Pro-One, Performer, K1m, K5m, few other things.
Location: pdx
Contact:

Re: A concise explanation of digital vs. analog?

Post by synthroom » Thu Nov 21, 2013 10:02 pm

I still love the sound of a Fairlight, 8 bits and 32kHz sample rate and all!
Fairlight IIx (Mid-Life Crisis - cheaper than a Corvette!)
Roland JP-8, D-50, S-50, S-550(2x), S-760(2x), JX-3P, JD-800
EII, Emax II, Minimoog, ARP 2600, P-5 Rev.1 (broken...), Pro-One, Crumar Performer, K1m, K5m, MS-2000B, Virus KC, a few other things.

commodorejohn
Synth Explorer
Synth Explorer
Posts: 1589
Joined: Mon Aug 12, 2013 2:39 am
Real name: John
Gear: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, Oberheim SEM
Location: Sacramento, CA
Contact:

Re: A concise explanation of digital vs. analog?

Post by commodorejohn » Thu Nov 21, 2013 10:25 pm

Oh, no question. Low-rate digital, with proper filtering, can have a great characteristic sound to it. I still love the sound of the Amiga.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73

User avatar
madtheory
Supporting Member!
Supporting Member!
Posts: 5429
Joined: Mon May 01, 2006 12:45 pm
Real name: Tomas Mulcahy
Gear: Wurlitzer Opus 1536, Model F, Morovdis Arpeggiator, Maplin My First EQ, Jeff Wayne Thunderchild rack, Thermostat, Buck Owens' Moog.
Location: Cork, Ireland
Contact:

Re: A concise explanation of digital vs. analog?

Post by madtheory » Fri Nov 22, 2013 10:53 am

@commodorejohn: Look, you stated that stair-stepping is a fundamental difference when in fact that is not how any type of sampling works. Your statement was wrong. Simple as. Talking about it as stair-stepping shows a fundamental misunderstanding of Nyquist/ Shannon.

While it might be true that in the real world there are certain challenges in adhering perfectly to the Nyquist theorem (because of filters), that is a different issue (and one which has been perfectly well solved these days). As Big Gnome points out, we can easily find flaws of a similar magnitude in "analogue".

commodorejohn
Synth Explorer
Synth Explorer
Posts: 1589
Joined: Mon Aug 12, 2013 2:39 am
Real name: John
Gear: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, Oberheim SEM
Location: Sacramento, CA
Contact:

Re: A concise explanation of digital vs. analog?

Post by commodorejohn » Fri Nov 22, 2013 11:14 am

The problem here is that you keep trying to make this about digital-sucks-versus-digital-is-cool and analog-totally-has-limitations-too when that's not what the discussion ever was, and until that stops we're just going to go 'round and 'round the mulberry bush until the end of time.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73

User avatar
Zamise
Supporting Member!
Supporting Member!
Posts: 2354
Joined: Wed Oct 20, 2004 2:41 am
Gear: Rollhand P00
Band: Quantum-Source
Location: DenverMetroUSA, Quantum-Source.com
Contact:

Re: A concise explanation of digital vs. analog?

Post by Zamise » Fri Nov 22, 2013 2:57 pm

That was an interesting video. Did you see how he tuned the waveform to a preset setting? Think of that except with 127 or so notches. That is where the dreaded stepping comes from on the digital side in my experience. I'd go on and on and on but I've got to go do something else now.
<ZQS> [....<OII>.....soundcloud player v2.42.....................link]

Post Reply