BasicSynth: Creating a Music Synthesizer in Software

Books on music synthesizers explain the theory of music synthesis, or show you how to use an existing synthesizer, but don’t cover the practical details of constructing a custom software synthesizer. Likewise, books on digital signal processing describe sound generation using complex equations and leave it up to the reader to solve the practical problems of programming the equations. BasicSynth takes you beyond the theory and shows you how to create a custom music synthesizer in software using the C++ programming language.

The first part of the book explains the basic computer algorithms used to generate and process sound. Numerous unit generators are covered, including:

  • Oscillators
  • Envelope generators
  • Mixers
  • Digital Filters
  • Reverb, Flanging, and other effects
  • Sequencers

Subsequent chapters explain instrument design using actual synthesis instruments. Each instrument covers a different synthesis technique, including:

  • Tone generator with selectable waveform and LFO
  • Additive synthesis
  • Subtractive synthesis
  • FM synthesis
  • Wavefile playback

The example instruments are then combined with a text-based scoring system and sequencer to produce a complete working synthesizer.

About the author…

Daniel R. Mitchell holds a B.M. in music composition from Oklahoma Baptist University and a M.M. in music composition from the University of North Texas. He studied electronic music with Merrill Ellis and Larry Austin. He has worked as a professional computer programmer and software architect since 1984.

Table of Contents

What this book is about

Chapter 1: Synthesis Overview
A short review of synthesis techniques and discussion of synthesizer types.

Chapter 2: Sound in Software
How digital systems represent sound

Chapter 3: From Equation to Code
Overview of programming techniques for converting signal processing equations into computer program statements.

Chapter 4: Output File Format
Selecting an output format, writing WAVE files

Chapter 5: Signal Generator
Programming a sine wave oscillator.

Chapter 6: Envelope Generators
Envelope generators vary the peak signal amplitude over time. Several example envelope generators are shown, including AR, ADSR, and variable number of segments.

Chapter 7: Complex Waveforms
Programming complex waveform oscillators, including summing partials, sawtooth, square wave, and triangle wave, FM and AM synthesis.

Chapter 8: Wavetable Oscillators
Improving the oscillator performance and flexibility with wavetables. Wavetable scanning is the most common technique for software synthesis.

Chapter 9: Mixing and Panning
Combining and processing signal outputs.

Chapter 10: Digital Filters
Intuitive explanation of digital filters and example programs for FIR, IIR, allpass, convolution and bi-quad filters.

Chapter 11: Delay Lines
Delay lines shift a signal in time and have many uses in a syntheiszer.

Chapter 12: Reverb
A reverb simulates sound in a large space.

Chapter 13: Flanging and Chorus
Effects units to simulate classic recording studio techniques.

Chapter 14: Synthesis System Architecture
Signal generators and processors alone are not enough. This chapter begins the discussion of how to put it all together into a working synthesizer.

Chapter 15: Sequencer
The sequencer controls timing of notes and synthesizer controls. It is at the core of both score-based and live synthesis systems.

Chapter 16: MIDI Sequencer
A discussion of MIDI and an example of a sequencer specific to MIDI file playback.

Chapter 17: Immediate Sound Output
A discussion of the problems and programming techniques for live sound output.

Chapter 18: Instrument Design
An instrument combines multiple signal generators and processors together. This chapter gives an overview of creating instruments in software.

Chapter 19: Additive Synthesis Instrument
Patch and programming example for a generic additive synthesis instrument.

Chapter 20: Subtractive Synthesis Instrument
Patch and programming example for a generic subtractive synthesis instrument.

Chapter 21: FM Synthesis Instrument
Patch and programming example for a generic FM synthesis instrument.

Chapter 22: Wavefile Playback Instrument
Programming example for an instrument that plays recorded sounds.

Chapter 23: Eight Tone Matrix Instrument
An instrument that combines eight oscillators and eight envelope generators to produce a flexible instrument.

Chapter 24: Notelist
An overview of the Notelist muscial score scripting language.

Chapter 25: Notelist Interpreter Implementation
The programming techniques used to interpret the score.

Chapter 26: BSynth
BSynth combines all the parts discussed in previous chapters into a complete synthesizer program.

Chapter 27: BasicSynth Library
Information on the structure of the libraries and how to compile and use them.

Chapter 28: Further Development
Extending the synthesizer beyond what is in the book

Some other books to read.


Dan Mitchell's Personal Website