Can we make a modern reproduction of the classic top octave generator / top octave synthesiser chips of the 1970s, as used in classic string synths and combo organs? What would be involved? Can we improve on the originals in any way? This page is a summary of what I learned by doing it.
A little background
In the late 1970’s, many synth manufacturers were thinking about producing polyphonic instruments. One musical area where that was already done was in the electronic organs of the time, and so the technology used in organs found its way into synths, and gave birth to the sub-genre known as “string synths”, since that was the best noise they made! Most of these instruments are fully polyphonic – e.g. you can press all the keys down and hear all the notes, although some of them use only a single envelope generator and filter for note shaping (“paraphonic”). So how did these things work?
How do string synths and organs work?
In general, they used the following scheme. A high frequency clock (typically 1 or 2MHz, sometimes 4MHz) drives a top octave generator chip (“TOG”, also known as a “Top octave synthesiser”, “TOS”, or “top octave divider”) which produces all the note frequencies for the top octave as basic square waves. These square waves can then be fed to flip-flop dividers to produce a note an octave lower. The output of that flip-flip can then be fed to another flip-flop to get an octave below than that, and so on. Luckily, we don’t need a ton of individual flip-flop chips, because that arrangement is basically a binary counter, and there are many counter chips available which will produce all the required octaves when fed the highest note frequency.
This all uses quite a few chips (one oscillator of some type, the top octave generator, and twelve dividers) but it produces all the tones you need for an entire organ – around 100 pitches. One hundred pitches from fourteen chips is pretty good, especially in the Seventies!
Can we reproduce this with modern technology?
There are easy bits and hard bits. The dividers are the easy bits, since there are still plenty of divider and counter chips available that would do the job. The difficult bit is the Top Octave Generator. This requires twelve separate dividers that can divide by large numbers (up to ÷478), and it needs to work at least the 2MHz input frequency that the originals managed. There are various ways to attempt this. One obvious solution is to use “custom hardware” in a programmable logic device like a CPLD or a FPGA. Given a large enough device with enough gates, this would work, but it’s not the easiest or most accessible solution. An alternative is to attempt to recreate the dividers in software.
So, can you program a PIC to make a TOG/TOS chip?
You can easily write code to produce a “divide by X” scheme. If we assume our instruction clock rate is the master clock, we’d simply need to output a pulse for each X instructions. We could even hard-code this for maximum speed and efficiency. It’d look something like this:
DividerLoop: bsf OUTPUT_PIN ; Set the output pin high nop ; Do nothing for many instructions until pulse goes low nop ; Etc - add the required number of "nop"s in here bcf OUTPUT_PIN ; Set the output pin low again nop ; Do nothing until pulse goes high again nop ; Etc - add the required number of "nop"s in here goto DividerLoop
This approach works fine for generating a single note, but it doesn’t scale up to multiple notes at all. The required division ratios are not simple multiples of each other (they’re approximations to numbers related by the twelfth root of two – Ouch!) and that means that there’s no simple cycle of outputs we can run through. In fact, the output sequence doesn’t repeat for a very long time. However, there’s another way.
An alternative scheme
How about if we organise the work like this instead?
Here we have no separate top octave chip. Instead, each divider produces a single note frequency and then all the octaves from it. This is much simpler to do, since now our software only has to produce one divider and the subsequent octaves. The Druid “NOTEDIV” code for this is below.
One way to think about this code is that we’re producing naive, non-bandlimited square waves at an output sample rate of 8MHz. This is a divider scheme, not an NCO/DDS with a phase accumulator, so there’s no jitter in the edges. Instead, we accept the limited frequency accuracy of the divider method.
This code uses sample-accurate delay routine. At 8MHz, that’s 125nsecs. Since we have more than 8 outputs, we can’t change them all at once (the output port registers are only 8 bits wide). This means there’s a 2 instruction/250nsec delay between the update for certain outputs. For audio frequencies, this isn’t significant.
The code also uses four input pins on the PIC to select between different division ratios, and then we only need one set of code rather than twelve different firmwares. This gives us a general-purpose “Note divider” chip for building combo organs and string synths.
Are there any improvements we can make over the original chips?
Well, we can run the code faster than the original chips could manage. There are plenty of cheap PICs that will run with a 32MHz clock, giving a 8MHz instruction cycle. This is at least an octave higher than the originals, and two octaves higher than many of the common TOG chips could go.
Some Top Octave chips produced 50% duty cycle waveforms (pure square waves with only odd harmonics) and others produced 33% duty cycles (narrower pulse waves with a marked 2nd harmonic). I was able to add an input to select between two different duty cycle options; 50% and 25%. The 25% pulse wave has the strongest 2nd harmonic of all pulse waves. All of the outputs are affected by the duty cycle choice, unlike what happens if you use dividers, where the divider outputs are bound to be 50% square waves, whatever pulse width you feed in. This is done by ANDing the output with the output an octave higher. Since all the octaves are in a binary counter, this is just ANDing the counter value with a right-shifted copy.
The PIC chips can also be run from an external clock, and they’re not fussy about what frequency it is. In fact, you can run them off an LFO if you want to and…do…really…slow…computing…!! I thought the best use for this facility would be to run the chips from a single master high frequency VCO to which modulation could be applied, and I developed a PCB to allow me to test running a set of twelve NOTEDIV chips from the VCO on a 4046 phase locked loop chip. Unfortunately what I discovered is that there is enormous variation between different brands of 4046 chip, and even between different chips by the same manufacturer. It all worked, but I couldn’t get the range or tuning I wanted without tweaking nearly every resistor value in the circuit for each individual chip. That’s ok for a one-off or for experimenting with, but no use as a project for people who just want something simple to help them build the string synth of their dreams. As a result, my development of this idea got back-burnered at this point, but I do have a few PCBs and NOTEDIV chips, so if you’re interested in taking it further and would like one, contact me.
This is as far as I got with this. I do have a schematic for the PCB which I’ll put up at some point.
- Note generator PIC 16F1828 ASM code NOTEDIV
- Assembled NOTEDIV HEX code from above file
- NOTEDIV datasheet (unfinished)
- NOTEDIV schematic page 1
- NOTEDIV schematic page 2
- NOTEDIV schematic page 3
If you don’t want external pitch modulation, it would possible to modify the code to use the internal clock on the PIC. This would mean that you’d have free-phase notes, although octaves would still be phase locked (this is typical for electronic organs anyway, and is a part of the sound). Using an external crystal would give the most stable and accurate results, but in some ways, that’s not the point here, and it might be that the internal RC oscillator would be good enough.