Some years back I bought a Farfisa GSA Sound Generator Box, the sound module for a Farfisa Syntaccordion. The Syntaccordion is a weird combination of accordion, organ, mono-synth and orchestral polysynth. Eventually with the aid of the service manual I hacked it to accept Midi input from any keyboard, using an Arduino.
This year, I picked up a Syntaccordion and wondered how hard it would be to use that to generate Midi directly.
Farfisa did at one point (probably in the 1980s) make a Midi interface themselves for the Syntaccordion. It was called the MSA 3, and it consisted of two parts: a complex box called the X-179 and a pedalboard called the X-177 which did the actual Midi output. Here's what the MSA 3 Manual says:
"Dear friend,
You probably already own an electronic FARFISA instrument like the SYNTACCORDION and we are certain that you are very fond of your exceptional instrument which the years and new technologies just can not age.
FARFISA dedicates its new MIDI interface to you and to your instrument. This Midi interface allows the SYNTACCORDION to control modern expanders and sound modules to enrich your performance."
To complete the story they did also make a Midi sound module (aka "expander"), something like the Roland Sound Canvas, called the M 200. But given that with Midi you could use any sound module at all, I can't imagine it was a big seller against Roland, Yamaha & co.
I bought an X-179 for a couple of quid from eBay. Unfortunately it turned out to be unusable without the X-177 pedalboard which had sold elsewhere, so I re-used the chassis in my GSA box hack. I am uploading the Owners Manual here in case anyone is interested. These things are incredibly rare - my one is serial number L2810007 which I suspect means it was the seventh (of seven?).
There is a third-party Midi solution. Midirig make excellent commercial products, either a conversion within the accordion or a separate box (available from Scotland Accordions, and a dedicated accordion Midi sound module. They're a bit pricey, however, so here's how to make one yourself if you want a bit of fun.
What the Syntaccordion DoesThe Syntaccordion has 3-and-a-bit octaves of "treble" piano keys (41 total) for playing with the right hand, plus one octave of bass notes on buttons, and one octave of chords on buttons. It generates digital outputs representing the current states of the keys and switches. The communications between the box and the accordion are by a repeating serial binary data stream. The accordion is the Master and the box is (what used to be called) the Slave.
The interface uses 3 signals: a DATA line sending binary data, a NOT CLOCK line sending clock values for clocking the data into shift registers at the GSA box, and a TRANSFER ENABLE (TE) line which, after all serial data has been sent, suspends serial input and makes the shift register data available as parallel outputs. For details, see the datasheet for the Nat Semi MM 5559 chip. It runs at a clock cycle time of about 20uS (50KHz) so that each cycle of 132 data bits takes about 2mS.
The Syntaccordion also has a bunch of analogue lines connected to pots and sliders on the accordion. The latter run off +/-12VDC, and the Midirig box apparently does read them (though Farfisa's own MSA 3 didn't). But after quite a bit of thought I decided not to bother with them, for several reasons. Firstly, you can't play with these things whilst playing music because of where they sit, so you might as well use separate midi knobs, sliders or (better still) pedals, connected directly to whatever sound generator you use. Secondly, it requires a lot of analogue pins and a lot of (relatively slow) ADC reads. Thirdly, pot readings are usually pretty noisy and need filtering. Fourthly, it requires three voltage levels, and quite a bit of scaling down to get them from the +/-12V range into a usable range for a processor. And fifthly... life's too short. However, my notes on how to do it are below - not mission impossible, just a bit fiddly, and probably best done with a separate processor.
On the other hand, getting the digital note and switch readings just needs a fast processor, two interrupt lines, a digital data input and a serial output for Midi.
So to read these, you need to:
- sense the TE pulse edge;
- then reset the read cycle;
- sense the clock pulse edge;
- then read the data line;
- store the read value in an incoming array mimicking the original GSA shift registers;
- check whether anything has changed this read cycle and, if so,
- send a corresponding MIDI message.
The main issue is that the Syntaccordion sends its data pretty quick - the data pulse width is only about 20uS. So we need a fairly fast processor. The only sensible way to match the data speed is to use interrupts, and fortunately all Arduino models have at least two of these.
HardwareI thought a 32-bit Arduino would be necessary (and this proved true - running the same code on a 16 bit Arduino resulted in incredibly glitchy sound). There are several 32-bit Arduinos, but most of them are 3.3V and I have a sentimental attachment to 5V logic. So the fairly new Arduino Uno R4 Minima looked like a good bet. It has two easily programmable interrupt lines, and a dedicated serial output port (for Midi). I ended up using a few more of its features also, to generate CV and gate signals to drive a modular monosynth.
In hardware terms, the only tricky bit is getting the right connector. Farfisa used a 25-pin Centronics-type connector, also used in the IEEE 488/HPIB/GPIB standard. The pins of these don't fit into a standard Vero- type PCB, so you need to either buy one and solder onto the relevant pins, or use one with a crimp connector onto a ribbon cable. If you have the original Syntaccordion cable you need a female connector. Then you need to feed +12V and GND to the connector from a DC supply, which will also do to power the Arduino.
The data coming back from the box is at +12V or GND, so it needs converting down to something the Arduino can handle: 3.5 to 4.5V. I could have used a logic level convertor (Sparkfun make one which ought to work) but in this instance I just divided down the voltage using pairs of series resistors in a 1:2 ratio, with resistances not too high so as to avoid noise: aiming for about 1mA current gave me 3.9K and 8.1K (it doesn't have to be very accurate).
For transmitting Midi, it would have been nice to use USB, but it isn't that easy to do with the Uno R4, though you could probably do it with a USB Host Shield board, the USB Host Shield Board Midi transport layer library and the normal FortySevenEffects Arduino Midi library.
So instead I went for a conventional 5-pin Midi solution, and the easiest way to implement that is with a Midi shield. I used a compact one made by Rugged Circuits but there are many others which would do.
I added a switch to let you select "highest note" or "lowest note" mono priority, two 3.5mm mono jack panel sockets for Gate and CV outputs and an LED to indicate when the Gate output is high. Other than a box, a DC power socket and some wire, that's it for the hardware.
SoftwareThe usual wisdom is do make the interrupt service routines as short as possible, leaving bigger, slower calculations in the main body of the code. So mine do almost nothing but capture data. In the main loop, the currently-stored values are compared with the last stored values and midi is generated on a change. As the current values are constantly updated, occasional glitches on the data line are corrected quickly.
The Syntaccordion GSA box has multiple outputs: one for the organ sounds, intended to be fed to a Leslie cabinet; one for the strings (which were effectively separately generated in a string machine within the box); and one for the brass (also piano and harpsichord) sounds, and the mono output. But the bass and chords forming the left hand accompaniment also generate different sounds, and there are tab switches for adding strings and/or brass to the bass and/or chords.
Accurately emulating the GSA box with Midi requires a multitimbral sound generator (or several separate ones). To enable this the software generates Midi on multiple channels: a "main" channel for the treble notes; a mono channel; a bass channel for the bass notes; a channel for the accompaniment chords; a strings channel and a brass channel for use when the relevant tab switches are engaged.
The GSA box generates "highest note priority" mono from the incoming data stream (which is transmitted highest treble note first) by noting which "on" (i.e. data HIGH) note is first encountered. The software emulates this. The first (highest) note encountered is stored, as is the last (lowest) note. The software reads a switch to determine whether to use lowest or highest note priority, and sends a note message on the mono channel when this changes. Whilst any treble notes are ON the software generates a 5V signal on the Gate output (non-retriggering), and a 0-5V voltage on the DAC output.
CV OutputYou could probably use the DAC output with no problems, but the current you can draw out of any pin on the Uno R4 Minima is limited to 8mA, so I thought I might as well use the built-in Op-Amp as well, since this supplies current direct from the onboard 5V supply. So the A0 (DAC output) pin is plugged into the A1 (Op-Amp non-inverting input) pin and the A2 (Op-Amp inverting input) pin is plugged into the A3 (Op-Amp output) pin, to provide a simple voltage follower.
I noted that the maximum DAC output when running the board off USB was about 4.74V, but when running off a 9V or 12V external supply (as it would be in use) it was more like 5.03V for a DAC maximum 12 bit input of 4095.
VideoA video with some demos is here:
Comments
Please log in or sign up to comment.