How do audio cards work?


I know that electricity activates magnets moves drivers vibrates air = sound, but how do a sequence of 0s and 1s get translated by the audio card into the correct vibrations, and especially why is this technology so reliable? What bit of physics do I need to learn to understand this?

In: 13

The component in an audio card that is doing this is called a DAC which stands for Digital to Analog Converter. There are a few different designs for these devices depending on the quality, efficiency and cost. A simple to explain and quite common DAC connect the input bits to transistors in the circuit which enables or disables resistors, current sources or capacitors depending on the value of that bit. All of the activated components will then sum together to create a voltage of the correct value on the output.

Inside an audio dac (digital to analog converter), you have that string of ones and zeroes converted to a number (grouped in, let’s say 4 bits for ease of explaining).
0111 = 7, or about half way if 1111 =15.

The converter uses the binary 0111 to set the output, there are a few ways to do this. The simplest one is a summing ladder, there each 1 turns on an internal switch. So for 7/0111, you have 0+4+2+1 (binary), and that gives you an output of 7.

An other way uses pulse length to get an average of the value during the time slice. So it would be on for about half of the time. (Count up, if the target value is over your counter, be on).

Edit: to get better sounds, you increase the amount of bits (your range) and how often you change your value (frequency)

What you are talking about is signal analysis and is one of the key parts of electrical engineering.

It’s basically just pure math.

The idea is you can represent any wave as the sum of various other interfering waves. So for example if you have a chord on a guitar the sound it makes is made up of the sounds the individual strings make plus some harmonic resonances (let’s Ignore these for now because they are caused by the guitar itself).

If you can graph all of the frequencies of each individual string and then add them together you should get the signal you started with. Better yet, if all you are doing is adding together different wavelengths why not just store what those wavelengths are, that way you can reproduce the signal with just that small bit of information.

This is called the frequency domain, a place in math where the x-axis of the graph is the frequency of the signal and the y-axis is the intensity.

By doing this we can collect and store a small amount of data and reproduce the signal accurately without having to store an infinite amount of data points to reproduce an infinite wave.

It seems like you are interested in this stuff, look up “frequency domain”, “fourier series”, and “fourier transform”.

It some really eye-opening and super cool math.