For the past week or so I’ve been researching a really interesting form of audio programming called wave table synthesis. From a programming perspective, it is a very interesting concept, designed as an optimization for early digital synths. The basic concept is that instead of computing waveforms on the fly, a single cycle of a waveform is computed, cached, retrieved from memory and used as a base from which any other frequency can be derived. This eliminates the need to repeatedly calculate multiple oscillators, which can be computationally expensive. When multiple wave shapes are be stored in memory, they can be blended together, using additive synthesis ( read: addition ), to create more interesting tonal arrangements.
As a first step to understanding wave tables, I built the somewhat the beastly looking waveform generator prototype below. It allows you to modify a single cycle waveform by combining wave shapes and adding modulation, noise and distortion. The actual sound produced is the result of repeatedly cycling through single cycle wavelet over and over again. Be careful not to have the volume up too loud when playing, this thing is not subtle!
The screenshot below is taken from The Circle Synthesizer by Future Audio Workshop. This is a great visual representation of a wave table. It doesn’t get any more literal than this. It display many wave shapes, each with their own timbre and harmonic qualities. The Circle Synth allows two wave forms to be blended together. Wave table synthesizers are quite unique in that multiple wave shapes can be morphed between each other through the use of amplitude envelopes. I plan to explore this concept in the next prototype.
One of the big mysteries for me was how I could derive multiple frequencies from a one cycle waveform. The answer is actually quite simple. I’ll attempt to demonstrate.
The first image below represents a very plain sine wave. For the sake of this article, lets say that this single cycle consists of 2048 numbers between -1 & 1, evenly distributed in time. We will call the numbers “samples”. If we include all of the samples in our playback we hear the full representation of the sine wave. Let’s say that it is oscillating at 440hz.
Instead of using all the samples from the sine wave, we can use every other one or half of the original 2048. Nothing about our time variable has changed though, so we can still use include 2048 samples by repeating the the selection of 1024. This results in an 880 Hz tone. You can see in the image below that the number of cycles doubled. This also demonstrates the circular nature of a wave table, wherein looping occurs.
Taking this one step further, lets say we only use every fourth sample. Now the wave is repeating at four times the original frequency and producing a 1760hz.
You might notice in the example that the frequency knob is a little buggy. I’m working on it… The interpolation method I’m using is not ideal.
I found some really great resources while researching wave tables. Here are a few that really helped clarify some things for me: