[sdiy] Synthex Oscillator

KRiSh krish0005 at gmail.com
Sat Jul 8 15:53:53 CEST 2017


Hi,

These comments by Mr. David Thomas were posted by him during the Finnish
reissue attempt on Soundyon's "ELKA Synthex" Facebook page.

I'm forwarding it here since i believe it's one of the few interesting
attempts to deep dive into Mario's work on the old Synthex oscillators i
found on the web, as also now this thread on SDIY is.

"
Well, it depends a bit on your definitions, but I would call them digital
oscillators.
They generate rising and falling waveforms by up/down counters which go
into DACs.

On the oscillator controller board (5840), there are four controller
circuits which generate the variable clocks for all the oscillators on the
voice boards. (Recall that each voice has two oscillators and the voices
may be divided into upper and lower sections which may be modulated
differently). The clocks are generated by an LM331 VCO; their frequencies
vary based on the master tuning, detune, pitch bend, and LFO modulation. If
we are to believe the notation on the schematics, the nominal reference
frequency out of the VCO is 15.625 kHz. By means of a PLL, the frequency of
that clock signal is then multiplied by a factor of 256 to 4 MHz. The four
high-frequency reference clocks (CP1U, CP2U, CP1L, and CP2L) are then sent
to the voice cards--two voice cards receive the "upper" reference clocks
and two voice cards receive the "lower" reference clocks.

On the voice cards, the clocks are then divided back down by programmable
counters; the count values are set by the CPU according to the note and
octave required for that voice. I haven't worked out what all the constants
are for each note, but the ratios will determine the accuracy of the
temperament.

Finally, THAT clock goes to an eight-bit up/down counter, which creates the
rising and falling values for the sawtooth and triangular waveforms. The
output of the counter goes to a binary-weighted resistor DAC, with a
smoothing capacitor.

But wait--this is where Mario jumps into space! Just before the outputs
from the binary up/down counters hit the BWR DAC, he has inserted XOR gates
which can perform a 1's complement on the rising and falling binary
values--switching the waveform from rising to falling, or vice-versa,
depending on whether the output of the other oscillator of the pair is high
or low (relative to its midpoint, more or less). I don't know what you call
this form of cross-modulation; it's not any kind of FM you will find in a
textbook. It actually seems a bit more like wave-folding.

The DAC is pretty much the last thing in the oscillator; the signals from
the two oscillators are mixed (there is control of the balance between
them) and then go straight into the Curtis VCF circuits.

To my mind, there is not much difference between pulling increasing and
decreasing binary values out of an up/down counter or out of a wavetable. I
would call either one a digital oscillator.

In my previous comment, I glossed over a lot of details in the note scaling
and the octave dividers on the voice cards. Here is a more detailed
analysis (which also corrects some mistakes).

The Elka Synthex has four voice cards (5800); each card supports two voices
and each voice has two oscillators, so each voice card contains four
oscillators. The oscillator controller board (5840) produces four
high-frequency reference clocks (CP1U, CP2U, CP1L, and CP2L) which are sent
to the voice cards--two voice cards receive the "upper" reference clocks
and two voice cards receive the "lower" reference clocks.

If A4 = 440.0 Hz, then the nominal high frequency clock is

fcp = C18
= 440 * 2^13 * 2^(3/12)
= 4,286,473.26 Hz

(A17 is 13 octaves above A4, and C is 3 semitones above A.)

There are three stages of binary counters in each oscillator on a voice
card. The first one is the semitone divider, which resembles a clock
prescaler; it is a presettable counter which performs a form of integer
division to produce a pulse stream in which the _average_ number of pulses
per second is a multiple of the frequency of the selected note. The second
stage is a 7-bit counter used as a simple octave divider. It divides down
the average frequency of the pulse stream by factors of 2, to produce a
pulse stream that is proportional to the frequency of the selected note in
the selected octave. The third stage is an 8-bit counter that produces
increasing binary values that represent a rising waveform; the counter
outputs can be inverted to produce a decreasing sequence of values for the
triangular waveform.

Those values are passed through a binary-weighted resistor
digital-to-analog converter to produce an analog waveform. When producing a
triangular waveform, it takes 512 high-to-low transitions in the pulse
stream to produce one complete waveform cycle (256 rising, 256 falling).
For all other waveforms, it takes 256 high-to-low transitions in the pulse
stream to produce one complete waveform cycle. The processor changes the
selection on the octave mux to compensate for the difference.

Semitone divider counter:
Voice 1, OSC 1: IC1D, IC2D (74LS161)
Voice 1, OSC 2: IC4D, IC3D (74LS161)
Voice 2, OSC 1: IC5D, IC6D (74LS161)
Voice 2, OSC 2: IC8D, IC7D (74LS161)
Octave divider counter:
Voice 1, OSC 1: IC1G (74LS393)
Voice 1, OSC 2: IC4G (74LS393)
Voice 2, OSC 1: IC5G (74LS393)
Voice 2, OSC 2: IC8G (74LS393)
Waveform counter:
Voice 1, OSC 1: IC1I, IC2I (74LS193)
Voice 1, OSC 2: IC4I, IC3I (74LS193)
Voice 2, OSC 1: IC5I, IC6I (74LS193)
Voice 2, OSC 2: IC8I, IC7I (74LS193)

[continued…]

The semitone divider counter is a presettable 8-bit up-counter running at
fcp. The semitone counter always counts to 255 and then reloads its
starting value. The starting value comes from two memory-mapped latches,
except for the MSB, which is tied low, and the LSB, which comes from a JK
flip-flop (IC2F). Since the MSB input is tied low, the minimum starting
value that can be loaded into the counter is 0; the maximum starting value
that can be loaded into the counter is 127.

At any of the possible starting values, the MSB output of the counter
(IC2D, pin 11) is low, which inhibits clock pulses from reaching the octave
divider counter and mux. When the counter hits 128, the MSB goes high,
which enables the CPx clock to the divide-down counter.

When the counter hits 255, the carry out (TC) goes high, which causes the
counter to re-load the starting value on the next cycle. The carry out, may
also, depending on the setting of the control latch, cause the JKFF for the
LSB to toggle (if CD and SD are both high).

Resetting to the starting value causes MSB output of the semitone divider
counter to go low, which clears the octave-divider counter and disables its
clock.

The purpose of the semitone divider counter is to reduce the average rate
of the high-frequency clock pulses reaching the octave divider, by a ratio
proportional to the interval of the selected note below C. It counts a
variable number of clock cycles during which the clock is suppressed, which
we will call "n0", followed by a fixed number of clock cycles (128) during
which the clock is enabled, which we will call "n1". The ratio between the
frequency of the clock, fcp, and the average frequency of the pulses
reaching the octave divider, fs, must be proportional to the musical
interval between the reference note (C) and the note selected on the
keyboard:

fs = fcp * n1 / (n0 + n1)

Solving for n0,

n0 = n1 * (fcp/fs - 1))

and rounding to the nearest half-bit,

n0 = round(2 * n1 * (fcp/fs - 1)) / 2

we get the following table of ideal (A4 = 440Hz) frequencies and the
average pulse rates produced by the Synthex semitone divider:

Pitch Freq. (Hz) n0 fs (Hz) Error (cents)
Db 2,270,680 113.5 2,271,920 +0.94
D 2,405,702 100.0 2,406,441 +0.53
Eb 2,548,752 87.5 2,546,026 -1.85
E 2,700,309 75.0 2,702,801 +1.60
F 2,860,878 64.0 2,857,649 -1.96
Gb 3,030,994 53.0 3,031,318 +0.18
G 3,211,227 43.0 3,208,588 -1.42
Ab 3,402,176 33.5 3,397,329 -2.47
A 3,604,480 24.0 3,609,662 +2.49
Bb 3,818,814 15.5 3,823,474 +2.11
B 4,045,892 7.5 4,049,215 +1.42
C (fcp) 4,286,473 0.0 4,286,473 0.00

[continued…]

While some notes may have an absolute pitch error of over 2 cents, it is
unlikely to be noticeable, since all the oscillators in the Synthex will
have the same characteristic and the error is the same in every octave. Two
voices playing in unison or octaves will not have beats.

How do you get a "half-bit"? Dithering! The JK flip-flop can be set to
toggle the LSB of the starting value of the prescaler on alternating cycles.

The semitone divider counter will suppress the clock going to the octave
divider until the count reaches 128, so the starting value of the counter
must be set to (127 - n0). The bits of the starting value are stored in the
OCT and ST latches in a peculiar order, probably dictated by board layout
considerations. If the bits of the starting value are designated S[6:0],
S[1:2] are stored in register OCT D[3:2], and S[3:6] are stored in register
ST D[7:4]. The value of S[0] is produced by the JK flip-flop; if S[0] is 1
then ST D[3:2] = 10; if S[0] is 0 then ST D[3:2] = 01; and if S[0] toggles
then ST D[3:2] = 11. Here is how the constants would appear on the data bus:

Pitch OCT D[7:2] ST D[7:2]
Db xxxx11 100011
D xxxx10 110010
Eb xxxx00 101011
E xxxx01 011001
F xxxx11 111010
Gb xxxx10 100101
G xxxx01 010101
Ab xxxx11 110111
A xxxx11 001110
Bb xxxx00 011111
B xxxx00 111111
C xxxx11 111110

The octave divider is a 7-bit ripple counter, clocked by the 4 MHz stream
of CP pulses gated by the prescaler MSB. The CP pulse stream and the
outputs of the octave divider go into an 8:1 mux, which selects the output
with appropriate pulse rate for the note specified by the octave selector
and the keyboard. The octave mux is selected by bits D[7:5] going into the
OCT latch.

The highest playable note on the Synthex is C8 (4,186 Hz). In triangular
waveform mode, the oscillator takes 512 clock pulses to go through a full
cycle, so that corresponds to an average clock rate of 2,143,236 Hz coming
out of the octave divider/mux--a divide by 2 of the high frequency clock.
The octave divider and mux are only capable of covering 8 octaves, but the
Synthex has a range of 10 octaves (if you count the lowest playable note,
C-1, as its own "octave"). For some of the lower octaves, the octave
divider does not use the gated high-frequency clock as its input; rather,
it uses the gate signal itself. This is controlled by bit D[4] going into
the OCT latch. The point at which the clocking regime shifts from gated to
direct cannot be determined from the schematic; it is controlled by the
firmware. There are some octaves that could be produced either way. The
results would be different; the direct clocking regime provides a more
uniform stream of pulses to the oscillator which should produce
less-distorted ramps.

Theoretically, the combination of clocking regime and octave divider gives
a range of 15 octaves, but some of them are certainly not used, as they are
infrasonic. As it is programmed, the lowest note that the Synthex
oscillator will produce is 8.176 Hz, but it could be hacked to go down to
0.1277 Hz! That frequency (11 octaves below Middle C) would probably not
pass through the subsequent VCF and VCA stages, though, as they are not
DC-coupled."

The comments are dated around 12 of April 2015, and i'd leave to you folks
the analysis and discussion on the accuracy of them.

I don't know if David already is on this list or on AH, and can chime in,
but it can be contacted here i think:
https://www.facebook.com/david.thomas.98096

*@Tom*: if you'v been already in touch with Maggi then i recommend to
enquire him further with the detail of your conclusions/analysis.
As you might have already noticed he's quite slow on replying (ultra-busy)
but always available and interested in discussing design solutions and
technicalities.

;-)

K

2017-07-08 14:26 GMT+02:00 Tom Wiltshire <tom at electricdruid.net>:

>
> On 8 Jul 2017, at 10:32, Ove Ridé <nitro2k01 at gmail.com> wrote:
>
> > But a discrete DCO, it is. I'm still trying to wrap my head around the
> > divider part of the circuit, ie the red bit.
>
> I'd say it's a discrete digital oscillator. The only part that's analog is
> the Pulse output, derived from the ramp/triangle in the usual style. The
> other waveforms are generated directly by the 8-bit DAC, and that makes
> them digital.
> For me, a DCO has digital timing and analog waveform creation.
>
> But I don't much care what we call it as long as I can understand it!!
>
> Tom
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20170708/ebfacbc3/attachment.htm>


More information about the Synth-diy mailing list