~/music-production/foundations digital-audio
Foundations

Digital Audio Fundamentals

What sound is, how computers store it, and why it matters for what you make.

Before you can edit, mix, or produce, you need a working sense of what digital audio actually is. This reading covers the core ideas: sound as a physical phenomenon, the act of turning it into numbers a computer can work with, and the choices that determine how good (or how strange) those numbers can be made to sound. You don't need to memorize numbers or learn engineering. You do need to leave with intuition.


1 · Sound, before it's digital

A sound is a tiny disturbance in the air around you. When something vibrates (a string, a vocal cord, a speaker cone, a slamming door) it pushes molecules of air outward, then pulls them back. Those molecules push the next ones, and the next, and so on. The disturbance moves outward in waves of changing pressure. When those waves reach your ear, they push on your eardrum, and your brain interprets the pattern as sound.

If we could plot the air pressure at one point in space against time, we'd see a wavy line: pressure rising and falling, faster or slower, bigger or smaller. That line is what we call a waveform. Every sound has one. A pure flute tone has a smooth, almost mathematical waveform. A cymbal crash has a chaotic one. Your voice saying "hello" has a complex shape that changes from moment to moment.

A sine wave: the simplest possible waveform. Smooth. Continuous. Infinite resolution.

Two things about a wave matter most for how we hear it: how fast it wiggles, and how big the wiggles are. Each one has a name in physics, and a different name in music.

Frequency (heard as pitch)

Frequency is how many full wave cycles happen per second. The unit is the hertz (Hz). One Hz is one cycle per second; 100 Hz is one hundred cycles per second; 1,000 Hz is one kilohertz (kHz). Faster wiggle means higher frequency.

In music, what we hear as pitch is exactly this: the frequency of the sound wave reaching our ears. A low bass note is a slow wiggle (maybe 60 Hz); a high vocal note is a fast one (maybe 1,000 Hz or more). Pitch and frequency describe the same physical thing from two angles. A musician says "A above middle C." A physicist says "440 Hz." Same wave.

amplitude one cycle 220 Hz amplitude one cycle 440 Hz time →
Two pure tones, drawn over the same span of time. The top wave (220 Hz) completes 2 cycles; the bottom wave (440 Hz) completes 4. The faster wave is heard as a higher pitch. These two are exactly an octave apart, which is what doubling the frequency always sounds like.

Amplitude (heard as loudness)

Amplitude is how big the wave is, measured from the centerline to its peak. A bigger wave moves more air, hits your eardrum harder, and sounds louder. A smaller wave is quieter.

Loudness is conventionally measured in decibels (dB). In digital audio, dB values run from 0 (the loudest a digital signal can be) downward into negative numbers. The more negative the number, the quieter the sound. So 0 dB is the loudest possible (any louder and the signal would clip), and something at -12 dB is much quieter than something at -3 dB. You'll see these numbers everywhere in an audio editor like Audacity: the level meter shows them while you record, the volume slider on each track is in dB, and the export tool reports your file's peak level in dB.

You don't need to memorize the math. The one rule of thumb worth knowing is that -6 dB is half the amplitude, so a wave that peaks at -6 dB is half as tall on screen as one that peaks at 0 dB. This is what the next visual shows.

amplitude amplitude time →
Two waves at the same frequency (same pitch), but different amplitudes. The top wave's peaks reach all the way to the loudest possible value (0 dB); the bottom wave's peaks reach only halfway, which is -6 dB. They sound like the same pitch, but the bottom one is quieter.

Frequency (Hz) and amplitude (dB) are the two basic measurements for any wave. Hold onto both terms; they show up in every audio context you'll work in, and they show up in an audio editor like Audacity the moment you import a sound.

That's sound in the analog world: a continuous, smoothly changing physical phenomenon. A microphone is a device that catches those pressure waves and turns them into a corresponding electrical signal: a tiny voltage that wiggles in time with the air. The signal is still continuous, still analog. It's just electricity instead of air. To work with sound on a computer, we have to do something else: turn that continuous signal into numbers.


2 · From wave to numbers: sampling

Computers don't deal in continuous things. They deal in discrete values: specific numbers, one after another. So to capture an analog signal in a computer, we have to measure it at regular intervals and write down the result. That measurement-at-an-instant is called a sample. The act of taking those measurements is called sampling.

Imagine you're tracking the height of a ball bouncing across the floor, but instead of recording its position continuously, you only check where it is once every fraction of a second. Each check gives you a single number: the ball's height at that moment. String enough of those numbers together and you have a usable record of the bounce, not perfect, but close enough that you could re-create the motion later. Digital audio works the same way. Many measurements per second, each one a number, all stored in order.

The same wave, sampled at regular intervals. Each dot is one number stored.

To play the sound back, the computer reads those numbers in order and reconstructs the wave, sending corresponding voltages to a speaker, which moves air, which (eventually) reaches your ear. Two devices make this work in both directions: an analog-to-digital converter (ADC) handles the recording side, and a digital-to-analog converter (DAC) handles playback. Your audio interface contains both.

Two questions naturally come up when sampling. First: how often do we measure? Second: how precisely do we measure each one? These are the two fundamental settings of digital audio: sample rate and bit depth.


3 · Sample rate

Sample rate is how many measurements we take per second. The unit is also hertz (Hz). Same unit you saw in section 1, counting a different thing: in section 1, Hz was wave cycles per second; here, it's measurements per second. The most familiar sample rate is the one CD audio uses: 44,100 Hz, usually written as 44.1 kHz. That means 44,100 measurements per second, per channel. Modern production typically works at a slightly higher rate, 48 kHz.

The intuition is straightforward: more measurements per second means a more accurate digital representation of the original wave. Fewer measurements means the digital version starts to lose detail, especially at higher frequencies, where the wave is moving quickly and you need many samples per cycle to track it.

High sample rate Low sample rate
Same wave, two sample rates. Up top, plenty of samples track the curve closely. Below, only a handful per cycle: the dashed line is what the digital signal looks like. The wave is still there, but rougher.

Why 44.1 kHz?

The number isn't arbitrary. It comes from a principle called the Nyquist theorem, which says: to accurately capture a sound wave at a given frequency, you need to sample at at least twice that frequency. The highest frequency a typical young human can hear is around 20,000 Hz (20 kHz). Double that is 40 kHz. The actual standard ended up at 44.1 kHz for historical engineering reasons we'll come back to in a moment, with a small margin above 40 kHz to leave room for the electronics to do their work.

The Nyquist theorem is the only piece of math you need to know to make sense of why sample rates are what they are. Half the sample rate is the highest frequency that can be represented. At 44.1 kHz, you can capture frequencies up to about 22 kHz, which covers the entire audible range, with a little room to spare.

44.1 kHz vs. 48 kHz

You'll see two sample rates everywhere in modern audio production: 44.1 kHz and 48 kHz. Both work; both cover the audible range with margin to spare. The reason there are two comes down to history.

44.1 kHz became the standard for the audio CD in 1980. Early digital audio recorders were built from adapted video equipment, and the math of fitting audio onto video tape ended up at 44.1 kHz. CDs took that rate and ran with it. Anything intended for music distribution today still defaults to 44.1.

48 kHz became the standard for digital video and film. When sound is paired with picture, 48 kHz syncs more cleanly with various video frame rates. It's the default rate inside most professional video tools, broadcast equipment, and (increasingly) modern audio interfaces. It's what most contemporary digital production environments (including Ableton) assume by default.

Most production work runs at 48 kHz from start to finish. It's the modern default, it matches what phones and field recorders capture, and it's what Ableton and most DAWs assume, so a project stays at one rate the whole way through. You'll still meet 44.1 kHz everywhere in the wild: every CD, much of what you download.

Neither is "better." Both are conventions, chosen for different historical reasons. Knowing both exist prevents you from being surprised when a project file or interface uses one when you expected the other.

What does "human hearing range" actually sound like?

The often-quoted range of human hearing is 20 Hz to 20 kHz. The numbers are abstract until you hear them. Try the tone generator below: it plays a pure sine wave at whatever frequency you choose. Drag the slider to explore the audible range. (The slider is logarithmic, like musical pitch: every doubling of frequency is one octave higher.)

440Hz
20 Hz 200 2 kHz 20 kHz

Keep your headphones at low volume before pressing Play. Sine tones are loud and fatiguing: start quiet, listen briefly, stop when you're done. High frequencies in particular can damage hearing if played too loud.

A few useful frequencies to find on the slider: 440 Hz is concert A (the note an oboe plays for an orchestra to tune). 1 kHz is the reference frequency engineers use for measurements (a kind of mid-range neutral). Below 60 Hz you're in sub-bass territory where you feel as much as you hear. Above 10 kHz you're in the very high treble: sibilance, cymbal sheen, "air." Almost no one over 30 can hear above 16 kHz cleanly.

Now, with that range in mind, look at where the Nyquist limits actually fall, and how the two sample rates relate to them on the same axis:

human hearing · 20 Hz – 20 kHz 22.05 kHz 24 kHz 44.1 kHz 48 kHz Nyquist Nyquist half half 0 10 20 30 40 50 kHz
The audible range, two Nyquist limits, and the two common sample rates on a single linear frequency axis. Each Nyquist limit is exactly half its sample rate (the dotted arrows). Anything above the Nyquist line can't be properly represented by that sample rate: the result is a phenomenon called aliasing, which we'll come back to in section 5.
Listen: same sound, three sample rates
44.1 kHzCD quality
8 kHztelephone quality
4 kHztruly lo-fi

Listen on headphones if you can. As the sample rate drops, high frequencies disappear first: the sharp attacks soften, the brightness dulls, and at 4 kHz everything sounds like it's behind a thick wall. Some artists deliberately reach for low sample rates as an aesthetic. You'll recognize the sound from old video games, lo-fi hip-hop, and certain glitch records.


4 · Bit depth

If sample rate is about when we measure, bit depth is about how precisely. Each sample is a number with finite resolution. Bit depth tells you how many possible values that number can take. Each sample is stored as a binary number, and bit depth is how many digits long that number is.

An 8-bit sample can take 256 possible values (because 2 to the power of 8 is 256). A 16-bit sample can take 65,536 values. A 24-bit sample can take over 16 million values. The more bits, the finer the gradations of amplitude available: the more precisely each sample can describe the actual height of the wave at that moment.

High bit depth: fine amplitude steps Low bit depth: chunky steps
The same wave at high and low bit depth. With many gradations available, the digital signal closely tracks the original. With only a few, each sample has to round to the nearest available value, and the result is chunky and crude.

What happens when bit depth is too low? The amplitude of each sample has to round to the nearest available value. Subtle differences get flattened. Quiet sounds can disappear entirely if they're too small to register on the coarse grid. Worst of all, the rounding itself produces a kind of low-level hiss: what engineers call quantization noise. The result is a noisier, grainier, less detailed sound.

The CD standard is 16-bit, with 65,536 possible values per sample. This is enough for high-quality audio: the noise floor is so low you can barely hear it. Professional recording often uses 24-bit, which gives even more headroom for processing. 32-bit goes further still and is the highest resolution offered by modern DAWs like Ableton, Logic, and Pro Tools. 8-bit audio sounds noticeably grainy and was used in early samplers and video game music. 4-bit sounds genuinely degraded: a deliberate aesthetic effect.

What you'll actually use

You work at 24-bit while you record and edit, which gives you headroom to work without losing quiet detail. You step up to 32-bit when you export a finished mix. The sample rate stays at 48 kHz the whole time; bit depth is the only setting that changes, and only at the end.

You'll see 16, 24, and 32-bit in the wild. The standards are evolving: what was "professional" twenty years ago (16-bit) is now baseline, and what was high-end ten years ago (24-bit) is now common. The trend is toward more headroom.

Listen: same sound, three bit depths
16-bitCD standard
8-bitearly sampler era
4-bitdegraded on purpose

Pay attention to what happens during the quiet decay at the end of each clip. At 16-bit the noise floor is inaudible. At 8-bit you'll hear a low hiss. At 4-bit the noise is loud and obviously grainy: that's the sound of the rounding errors becoming the signal. Notice too that the 4-bit version goes completely silent earlier than the others: when sample values get small enough, they round all the way down to zero. The decay tail is literally lost. Like low sample rates, low bit depths have an aesthetic of their own. Some producers reach for them on purpose.


5 · When sample rate isn't enough: aliasing

Sample rate and bit depth are abstract numbers, but each has a specific audible consequence when it isn't enough for the job. Knowing the names of those consequences turns mysterious artifacts into something you can identify, avoid, or (if you want) deliberately use. The next two sections look at each consequence in turn.

The Nyquist theorem says you can only capture frequencies below half the sample rate. But what happens to frequencies above that limit? They don't politely disappear. They fold back into the audible range as false lower frequencies. This phenomenon is called aliasing.

You've seen aliasing without knowing the name. In old movies, a wagon wheel spinning forward sometimes appears to spin backward, because the camera's frame rate isn't fast enough to catch every spoke. The wheel's rotation is "above the camera's Nyquist limit," so the eye (or the film) reconstructs a slower, false rotation. Audio aliasing is the same thing happening to sound: a real high frequency gets reconstructed as a false low one.

grey: actual high-frequency wave rust dashes: what the samples seem to trace · a false low frequency
A sine wave sampled too sparsely. The actual signal (grey) is a high frequency, well above this sample rate's Nyquist limit. The samples (rust dots) catch the wave at unfortunate moments, and connecting them produces a curve (rust dashes) that looks like a much lower frequency. That false low frequency is aliasing: a frequency the source never contained, manufactured by the sampling process.

Aliasing is genuinely strange-sounding. It produces inharmonic whistles, sliding tones, and a kind of sour, "off" quality on bright sounds. Once you hear it, you recognize it.

This is why every digital audio system applies an anti-alias filter before sampling. The filter removes any content above the Nyquist limit before the ADC sees it, so there's nothing left to fold back. Your audio interface does this automatically; so does an audio editor like Audacity when it resamples a file to a lower rate; so do all professional ADCs. You don't have to think about it as long as you stay inside the standard tools. But knowing the filter exists tells you what "above Nyquist" marks: the boundary of what reality the digital system can hold.

Listen: with vs. without anti-alias filtering
44.1 kHzthe real source
8 kHz, filteredthe right way
8 kHz, no filteraliasing artifacts

Start with the source so you have the "real" reference in your ears. Then compare the two 8 kHz versions. The filtered version (the same file you heard in section 3) simply rolls off the high frequencies, sounding muffled. The no-filter version rolls those same high frequencies down into the audible range as false ones, producing whistles and inharmonic ring. The first is what your ADC actually does. The second is what would happen if it didn't, and is also what the 4 kHz file in section 3 would have sounded like if we hadn't filtered it. Some chiptune and 8-bit aesthetics deliberately court aliasing for its specific texture.


6 · When bit depth isn't enough: signal-to-noise ratio

Bit depth limits how soft a sound can be before it disappears into quantization noise. The metric for this is signal-to-noise ratio (SNR): the ratio of your loudest signal to the noise floor, measured in decibels (dB). Higher is better.

There's a clean rule of thumb: each bit gives you about 6 dB of SNR. So:

For comparison, alongside the dynamic range of unamplified music:

0 dB (full scale) -24 -48 -72 -96 -120 -144 -168 -192 4-bit ~24 dB 8-bit ~48 dB 16-bit ~96 dB (CD) 24-bit ~144 dB 32-bit ~192 dB ff pp orchestra ff to pp ~80 dB range
Dynamic range available at five bit depths, with the dynamic range of a live orchestra shown as a real-world reference. The orchestra spans from fortissimo near full scale down to pianissimo around -86 dBFS, an ~80 dB range. Notice that the orchestra's quietest pianissimo falls below the noise floor of 4-bit and 8-bit, but fits comfortably inside 16-bit and is dwarfed by 24- and 32-bit. That's why CDs went 16-bit, why pro recording moved to 24-bit, and why DAWs offer 32-bit for the working stages where you most want the headroom.

This is why CDs settled on 16-bit: it covers the full dynamic range of unamplified music with a small margin to spare. It's also why professional recording uses 24-bit even when delivering at 16-bit: the extra headroom protects you from accidentally clipping during recording or losing detail during processing. You record with margin, then commit to less margin only at the final mixdown.

That principle (record with headroom, commit later) recurs throughout audio work. It matters most the moment you start recording your own sources.

Dither: the noise you add on purpose

Quantization noise has a standard fix, and it sounds backwards: you add a little noise to cover it. When a file drops to a lower bit depth, dither mixes in a tiny amount of random noise first. That randomness lets sounds quieter than a single step still register instead of rounding to silence, and it turns the harsh, signal-locked rounding error into a smooth, even hiss the ear ignores. You get more low-level detail, not less.

You meet it at export. Ableton's export dialog turns on a Dither Options menu whenever you render below 32-bit. Your normal export is 32-bit, so it stays off, which is exactly what Ableton recommends. Reach for it only on a final reduction to 16-bit (a CD master, or a hand-off where someone asks for 16-bit): leave it on the default, Triangular, and apply it once, as the last thing that happens to the file. Dithering twice layers noise on noise.


7 · File formats

Once you have an array of numbers representing audio, you have to store them somewhere. A file format is an agreement about how those numbers (and information about them: sample rate, bit depth, number of channels, length, etc.) get arranged inside a file. Different formats make different tradeoffs.

Uncompressed: WAV and AIFF

The simplest formats just store the numbers as they are. Every sample, written down in order. No clever tricks. WAV (developed by Microsoft) and AIFF (developed by Apple) are the two industry-standard uncompressed formats. They sound identical to each other, they're just different containers for the same kind of data.

Uncompressed audio is the highest quality possible from your source recording. The downside is file size. A 3-minute stereo song at 44.1 kHz / 16-bit takes about 30 MB as a WAV file. That was a lot in 1995 when CDs were the main music format. It's nothing now.

WAV is the standard format for working files and final exports. It's what professionals use, and it archives well.

Lossy compression: MP3, AAC, OGG

Storage and bandwidth used to be expensive. Engineers worked out clever ways to make audio files smaller by throwing away information that the human ear can't easily hear: frequencies that are masked by louder ones, very high frequencies that older listeners can't perceive, redundancies in the signal. The result is a much smaller file that sounds almost the same. This is called lossy compression, because the discarded information is gone forever.

MP3, AAC (used by Apple Music and iTunes), and OGG Vorbis are common lossy formats. A 3-minute song that's 30 MB as a WAV might be 3 MB as a high-quality MP3, ten times smaller, and most listeners on most playback systems can't hear the difference.

Lossy formats are great for distribution. They're terrible for working files. Every time you re-export a lossy file, more information is lost. Editing an MP3, exporting it, editing the export, exporting again, will sound progressively worse, like making photocopies of photocopies. Always work in WAV. Convert to MP3 only at the end, when you need to share something small.

Lossless compression: FLAC, ALAC

There's a middle option: formats that compress the file (making it smaller) without throwing away any information. FLAC (Free Lossless Audio Codec) and ALAC (Apple Lossless) are the two main lossless formats. A FLAC of that 30 MB WAV might be 18 MB, smaller than WAV, but able to be decoded back to the exact original. Audiophiles love these formats. You won't reach for them often, but it's worth knowing they exist.

Quick comparison

FormatCompressionFile size (3 min stereo)Best for
.wavNone~30 MBWorking, final exports, archives
.aifNone~30 MBSame as WAV (Apple ecosystem)
.flacLossless~18 MBHigh-quality distribution, archiving
.mp3Lossy~3 MBCasual sharing, streaming
.aac / .m4aLossy~3 MBSame as MP3 (Apple ecosystem)

8 · What this means for what you make

You don't need to think about most of this most of the time. The point of this reading isn't to make you obsess over numbers. It's so that when something goes wrong, or when you want to make a deliberate aesthetic choice, you have the vocabulary to think clearly about it.

Watch out: importing audio at the wrong sample rate

This is one of the most common ways a project goes wrong. You're working in a 48 kHz session and you drag in a 44.1 kHz sound file (or the other way around). Most DAWs will notice the mismatch and pop up a resample prompt: that's the safe path. But if you click through it, dismiss it, or use a tool that doesn't ask, the file's samples get played out at the project's rate without any conversion. The result is exactly the tape-speed effect: the file plays back at the wrong speed, and its pitch shifts with it.

Between 44.1 and 48 kHz the shift is about a semitone and a half: small enough that you might not catch it, but large enough to put a sample out of tune with the rest of your session. Drop a 44.1 kHz drum loop into a 48 kHz project without resampling and it plays slightly faster and higher than it should; do the reverse and it drags slightly slower and lower. Neither sounds obviously broken on its own. It just doesn't sit right.

Resampling is what fixes this: the DAW computes a new set of samples at the project's rate, so the file keeps its original duration and pitch when played back. Always say yes to the resample prompt, or convert the file beforehand (in an audio editor like Audacity, File → Export lets you set the target sample rate). The rule of thumb: match the project's sample rate before audio enters the timeline, not after.

A few takeaways:


Vocabulary

Waveform
The shape of a sound, usually plotted as amplitude (vertical) over time (horizontal).
Analog
Continuous, smoothly varying. The opposite of digital. Sound in the air, voltages in a wire.
Digital
Made of discrete numbers. Sound stored as a sequence of samples on a computer.
Sample
A single measurement of a sound's amplitude at one moment in time. Also (confusingly): a recorded sound used as creative material in music. Context tells you which meaning.
Sample rate
How many samples are taken per second. Measured in Hz or kHz. Common rates: 44.1 kHz (CD) and 48 kHz (video and modern production). Most current production happens at 48 kHz.
Bit depth
How many bits are used to store each sample. Higher bit depth = finer amplitude resolution and a lower noise floor. Standards: 16-bit (CD), 24-bit (recording), 32-bit (DAW working files).
Nyquist theorem
The principle that you need to sample at twice the highest frequency you want to capture. Why 44.1 kHz works for human hearing.
Quantization
The process of rounding a continuous amplitude value to the nearest available digital value. Quantization noise is the audible side effect when bit depth is too low.
Quantization noise
The audible artifact of bit depth reduction. As samples round to the nearest available value, the rounding errors accumulate as a low-level hiss. The lower the bit depth, the louder the noise relative to the signal.
Aliasing
The audible artifact of sample rate being too low for the frequencies present. Frequencies above the Nyquist limit don't disappear; they fold back into the audible range as false lower frequencies, producing strange whistles and inharmonic tones.
Signal-to-noise ratio (SNR)
The ratio of the desired signal level to the background noise level, measured in decibels (dB). Higher is better. Bit depth sets a hard ceiling on SNR: roughly 6 dB per bit. 16-bit gives about 96 dB SNR; 8-bit gives about 48 dB.
Headroom
The margin between your loudest signal and the maximum the system can handle. Working with headroom (i.e. signal peaks below 0 dBFS) gives processing chains room to operate without clipping. A standard practice in audio production.
ADC / DAC
Analog-to-Digital Converter / Digital-to-Analog Converter. The hardware in your audio interface that handles recording and playback.
WAV / AIFF
Uncompressed audio file formats. Use these for working files and final exports.
Lossy compression
A compression strategy that makes audio files smaller by discarding information the human ear can't easily hear (masked frequencies, redundancies, etc.). The discarded information is gone permanently. MP3 and AAC use lossy compression.
Lossless compression
A compression strategy that makes audio files smaller without throwing any information away. The compressed file decodes back to bit-perfect identical with the original. FLAC and ALAC use lossless compression.
MP3 / AAC
Lossy compressed formats. Smaller files, slight quality loss. Use only for distribution, never for editing.
FLAC / ALAC
Lossless compressed formats. Smaller than WAV, but no quality loss. Useful for high-quality distribution and archiving.

Read more

Links and further reading to come.