[sdiy] Digital Waveshape Generator.

rburnett at richieburnett.co.uk rburnett at richieburnett.co.uk
Sat Jul 12 01:30:28 CEST 2025


Well done getting this working with what was cheaply available back 
then, and on the A+ result :-)

> I don't see any advantages to a divider approach.  And there are a
> number of disadvantages, such as the lack of portamento that you
> mentioned in your writeup.

The advantage of this divider approach is that you don't get any 
aliasing because each pitch period is an integer number of samples at 
whatever (variable) sample rate the wavetable is currently being played 
out at.

This isn't the case for phase-accumulator / DDS based designs with a 
fixed sample rate, where you either have to have lots of copies of the 
waveform in memory with progressively fewer harmonics for the higher 
notes to eliminate aliasing _OR_ instead choose a *very* high sample 
rate and settle for whatever aliasing remains.

Agree with all of the disadvantages regarding pitch-period quantisation 
preventing smooth glides and pitchbends though.

However, these days there is another viable option I would consider...

Run a DDS chip like AD9834 from a decent high-frequency quartz crystal 
clock module like 20MHz making a programmable-frequency sinewave output. 
Program the DDS to output a sinewave that is 256x the required note 
frequency. LPF the high-frequency sinewave output from the DDS with a 
reconstruction filter then put it through a comparator to turn it into a 
squarewave clock. (Most DDS chips have a comparator built in for this 
task, and the datasheet tells you how to design the reconstruction 
filter.) The reconstruction filter is important because it turns the 
sampled sinewave output back into a continuous-time sinewave so that you 
dont get clock jitter when the comparator squares it up. You then use 
this high-frequency clock to drive your 256-step counter and play out 
the wavetable from memory via the DAC as before.

The advantages here are:

1. The frequency output from a DDS chip can typically be programmed to 
28 or even 32 bits accuracy so you won't suffer any noticeable stepping 
on pitchbends and slides, and can support alternative tunings, etc.

2. The digital value you program into the DDS is proportional to the 
wanted note frequency instead of its period, so no awkward reciprocal 
calculations to do in the micro's software.

3. You can use pretty much any nominal fixed frequency crystal 
oscillator as the master oscillator to clock the DDS. It no longer needs 
to be a common multiple of note frequencies etc. (Having a high DDS 
master clock frequency makes its reconstruction filter design easier 
though.)

4. Since the wavetable playback part is still operating with a 
variable-frequency continuous-time clock you don't suffer any aliasing. 
You don't need the multiple copies of each waveform with upper harmonics 
progressively culled that you typically would need for phase acc based 
oscillators operating at low sample rates like 48kHz.

5. No PLL's required with their awkward loop filter calculations, 
limited locking ranges and finite settling times. The DDS responds to 
pitch changes instantly.

6. Most DDS chips use SPI so you can sit several on one SPI bus in a 
multi-osc ot polyphonic synth if you want.

That's my thoughts! :-)

-Richie,


On 2025-07-11 23:31, Donald Tillman wrote:
> Check out Don Lancaster's "Pitch Generators for Electronic Music",
> Popular Electronics magazine, March 1974.  It's basically the same
> thing.
> 
> 
> https://www.worldradiohistory.com/Archive-Poptronics/70s/1974/Poptronics-1974-03.pdf
> 
> Of course the divider approach has been used in a number of electronic
> organs to produce a dozen pitches at once that don't need to be
> individually tuned.  And Top Octave Generator chips are probably still
> available.  But they famously suffer from pitch inaccuracies and an
> unnatural syncing between the pitches.
> 
> The Hammond Organ ("1935 consumer technology") mechanically bases its
> pitches on a common motor, but that involves a ratio of three gear
> values, so it's significantly more accurate.
> 
> I don't see any advantages to a divider approach.  And there are a
> number of disadvantages, such as the lack of portamento that you
> mentioned in your writeup.
> 
> And I especially don't see any advantages over an accumulator
> approach.
> 
> HOWEVER... in electronic music design, the goal is not to be perfect,
> but rather that your imperfections are musical and charming.
> 
>   -- Don
> --
> Donald Tillman, Palo Alto, California
> https://till.com
> 
>> On Jul 11, 2025, at 12:19 PM, Phillip Harbison <alvitar at xavax.com>
>> wrote:
>> 
>> Hello, Synth-DIY people. I'm a long time listener but infrequent
>> poster. The following has been on my mind and IO would appreciate
>> your opinions.
>> 
>> I graduated from the University of Alabama in Huntsville (UAH) in
>> 1981 with a degree in Electrical Engineering. For my senior design
>> project I designed and implemented what I called a Digital Waveshape
>> Generator (DWG). I intended this DWG to be the core of a single
>> voice in a synthesizer. A block diagram and design document are
>> attached.
>> 
>> I had a strong interest in music synthesizers as I was a trained
>> classical pianist and a fan of progressive rock music. For most of
>> high school I dreamed of being the next Rick Wakeman or Larry Fast,
>> but I did not have the necessary gear. I intended to build my own,
>> but after graduation I was to busy with Real Life to work on toys.
>> 
>> One reason I lost interest is at the time I thought the master clock
>> frequency needed to be 256 times the least common multiple of the 12
>> notes of the top octave. I don't recall how I calculated it, but I
>> thought I needed a clock in the hundreds of megahertz and in 1980
>> the only technology capable of handling such frequencies was ECL,
>> That was not happening on a poor student's budget. I still got an A+
>> because my advisor did not give a damn if my DWG was musical. He saw
>> it simply as a cool function generator.
>> 
>> Now that I am semi-retired I revisited my design and the first thing
>> I did was realize that I was wrong about the master clock frequency.
>> For one thing, there is no Least Common Multiple possible since 11
>> out of 12 notes are not integers. I also realized I don't need to
>> find divisors that will produce the exact frequency of each note.
>> Getting within a few cents would be close enough for rock & roll.
>> After a lot of calculating I determined that a 1802240 clock and a
>> 16-bit divisor would allow me to generate all notes of the top
>> octave within 0.02% of perfect.
>> 
>> My prototype was wire-wrapped. Now I am wondering if I should create
>> some circuit boards and realize my dream of a DIY digital
>> synthesizer. Is this something anyone else would find interesting?
>> Am I wasting my time? I would appreciate any comments.
>> 
>> --
>> Phil Harbison
> ________________________________________________________
> This is the Synth-diy mailing list
> Submit email to: Synth-diy at synth-diy.org
> View archive at: https://synth-diy.org/pipermail/synth-diy/
> Check your settings at: 
> https://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org


More information about the Synth-diy mailing list