text files

This commit is contained in:
Gordon JC Pearce 2025-01-08 13:48:57 +00:00
parent 9cdcf0582f
commit 166008f64f
3 changed files with 95 additions and 0 deletions

37
README.md Normal file
View File

@ -0,0 +1,37 @@
alphaOsc
========
alphaOsc is a proof-of-concept of a Roland Alpha Juno DCO written in C++. This all stems from a [discussion thread](https://www.kvraudio.com/forum/viewtopic.php?t=420194) on the KVRAudio forums.
![alphaOsc screenshot][alphaOsc.jpg]
Description
-----------
This is just the bare bones oscillator, based around what I'm guessing is in the Alpha Juno's 87123 DCO chip. It does not work particularly well and it is not particularly efficient. It does not have any anti-aliasing and does not perform well much above middle C.
WARNING! alphaOsc produces a lot of sharp unfiltered squarewaves with loads of high-frequency content. If you are exposed to alphaOsc's harsh and unsettling racket, you only have yourself blame.
Building
--------
alphaOsc is written using [Distrho Plugin Framework](https://github.com/DISTRHO/DPF). Once you have cloned the git repository, pull down the DPF submodule:
git submodule update --init --recursive
and build alphaOsc:
make
This will compile the jack standalone version and LV2 version. It ought to be possible to also compile VST/VST3 and AU versions but these have not yet been tested.
Installing
----------
There are no specific installation instructions because the jack standalone version can just be run as `./bin/alphaOsc`. You can install the LV2 version into your local LV2 plugins with:
cp -r ./bin/alphaOsc.lv2 ~/.lv2/
Using alphaOsc
--------------
Start alphaOsc either using the jack standalone version or in a plugin host of your choice. Connect a MIDI source to its MIDI input and connect its audio output to something that will let you hear its output. This plugin is monophonic, and sounds the highest note played with a short "queue" of notes for rollover.
Acknowledgements
----------------
Massive thanks to [falkTX](https://github.com/falkTX) for writing DPF and all the many amazing folk who contributed to it, itoa, the prolific aciddose, TechnoManiac, and mystran (and probably others) from the KVR Audio forums for nerd-sniping me so hard into doing this, Adam Inglis, Russell McClellan, Tom Wiltshire, and Richie Burnett from the synth-diy mailing list for various helpful discussions over the years about the Alpha Juno, and of course all the unknown heros who scanned and uploaded all those service manuals and circuit diagrams.

58
TECHNICAL.md Normal file
View File

@ -0,0 +1,58 @@
alphaOsc
========
alphaOsc is a proof-of-concept of a Roland Alpha Juno DCO written in C++. This all stems from a [discussion thread](https://www.kvraudio.com/forum/viewtopic.php?t=420194) on the KVRAudio forums. This discussion was started over ten years ago, got quite heated in places, went quiet for a while, then had a few posts now and again before bursting back into life early in 2024.
It's easy to chat back and forth about what you think is going on, but it's better to show your working. You know, like your old maths teacher used to tell you? So even if you're wrong people can tell if you're "wrong for the right reasons". This project is my proof-of-concept of my potentially incorrect ideas about how the Alpha Juno works. I won't go into a big long discussion of the Alpha Juno or the "Belgian Hoover" patch because if you have read this far you already know all that. I will talk a little about the hardware of the Alpha Juno first, though, so we can clear up any misunderstandings.
In the beginning...
-------------------
... there was the Juno 6. This had "DCOs", Digitally Controlled Oscillators, which were really just saw-core VCOs with their integrator reset by a digital clock instead of a comparator. They still needed a pitch control voltage to set the ramp current, but they remained locked in tune with the clock - much like hard sync but without the comparator letting it free-run. This design persisted right through to the Juno 106, and you see the same idea used in many other analogue synths, not just by Roland.
Going Digital
-------------
For the Alpha Juno Roland took a very different approach, using a custom DCO chip driving six IR3R05 VCF and VCA chips. Sadly there is almost no documentation on Roland's custom ICs and they are no longer available, which makes repairs difficult and experimentation unwise. Unlike the "analogue" Juno family which contain no "black box" custom chips (the IR3109 and BA662s used in the filters are well-known now and the Juno 106 "waveshapers" just have a couple of opamps and a 4013 flipflop in), the Alpha Juno crams a lot of its functionality into three custom chips - IC26, the 63H149 keyboard scanner gate array, IC18, the address decoding and I/O gate array and the one we're interested in here, IC5, the 87123 DCO chip.
There appears to be absolutely no technical information online about the 87123, so everything presented here is a guess, albeit guesses backed by a bit of evidence.
The only details in the Alpha Juno Service Manual (it doesn't matter if you pick the manual for the AJ1, AJ2, HS10, or HS80 - this bit is the same) are that it's a 24-pin chip with six waveform outputs, two test pins, a clock pin, eight data pins, an "Address Latch Enable" (ALE) pin, a chip select (/CS, the slash representing the overbar meaning the pin is active low) pin, and analogue and digital +5V supplies. What does this tell us about the chip?
Wild-eyed Guesswork Begins
--------------------------
There are eight data pins which line up neatly with the 8-bit CPU IC19, 8032. This part has an external ROM which could be disassembled to find out more information about the 87123, but that's a job for another day. The interesting thing here though is that the 8032 family use the same 8-bit bus on Port 0 for data and the lower 8 bits of the address, and use the ALE pin to latch those address bits into an external 8-bit latch to drive external memory. In this case the latch is in IC18, with the upper ROM and RAM bits coming from IC5's Port 2 pins.
This suggests that the 87123 has at most 256 8-bit registers to control it. It's probably 16 registers, and here's why I think that:
The 8253 counters in the Juno 6 family are 16-bit but they have an additional pair of flip-flops in the clock raising them to effectively 18-bit. The counters are loaded with a 16-bit value which counts down to zero, reloading the counter and triggering an output pulse. It seems reasonable to guess that the 87123 uses a similar counter scheme and drives another 8-bit counter with that pulse to generate the sawtooth wave, with counter bits being combined to form the square and "complex" waveforms. Having six 16-bit counters would account for 12 registers.
The Systems Exclusive information in the MIDI manual has the "switch values" for the DCO, and from that we can see that the pulse waveform, DCO range, sub level, and noise level are each 2-bit values. That's 13 registers. The DCO sub and saw waveforms are 3-bit values, which would be a 14th register. It's possible that the pulse, saw, and sub values are all in one register because that still adds up to 8.
This leaves the PW Depth and PW Rate registers. I've absolutely no evidence to suggest that the PW LFO is generated within the 87123, it just neatly fits into 16 registers if it does.
How the Waveforms Might Be Generated
------------------------------------
The DCO range is set to 4', 8', 16', or 32' by a prescaler consisting of some flip-flops that divides the incoming 12MHz clock down. This is fed to a set of six 16-bit programmable counters, which count down, triggering a counter for each voice. A 10-bit counter would generate the right "divisions" for the two sub oscillator outputs, and the sawtooth output appears to be 8-bit.
Starting with the pulse wave output, the square wave is just bit 7 of the saw counter fed to the output. It is probably switched on and off by ANDing it with its control pin. The 25% pulse wave is most likely generated by ANDing bit 7 and bit 6 of the saw counter, with the output going high only in the last quarter of the count when both bits are high.
The PWM gating is probably done by comparing the saw counter with the pulsewidth value, and having it go high when the count is equal to or greater than the pulsewidth setting. Since the PW value is from 0 to 127 this is probably compared against bits 0 to 6 of the saw counter, giving two "pulses" per squarewave.
When the PWM gate is ANDEd with bit 7 then like the 25% cycle it will be off while bit 7 is low, and then only on for the second half of the squarewave cycle while the PWM gate is high.
The saw counter's output would quite likely be latched onto a simple R/2R ladder DAC. There doesn't appear to be any capacitors or any signs of multiplexing the outputs, so it may well just have a latch and a DAC for every output. The "straight" sawtooth is turned on and off by enabling the DAC latch, and the "complex" waveforms are generated by ANDing the DAC latch control with other signals.
To generate the first "50% saw" wave the DAC latch is ANDed with bit 6 of the saw counter, just as for the 25% pulse width setting. For the "comb saw", it is ANDed with bit 4 of the counter - three octaves up - and for the last one it is anded with both bit 6 and bit 4. For the PWM saw wave it is just ANDed with the PWM gate signal, but since this switches twice per cycle you get the 50% saw shape.
Finally the sub oscillator is generated similarly to the pulse oscillator, but with the outputs being taken from bit 8 or bit 9 of the saw counter and the "chopper" signals taken from bit 7, bit 6, bit 5, or bit 4 accordingly.
The noise and sub outputs have four levels, which is again probably implemented by something like a resistor ladder and some AND gates.
Further Work For Someone Else
-----------------------------
To turn this into a full Alpha Juno plugin you would need to determine how the envelope and LFO works along with all the modulation depth controls, possibly by disassembling the Alpha Juno ROM or by studying a real Alpha Juno and carefully measuring its outputs. You would need to implement antialiasing to clean up the waveform. Modelling the IR3R05 filter IC might not be entirely necessary, but the service manual describes it as being a pair of State Variable Filters with lowpass and bandpass outputs exposed. The highpass filter appears similar to the Juno 106, with the lowest setting being a bass boost, the next one up being flat, and then the top two being 1-pole high cut filters at about 220Hz and 700Hz. The chorus circuit is similar to the analogue Junos, with two delay lines driven by an LFO, with the modulation inverted for one of the channels.
Conclusion
----------
The proof-of-concept presented here is not a fully-functional plugin but could be used as the basis for an FPGA- or even CPLD-based Alpha Juno oscillator clone. Because it uses a phase accumulator and a relatively low sample rate, the output from this code aliases quite badly at even fairly low pitches, especially with the "3 Oct Up" pulses in action. However it does quite closely resemble an Alpha Juno sound, and could be developed further.

BIN
alphaOsc.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB