Page 1 of 4

A concise explanation of digital vs. analog?

Posted: Tue Nov 19, 2013 11:22 pm
by Aaron2
The "Digital oscs, analogue filters?" thread got me thinking. Can someone please provide a very concise explanation of what distinguishes a digital oscillator from an analog one? In other words, we know the sound is produced using different technological methods in these two types of instruments. But if we had to break it down for a total newcomer to synthesis, what would we say?

Any takers?

Re: A concise explanation of digital vs. analog?

Posted: Tue Nov 19, 2013 11:49 pm
by commodorejohn
Very simple: an analog voltage-controlled oscillator produces a continuously variable voltage by various means (such as charging a capacitor over a period of time defined by its capacitance and the input control voltage and then semi-instantly discharging it, to produce a sawtooth wave.) Both the output signal voltage and the input control voltage of a VCO are continuously variable to the full extent possible within the limits of the physical universe.

A digitally-controlled analog oscillator produces its output signal in the same basic way as a voltage-controlled oscillator, but uses a digital timer circuit to control the pitch. The primary limitation of a DCO is that its capability for fine pitch variation is limited by the resolution of the timer circuit, though it can also experience distortion of the waveform due to the compensatory measures it has to take to keep the peak-to-peak level of the signal constant.

A fully digital "oscillator" is produced by numbers fed into a digital-to-analog converter. Since all DACs have a fixed word size (number of bits) they can take as an input, the number of values a DAC can produce is limited to 2 to the (bits) power - 256 for an 8-bit converter, 4096 for 12-bit, 65536 for 16-bit, and so on. This produces quantization noise in the signal equal to the difference between the actual signal level as it is supposed to be and the closest output level achievable by the DAC. Since DACs also have a limited rate at which they can change values, this means that the frequency response of the DAC is also limited to half the maximum sample rate. This can also introduce an error value into the output pitch, depending on how the "oscillator" is implemented. The extent to which all this is noticeable by the human ear is dependent on how fine the resolution is and how high the maximum sampling rate is.

Re: A concise explanation of digital vs. analog?

Posted: Tue Nov 19, 2013 11:53 pm
by nathanscribe
This has been done to death a million times, I'm sure a minute spent searching would bring up some relevant material here.

Briefly though, I'd say an analogue oscillator is generally going to be either:

- a VCO, which means its frequency is controlled by a continuously variable voltage; or
- a DCO, which is basically the same except its frequency is controlled by a digitally-generated clock or digitally-stabilised voltage (both the VCO and DCO still generate resultant waveforms in the analogue domain)

while

- a digital oscillator is a waveform generated in bits and bytes, using logic and digital processing and 1s and 0s and at some point is made into an analogue audio signal by a DAC, either before analogue filtering or at the end of some other digital signal processing chain.

I think that's the neatest way I could sum it up.

EDIT: beaten to it, :lol:

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 2:07 am
by balma
Thanks for the clarification. I thought analog were sine waves while digital were like random LFOS....
Image

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 2:09 am
by commodorejohn
Well, that's the end result of it - they are stepped like a sample-and-hold signal, but how finely they're stepped depends on the quality of the DAC.

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 3:30 am
by Aaron2
nathanscribe wrote:This has been done to death a million times, I'm sure a minute spent searching would bring up some relevant material here.
The "why don't you just get off your lazy a*s and search" response gets thrown around a lot here, but frankly, the search engine is completely wretched on this site (and on most discussion boards that I've been on). That's why I didn't get off my lazy a*s and search. :lol:

Otherwise, thanks for the helpful portion of your response:
nathanscribe wrote: Briefly though, I'd say an analogue oscillator is generally going to be either:

- a VCO, which means its frequency is controlled by a continuously variable voltage; or
- a DCO, which is basically the same except its frequency is controlled by a digitally-generated clock or digitally-stabilised voltage (both the VCO and DCO still generate resultant waveforms in the analogue domain)

while

- a digital oscillator is a waveform generated in bits and bytes, using logic and digital processing and 1s and 0s and at some point is made into an analogue audio signal by a DAC, either before analogue filtering or at the end of some other digital signal processing chain.

I think that's the neatest way I could sum it up.

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 4:26 am
by Stab Frenzy
commodorejohn wrote:Well, that's the end result of it - they are stepped like a sample-and-hold signal, but how finely they're stepped depends on the quality of the DAC.
No, that's not correct at all. That's the biggest misconception people have when it comes to digital audio and it's flat out wrong. If I run an analogue 440Hz sine wave directly out from one of the VCOs in my modular to an analogue oscilloscope and then run the same signal through a good quality AD and DA conversion stage and into the same oscilloscope you wouldn't be able to pick which was which by eye.

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 4:33 am
by commodorejohn
Stab Frenzy wrote:No, that's not correct at all. That's the biggest misconception people have when it comes to digital audio and it's flat out wrong. If I run an analogue 440Hz sine wave directly out from one of the VCOs in my modular to an analogue oscilloscope and then run the same signal through a good quality AD and DA conversion stage and into the same oscilloscope you wouldn't be able to pick which was which by eye.
I said it was stepped - it is stepped, that's just simply the nature of digital electronics. Yes, if the resolution and sample rate are high enough, the stepping won't be obvious, or theoretically even noticeable at all within the limits of human senses, but it's still there, until you employ an (analog) reconstruction filter to remove it. It can't not be.

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 7:12 am
by Big Gnome
commodorejohn wrote:I said it was stepped - it is stepped...until you employ an (analog) reconstruction filter to remove it.
Filtering is always a component of the digital-to-analog conversion process--what comes out of the DAC is a smooth, continuous analog wave, not a stepped one. Of course, the efficaciousness of conversion process is contingent on the quality of the digital audio in question, but that's an ordinary case of garbage-in-garbage out which essentially is equally true of analog signals.

In response to the OP, the principal difference between digital and analog gear is to give anoraks on the internet who feel all butthurt about being told they don't play a "real" instrument something to feel superior about. See also: discrete vs. integrated circuits. ;)

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 7:18 am
by commodorejohn
I'm not saying that it doesn't generally get taken care of satisfactorily (outside of el cheapo sound cards and toy pianos from third-world sweat shops,) I'm just saying that it is a key characteristic - the key characteristic - of digital audio, which is the exact thing this thread is about.

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 9:10 am
by Stab Frenzy
commodorejohn wrote:
Stab Frenzy wrote:No, that's not correct at all. That's the biggest misconception people have when it comes to digital audio and it's flat out wrong. If I run an analogue 440Hz sine wave directly out from one of the VCOs in my modular to an analogue oscilloscope and then run the same signal through a good quality AD and DA conversion stage and into the same oscilloscope you wouldn't be able to pick which was which by eye.
I said it was stepped - it is stepped, that's just simply the nature of digital electronics. Yes, if the resolution and sample rate are high enough, the stepping won't be obvious, or theoretically even noticeable at all within the limits of human senses, but it's still there, until you employ an (analog) reconstruction filter to remove it. It can't not be.
Simply repeating misconceptions doesn't make them true, but full marks for your conviction. :thumbright:

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 9:13 am
by commodorejohn
I'm curious what you think a DAC does, Stab.

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 12:51 pm
by Cumulus
....here we go...

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 1:27 pm
by CS_TBL
Forget it about the whole bunch, operators are what we need more! :lol:

Re: A concise explanation of digital vs. analog?

Posted: Wed Nov 20, 2013 1:37 pm
by polyjuno
Aaron2 wrote:The "Digital oscs, analogue filters?" thread got me thinking. Can someone please provide a very concise explanation of what distinguishes a digital oscillator from an analog one? In other words, we know the sound is produced using different technological methods in these two types of instruments. But if we had to break it down for a total newcomer to synthesis, what would we say?

Any takers?
An attempt was made to explain this here. It walks through what an audio signal is, and how VCOs, DCOs and digital oscillators work.