﻿ Wavetable Oscillators – Electric Druid

# Wavetable Oscillators

This page is an overview of two techniques for creating wavetable oscillators.

## DDS – Korg DW series and similar

The Korg DW series use a DDS oscillator scheme. Korg called it ‘DWGS’ for ‘Digital Waveform Generator System’ in the 80’s style of inscrutable acronyms, but in reality it is a single cycle of digitally stored waveform that can be played back repeatedly.

It uses a counter (phase accumulator) to keep track of the waveform phase, and then uses the counter value as a lookup into a wave memory to convert the phase value into an output value. By altering how much the counter is incremented, the samples can be read out of the memory either more or less quickly, producing different frequencies.

In order to avoid aliasing, the system uses a different wavetable for each octave. These wavetables are arranged so that they lose harmonics as you go up the octaves. In this way, no harmonics above the Nyquist limit are ever present.

In the example above you can see the way that the tables are arranged, with long, detailed wavetables for the lowest octaves, going up to shorter tables for the higher octaves. The lowest octaves have a good quality bandlimited ramp wave, but as you go up the octaves, more and more harmonics are removed until the highest octave only has the first and second harmonics. The enlarged image also shows the effect with 3 other DW waveforms.

## Variable sample rate – PPG Wave and similar

The PPG Wave uses a different digital oscillator scheme. Instead of having a large wave memory and missing samples out, it uses a smaller wave memory and reads it at different speeds – it uses a variable sample rate. Paul Maddox’s Monowave was based on the PPG and uses a similar scheme, shown below.

Basic pitch selection is done by the variable clock. The overall oscillator octave is determined by a binary counter whose outputs are selected by an analogue switch. The output from this switch feeds another binary counter that generates phase addresses for the wave memory. The high byte of the wave memory address acts as waveform selection. The output from the wave memory is fed to an output DAC.

In his piece Birth of the Prophet VS, Chris Meyer describes how the Sequential design team wondered which approach to use, before picking the PPG as a good model to use. Dave Smith Instruments then copied the Prophet VS oscillators for the recent Evolver.

## 8 thoughts on “Wavetable Oscillators”

1. Lothar Mantuffell says:

Its said that PPG is a Phase-accumulator run at high ca 40Mhz and skips counts on the “table readout” as to achieve high en notes but less table resolution but i dont know the details. Dave S have said the PVS is also based on a phase accumulator thats why it can multiplex from a common memory just as PPG as well as Evolver is and it aliases terrible at mid-top notes. However Monowave is phase accumulator plus divider stages as you described. DSS1 however uses real variable sample rate for both static waves and samples but also uses shorter waves for each higher octave on static waves.

http://www.ppg.synth.net/wave22/

1. Hi Lothar,

Yes, I think you’re right. In the ten years since I wrote this article, I’ve come to think that these two schemes aren’t actually very different at all. They overlap a lot in all but a few extreme cases. Many things that use a “variable sample rate” actually use an NCO to generate that rate – the PPG is in this category. It’s also true that in the upper octaves it uses a shorter table (or skips samples in the longer one) because it can’t generate the fast clocks required (With a 256-entry table, a note at 4KHz needs a sample rate over 1MHz). So there is very much a continuum between these two end points, rather than an either/or situation as I presented it here.

Tom

2. Antti Huovilainen says:

PPG Wave, Prophet VS, Ensoniq ESQ / SQ80 and Korg DW series all use the same ordinary phase accumulator method. The difference is simply in how high the samplerate is and whether mipmapping is used. The whole supposed “phase accumulator VS ‘skipping samples'” thing seems to be based on one poorly worded interview, where the interviewer didn’t understand the technology well enough to ask for a clarification.

1. Yes, I agree, Antti. Since I wrote this article, my understanding has evolved and I now think of these “different” techniques as more like different points on a continuous spectrum. Several of these instruments cross the line from “phase accumulator” to “skipping samples” anyway. It really depends as you say on how high the sample rate is and whether enough of the phase is used as an address that samples get skipped.

3. René Ceballos says:

Just one additional consideration: The fact that the wavetable is small imposes a limit to the number of partials that the loop will contain, introducing the first stage of bandlimiting. In most of those synths, playing low notes beyond the 61-keys range quickly show the harmonic loss.

1. Yes, true. But even with a 256-entry wavetable, you could theoretically have over 100 harmonics. That’s up beyond 10KHz for a 100Hz bass note. The other mitigating factor is that at very low pitches, you start to hear the actual stair steps in the stored waveform, which introduces more high end – the Prophet VS was famous for this.
That limitation definitely explains why the Korg DW’s used 2K tables for the lowest octaves though. Like that, they could have full bandwidth waveforms for the bass notes, and only limit the harmonics in the higher octaves where you wouldn’t hear the difference anyway. Their “DWGS” (or “MipMapping” in modern parlance) is still a good system, especially if you’ve got a little bit more memory than they had available.

2. The Korg DWGS in the DW-8000 output a squared-off wave with no interpolation. The waveform certainly had energy up to the top of human hearing, and thats before you consider the aliasing that came from this design. I wouldn’t agree that the wavetable imposes a limit to the partials. An extreme example would be that a two-bit, two-entry wavetable would suffice to output a square wave with harmonics as high as you want (and to reflect off the Nyquist limit as aliasing.)

4. Tom surely means to say that with a 256-entry table you could theoretically SPECIFY over 100 harmonics.

The case you outline for using 2k for bass notes and far less for treble on the basis that there’s no need to specify harmonics you can’t hear is true but only half the picture. Had they doubled the storage, for instance, they could have eliminated substantial aliasing, which is really in-your-face on this instrument. (Set a 4′ sine wave, play in the 4th or 5th octave, while bending a 1-semitone pitch bend slowly…)

When I simulated all the DW-8000 factory patches on my soft-synth Moselle, at first listen I had absolutely nailed it. Listening more closely though, the real thing was grittier. I determined that my default linear sample interpolation was equivalent to the ear to 16x oversampling, and that interpolation plus 2x oversampling removed all audible artifacts for any waveform I could find or design.

Accordingly, Moselle’s Stored-Wave Oscillator (SWO) by default mipmaps four buffers per octave, 2x oversampled at the highest note in that range so a bit more oversampled on lower notes, and linear-interpolated. Whatever basic waveform you specify and however you specify it, that mipmap is done.

But only by default. Just turn off interpolation, do 1x oversample, and use one buffer per octave, and even the exact aliasing of the DW-8000 proved trivial to simulate.