← Back to Course

Module 02

Digital Audio & MIDI

How analog sound becomes digital data. Why sample rate and bit depth matter. Understanding MIDI: the universal language of music controllers. Why -6dB headroom keeps your mixes clean.

Part A

Core Concepts

01

Analog to Digital Conversion

Sampling: Taking Snapshots of SoundGray = original analog wave | Cyan dots = digital samples

The ADC measures the analog voltage at regular intervals (sample rate) and records each measurement as a number. These snapshots, when played back fast enough, recreate the original waveform. More samples = smoother recreation.

Key concept

Sampling rate = how often we measure. More = better high frequency capture.

Quantization: Rounding to Available ValuesActual analog signalQuantized samples (rounded to nearest level)

Each sample must be rounded to the nearest available value (determined by bit depth). 16-bit = 65,536 possible values. 24-bit = 16.7 million values. More bits = smaller rounding errors = less quantization noise.

Key concept

Bit depth = how precisely we measure. More bits = less 'rounding error' noise.

DAC: Digital Back to AnalogDigital SamplesDAC+ Reconstruction FilterSmooth Analog Output

The DAC converts digital samples back to analog voltage. A reconstruction filter smooths the 'staircase' of samples into a continuous wave. Good DACs with proper filtering = clean, accurate playback.

Practical

DAC quality matters for playback. ADC quality matters for recording.

02

Sample Rate

The Nyquist TheoremMax Frequency = Sample Rate ÷ 244,100 Hz÷ 2 = 22,050 Hz max (CD standard)48,000 Hz÷ 2 = 24,000 Hz max (Video standard)Human hearing tops at ~20kHz, so both capture everything audible

The Nyquist theorem: to accurately capture a frequency, you need at least 2 samples per cycle. Human hearing tops out at ~20 kHz, so 44.1 kHz captures everything we can hear. The extra headroom prevents aliasing artifacts.

Bottom line

44.1kHz or 48kHz captures all audible frequencies

Aliasing: What Happens Without Enough Samples✓ Enough Samples (Good)✗ Not Enough Samples (Aliasing)Samples see a flat line — wrong frequency reconstructed!

If a frequency is too high for the sample rate, the samples 'see' a phantom lower frequency instead — this is aliasing. Anti-aliasing filters remove frequencies above Nyquist before sampling to prevent this.

Problem

Aliasing = false frequencies. Prevented by low-pass filtering before ADC.

Common Sample Rates44.1 kHzCD standard, music streamingAudio-only48 kHzVideo standard, broadcast, YouTubeVideo work96 kHzHi-res audio, archival, processingSpecial casesRecommendation: Use 48 kHz for new projects — it's universal

44.1 kHz for music, 48 kHz for video/broadcast. Higher rates (96/192 kHz) offer more headroom for processing and transients, but larger files and more CPU. For most work, 48 kHz is the sweet spot.

Recommendation

Use 48 kHz for new projects. It's universal.

03

Bit Depth

Bit Depth = Dynamic Range16-bit96 dB65,536 possible values. CD quality. Enough for delivery.24-bit144 dB16,777,216 possible values. Recording standard. Room for mistakes.32-bit float1528 dBInternal processing. Can exceed 0dBFS without clipping. Infinite headroom.

Each bit doubles the number of possible values (and adds ~6dB of dynamic range). 16-bit captures 96dB — enough for playback. 24-bit captures 144dB — essential for recording because it leaves room for quiet signals.

Rule

Record at 24-bit. Deliver at 16-bit (or 24 for hi-res).

Why 24-bit: The Recording Standard16-bit: No room for errorClip!Noise floor closeto signal levelMust record hot24-bit: Lots of headroomHeadroomNoise floor waybelow signalRecord safely at -12dB

With 24-bit, the noise floor is so low (-144dB) that you can record conservatively (peaks at -12dB) without worry. You'll boost the signal later with no audible noise. With 16-bit, you'd hear the noise floor when boosting.

Practical

24-bit lets you record safely and boost later

32-bit Float: The "Impossible" FormatCan represent values above 0dBFSYour DAW uses this internally for processingPlugin clips? Lower output — no damage!Only clips when leaving the DAWInternal clipping is recoverable. Final output clipping isn't.

32-bit floating point can represent values way above 0dBFS. Your DAW processes everything in 32-bit float — that's why you can clip plugins and still save the mix by lowering the master. The data isn't lost until final output.

Key insight

Internal clipping in 32-bit float is recoverable. Final output clipping isn't.

04

The -6dB Rule

What Is Headroom?No HeadroomClipping!-6dB HeadroomroomSafe-12dB Headroomlots of roomVery safe

Headroom is the space between your peak level and 0dBFS (digital maximum). -6dB means your peaks hit -6dBFS, leaving 6dB of space. This prevents clipping when tracks sum together and leaves room for mastering.

Definition

Headroom = insurance against clipping

The Math of SummingTwo identical signals summed = +6dBTrack at -6dB+Track at -6dB=Sum at 0dB (exactly at ceiling)Track at 0dB+Track at 0dB=Sum at +6dB (CLIPPING!)

When two correlated signals sum, they can add up to +6dB. Real mixes have many tracks. If your individual tracks are too hot, the sum clips. -6dB per track leaves room for summing.

Math

Coherent signals sum. Leave room or they clip.

Recording Level GuidelinesPeak level target-12 to -6 dBFSAverage level (RMS)-18 to -12 dBFSDanger zoneAbove -3 dBFSClipping0 dBFSWith 24-bit recording, conservative levels have zero downside

Record with peaks around -12dB. This leaves massive headroom and with 24-bit you won't hear the noise floor. You can always add gain later. You can never undo clipping.

Best practice

Record conservatively. -12dB peaks is perfect for 24-bit.

05

MIDI Fundamentals

Audio vs MIDIAUDIO• Actual sound waveform• Large files (MB per minute)• Fixed pitch and timing• Recorded performanceMIDI• Performance instructions• Tiny files (KB)• Infinitely editable• Needs synth/sampler to play

MIDI (Musical Instrument Digital Interface) is a protocol for sending musical instructions: what note, how hard, how long, which control changed. It makes no sound on its own — it tells instruments what to play.

Key concept

MIDI = instructions. No MIDI data makes sound by itself.

Core MIDI MessagesNOTE ONNote: C4 (60) | Velocity: 100 | Channel: 1NOTE OFFNote: C4 (60) | Velocity: 0 | Channel: 1CCController: 1 (Mod Wheel) | Value: 64 | Channel: 1PITCH BENDValue: +4096 (14-bit) | Channel: 1

Note On starts a note (includes pitch and velocity). Note Off stops it. CC (Control Change) sends knob/slider values. Pitch Bend bends pitch smoothly. These simple messages describe any performance.

Structure

Note On + Note Off = complete note. Velocity = how hard.

MIDI Velocity: How Hard You Playpp20p50mf80f100ff127Velocity: 0-127(7-bit values)

Velocity (0-127) represents how hard you hit the key. Instruments map velocity to volume, brightness, sample selection, or any parameter. Higher velocity often means louder AND brighter (more harmonics).

Important

Velocity isn't just volume — it can control any parameter

Aftertouch: Pressure After Key PressKey Press TimelineHitAftertouch (pressure while held)ReleaseChannel AftertouchOne value for all keysPolyphonic AftertouchPer-key pressure (rare)

Aftertouch measures pressure after the initial key strike — how hard you press while holding the note. Often mapped to vibrato, filter, or volume swells. Channel aftertouch is common; polyphonic (per-note) is rarer.

Expression

Aftertouch adds expression after the note starts

06

MIDI Controllers

MIDI Keyboard ControllerKeysNote + VelocityPitch WheelBend notesMod WheelCC#1Knobs/FadersVarious CCs

MIDI keyboards send Note On/Off with velocity when you play. Pitch and mod wheels send their own messages. Many keyboards have knobs and faders that send CC messages for controlling synth parameters.

Controller

No built-in sounds — just sends data to your DAW

Digital Wind Instrument (EWI)Breath pressureCC#2 (Breath) or VolumeFingeringNote messagesBite sensorPitch bend / vibratoLip pressureExpression / dynamicsBreath control adds organic expression to electronic sounds

Wind controllers (EWI, Aerophone, etc.) translate breath pressure and fingering into MIDI. Breath typically maps to CC#2 or volume. This allows wind players to control synths with natural expression.

Expression

Breath control adds organic expression to electronic sounds

Drum Pads & Finger DrumsEach pad = one note message with velocity

Drum pads send Note On with velocity. Harder hits = higher velocity. Each pad is assigned a different note number. Often velocity maps to sample selection (soft hit = different sample than hard hit).

Feel

Velocity-sensitive pads capture performance dynamics

Common CC NumbersCC#1Mod WheelCC#2Breath ControllerCC#7VolumeCC#10PanCC#11ExpressionCC#64Sustain PedalMIDI Learn: Wiggle a controller, it maps automatically

CC (Control Change) messages carry values 0-127 on a specific controller number. Standard assignments exist (CC#1 = mod, CC#7 = volume, CC#64 = sustain), but any CC can be mapped to any parameter in your DAW/synth.

Workflow

Most synths let you MIDI learn: wiggle a controller, it maps automatically

Context

Analog vs Digital

A/D

Analog Approach

Digital Approach

Deep Dive

The Science

SCI

The Science Behind It

Understanding the math that makes digital audio work.

In Practice

Digital Audio in History

From experimental beginnings to universal standard — how digital audio transformed music production.

EX

Sony CDP-101 (1982)

Consumer Audio

The first commercially available CD player. 16-bit/44.1kHz became the standard because it fit 74 minutes on a disc (allegedly to hold Beethoven's 9th Symphony). This format dominated for 30 years.

Cher - 'Believe' (1998)

Pop

Engineer: Mark Taylor

First mainstream use of Auto-Tune's hard correction as an effect (not correction). The 'Cher effect' demonstrated how digital processing could become a creative tool, not just a technical one. MIDI automation controlled the extreme pitch correction settings.

Daft Punk - 'Random Access Memories' (2013)

Electronic

Engineer: Mick Guzauski

Recorded at 24-bit/88.2kHz with extensive analog equipment, then mixed in the digital domain. Demonstrates the 'best of both worlds' approach: analog warmth captured with digital precision.

Billie Eilish - 'When We All Fall Asleep' (2019)

Pop

Engineer: Finneas O'Connell

Recorded entirely in a bedroom using Logic Pro, a simple audio interface, and MIDI controllers. Proved that professional-quality albums can be made with modest digital setups. Heavy use of MIDI for synths and sample triggering.

Avoid These

Common Digital Audio Mistakes

Avoid these errors that plague beginners working with sample rate, bit depth, and MIDI.

ERR
!

Recording at 16-bit

Symptom: Noise floor becomes audible when boosting quiet recordings
Cause: 16-bit only provides 96dB dynamic range. Recording quietly means the signal sits close to the noise floor.
Fix: Always record at 24-bit. Storage is cheap. The extra 48dB of dynamic range costs nothing and provides essential safety margin.
!

Mixing sample rates in a project

Symptom: Clicks, pops, timing drift, or audio playing at wrong pitch
Cause: 48kHz project with 44.1kHz files (or vice versa) requires real-time conversion, which can introduce artifacts
Fix: Set your project sample rate first. Convert any imported files to match. Most DAWs offer automatic conversion—enable it.
!

Clipping the input (recording too hot)

Symptom: Harsh digital distortion on loud transients
Cause: Digital clipping is absolute—at 0dBFS the waveform is chopped flat. Unlike analog, there's no soft saturation.
Fix: Record with peaks around -12dBFS. With 24-bit, there's no downside to conservative levels. You can always gain up later.
!

MIDI velocity all at 127

Symptom: Robotic, lifeless performances with no dynamics
Cause: Drawing notes in a DAW often defaults to maximum velocity. Real performances have natural variation.
Fix: Vary velocity intentionally. Use humanize functions. Record with a velocity-sensitive controller. Even 10% variation adds life.
!

Forgetting to dither when bouncing to 16-bit

Symptom: Subtle distortion or harshness in quiet passages of final masters
Cause: Truncating from 24-bit to 16-bit without dither causes quantization distortion on low-level signals
Fix: Always apply dither when reducing bit depth for final delivery. Your DAW's export dialog should have a dither option.
!

MIDI latency from wrong buffer settings

Symptom: Noticeable delay between pressing a key and hearing the sound
Cause: Audio buffer too high. A 1024-sample buffer at 44.1kHz = 23ms latency. Noticeable when playing live.
Fix: Lower buffer size for tracking (128-256 samples). Increase for mixing when latency doesn't matter. Use direct monitoring if available.

Train Your Ears

Critical Listening Exercises

Train your ears to recognize the artifacts and characteristics of digital audio.

EAR
01

Hear Bit Depth Reduction

1. Take a full-quality 24-bit recording
2. Export copies at 16-bit, 12-bit, and 8-bit (use a bit crusher plugin)
3. Listen to the decay of reverb tails and quiet passages
4. Notice the increasing 'grit' and noise as bits decrease
Purpose: Understanding why 24-bit recording matters and what quantization noise sounds like
What to notice: 8-bit has obvious 'retro game' character. 12-bit sounds harsh in quiet sections. 16-bit is transparent for most material. The differences are most audible in quiet, sustained sounds.
02

Sample Rate Comparison

1. Find the same song in 44.1kHz and 96kHz versions (some services offer both)
2. Level-match carefully (higher sample rate files are sometimes mastered differently)
3. A/B test focusing on cymbals, high-frequency synths, and transients
4. Try to identify which is which in a blind test
Purpose: Determine if you can actually hear the difference in sample rates
What to notice: Most people cannot reliably distinguish them in blind tests. If you do hear differences, it may be due to mastering variations rather than sample rate itself.
03

Aliasing Artifacts

1. Use a synthesizer with aliasing enabled or create extreme pitch shifts
2. Play very high notes (above 10kHz fundamental)
3. Listen for phantom lower tones that shouldn't be there
4. Compare with oversampled processing or anti-aliased synths
Purpose: Learn to identify aliasing so you can avoid it in your productions
What to notice: Aliasing creates inharmonic frequencies—notes that don't fit the musical scale. They sound 'metallic' or 'wrong.' Quality synths and plugins use oversampling to prevent this.
04

MIDI Velocity Dynamics

1. Play a simple melody on a MIDI keyboard
2. Record it, then flatten all velocities to 100
3. Compare the two versions
4. Notice how velocity affects not just volume but timbre
Purpose: Understand why velocity variation is essential for realistic performances
What to notice: The flat version sounds robotic and one-dimensional. The performed version has life and expression. Many instruments map velocity to filter brightness, sample selection, and attack time—not just volume.

Self-Check

Self-Assessment

Test your understanding of digital audio and MIDI.

Q
Q1

What's the maximum frequency that can be captured at 48 kHz sample rate?

Show Answer

24 kHz. The Nyquist theorem states that sample rate must be at least twice the highest frequency. 48,000 ÷ 2 = 24,000 Hz. Human hearing tops out around 20 kHz, so 48 kHz captures everything with some margin.

Q2

Why should you record at 24-bit instead of 16-bit?

Show Answer

24-bit provides 144 dB of dynamic range vs 96 dB for 16-bit. This allows you to record at conservative levels (-12 dB peaks) without worrying about the noise floor. You can boost the signal later with no audible noise increase.

Q3

What is MIDI and why doesn't it make sound by itself?

Show Answer

MIDI is a protocol for sending musical instructions: note on/off, velocity, controller values, etc. It's data that tells instruments WHAT to play, not actual audio. It needs to trigger a synthesizer, sampler, or instrument plugin to produce sound.

Q4

Why leave -6 dB of headroom in your mixes?

Show Answer

When multiple tracks sum together, correlated signals can add up (potentially +6 dB for two identical signals). Leaving headroom prevents the mix bus from clipping. It also leaves room for mastering processing.

Q5

What does velocity control in MIDI?

Show Answer

Velocity (0-127) represents how hard a note was played. It typically controls volume, but instruments often map it to multiple parameters: brightness, sample selection, articulation. Higher velocity usually means louder AND brighter.

Remember

Key Takeaways

KEY
Sampling

Sample Rate = Frequency Range

Bit Depth

Bits = Dynamic Range

Headroom

Leave -6dB for Summing

MIDI

Instructions, Not Sound