This course introduces C++ programming through the development of a small audio / synthesizer application.

The goal is to learn the language step-by-step while building a working audio system.

Prerequisites:

  • A Linux system (Debian or Ubuntu recommended)

  • GCC (GNU Compiler Collection)

  • The make build tool

  • Basic familiarity with the command line

  • Some mathematical background (helpful for the audio and signal-processing sections)

Windows users can follow the course using Windows Subsystem for Linux (WSL).

The examples in this course were tested with the following development environment.

Compiler:

g++ (Debian 12.2.0-14+deb12u1) 12.2.0

Required libraries:

libsdl2-2.0-0 2.26.5+dfsg-1 libsdl2-dev 2.26.5+dfsg-1

Install the required dependencies on Debian / Ubuntu using:

sudo apt install build-essential libsdl2-dev

This installs:

  • g++

  • make

  • required system libraries

  • SDL2 development headers

The source code used in this course is available on GitHub:

The course gradually builds a small software synthesizer, introducing new C++ concepts in each chapter.


C++ 01

Introduction to programming fundamentals, development tools, and basic C++ syntax.

Contains:

  • A small information program that prints platform limits using limits.h (tutorial 00)

  • A classic Hello World program examined down to the assembly level (tutorial 01)


C++ 02

Covers core language features such as variables, control structures, functions, and fundamental data types.

Contains:

  • An introduction to the SDL (Simple DirectMedia Layer) library (tutorial 02)

  • An introduction to header files and basic oscillator design (tutorial 03)


C++ 03

Introduces object-oriented programming concepts, including:

  • Classes

  • Composition

  • Inheritance

Contains:

  • Composition and envelope generators for synthesizers (tutorial 04)


C++ 04

Applies object-oriented concepts to a simple synthesizer implementation.

Contains:

  • A hard-coded synthesizer with a low-pass filter (tutorial 05a, minimal interface)

  • An extended version with debug output, fonts, and a visual cutoff frequency display (tutorial 05b)


C++ 05

Expands the synthesizer with more advanced audio functionality.

Contains:

  • Polyphony and multiple voices (tutorial 06)

  • Master / slave oscillator synchronization (hard sync) (tutorial 07)


C++ 06

Focuses on performance and systems concepts.

Contains:

  • Algorithms, data structures, and computability concepts

  • Audio ring buffer implementation (tutorial 08)


Build Tools: From make to cmake

A short section explaining modern build tools and how to migrate projects from Makefiles to CMake.


From raw C++ to GUI: Introducing the Qt Framework

Create applications with GUI and native widgets.


What You Will Build

By the end of the course you will have implemented a basic software synthesizer, including:

  • Oscillators

  • Envelope generators

  • Filters

  • Polyphonic voice handling

  • Audio buffering

  • SDL-based audio output

Along the way you will learn:

  • core C++ language fundamentals

  • object-oriented design

  • audio programming basics

  • build systems

  • practical Linux development workflows