Pro
Audio and DSP Programming in C++
Oscillators, filters, FFT and effects you can hear, under real-time rules
Level: Intermediate to advanced · 12 lessons · about 16 hours
What you will be able to do
- Represent sound as samples, and explain sample rate, bit depth, decibels and aliasing
- Process audio in blocks with
std::span, mix and apply gain without clicks or clipping - Build band-limited oscillators, envelopes and LFOs, and combine them into a small synth voice
- Follow the real-time rules of the audio thread, and prove by counting that a callback does not allocate
- Pass parameters and messages to the audio thread with atomics and a lock-free queue
- Design biquad filters, check their stability, and measure their frequency response
- Implement an FFT, choose a window, and read a spectrum correctly
- Build delay and reverb effects, and explain how a JUCE plugin is put together
Who it is for
- C++ developers who want to write audio plugins, synthesizers or game audio
- Musicians who code and want to understand what their tools do to a signal
- Engineers curious about real-time programming, where a late answer is a wrong answer
- Programmers who found signal processing too abstract in a textbook and want to run it and hear it
Before you start
The course project
You build a small effects-and-synth engine one block of samples at a time: oscillators and envelopes make the sound, filters shape it, delay and reverb place it in a space, and a lock-free parameter system lets another thread control it safely. Every stage plays in your browser. The last lesson wires the pieces into one plugin-shaped class with a simulated host, the same structure a JUCE plugin has.
Lessons
- 1Sound as Numbers: Samples, Sample Rate and Your First ToneFree sampleTurn air pressure into a list of floats, write a WAV file by hand, then hear and measure what bit depth and aliasing do, including a rising scale that plays backward.50 min
- 2Sample Buffers: Blocks, Channels, Gain and ClippingProLay out stereo audio in memory, process it in blocks with std::span, mix and apply gain in decibels, tame clipping with a soft clipper, and remove the click from a gain change.40 min
- 3Oscillators: Phase, Waveforms and Band-LimitingProBuild sine, saw, square and triangle oscillators on a phase accumulator, measure their aliasing with a small DFT, then reduce it with PolyBLEP and wavetables.45 min
- 4Envelopes and LFOs: Giving a Tone a ShapeProShape a raw oscillator into notes with an ADSR state machine, add tremolo, vibrato and FM, play a melody from a table, and count what polyphony and voice stealing cost.45 min
- 5The Audio Thread: Real-Time Rules and What Breaks ThemProWhy audio code has a deadline every block, what allocation, locks, logging and denormals do to it, and how to prove by counting that a callback obeys the rules.35 min
- 6Talking to the Audio Thread: Atomics and Lock-Free QueuesProSend parameters, messages and whole wavetables to the audio thread without locks, with atomics, a tested ring buffer and a triple buffer, and free old objects on the right thread.35 min
- 7Filters from Scratch: Impulse Response and Frequency ResponseProBuild moving average, FIR and one-pole filters, measure their frequency response with sine tones, match it to the complex formula, and see why feedback can blow up.50 min
- 8Biquad Filters: The Cookbook, Stability and Smooth ChangesProDesign low-pass, high-pass, band-pass, notch, peaking and shelving biquads from the Audio EQ Cookbook, check them for stability, measure their response, and change them without clicks.50 min
- 9The FFT: Reading the Frequencies in a SignalProBuild the DFT from correlation with sines, turn it into a radix-2 FFT, read bins correctly with a Hann window, and use fast convolution, checking every step against a slower reference.45 min
- 10Delay Lines: Echo, Chorus and Fractional DelayProBuild a circular delay line that never allocates in process, then use it for feedback echo, chorus and flanging, and measure the decay, treble loss and clicks each design choice causes.45 min
- 11Reverb: Building a Room from Delay LinesProBuild a Schroeder reverb from comb and allpass filters, measure its RT60, add damping, move to a feedback delay network with a Householder matrix, and hear a dry hit become a room.40 min
- 12Inside a Plugin: JUCE Structure and the Whole EngineProSee how VST3, AU, AAX and CLAP plugins are shaped, how JUCE's AudioProcessor lifecycle works, then run a complete synth and effects engine whose output does not depend on the block size.25 min