John Harvey
Skip Navigation Links

Hauptwerk Project 1

This is a project to upgrade a 1980s era electronic organ to a Hauptwerk virtual pipe organ.

The donor console is badged as a LINN Cantate, in reality a German Ahlborn, with early digital electronics based on the Bradford system, which attempts to generate organ tones from scratch rather than replaying recorded samples of real pipe organs as all modern electronic organs now do.

First step: getting it home.

Lid off to see what I have got.

A couple of hours later, minus the electronics, now in a large heap on the garage floor.

The old electronics . . .

and wiring.

To be replaced by this.

Well, that was the easy bit. Now to get to grips with keyboard matrix scanning and digital interfacing via USB to a computer. I have in mind to implement this using Arduino Uno modules (£18.70 from Amazon), one each for the two manuals and pedals, rather than simply buying in ready to run but more expensive purpose built electronic boards. These have sufficient digital I/O for keyboard scanning, and also some analogue inputs for swell pedals. This console has two swell pedals which will conveniently match the swell and crescendo pedals of the St. Anne's, Moseley virtual pipe organ that comes for free with Hauptwerk (actually the real organ only has a single swell pedal, the crescendo pedal is simulated in software).

A further Arduino module could be used to interface to the manual and pedal pistons and even to the draw stops. Implementation of pitch change in MIDI would also be very easy. However the first target is simply to get a functional two manual and pedal organ for practice using the PC display for stop selection, and then build on that as the whim takes me.

I will have to program the modules of course, using C/C++ in Arduino's integrated development environment, which I have not used before. Sadly there is no BASIC implementation (Microsoft Visual Basic is my regular development language).


The unbranded manuals are built using 9.5" metal keys hinged at the rear, ensuring there is minimal variation from the horizontal when a key is depressed, a niggle with narrower low cost keyboards. The keycaps are plastic. Overall the manuals have a good feel, although without the top resistance available in some expensive organ keyboards.

Underneath is a circuit board mounting open air contacts arranged electrically in the 8x8 diode matrix commonly employed for keyboard scanning. Each contact comprises a length of spring that contacts a busbar when the key is pressed. Both springs and busbars are silver plated, and were in need of a good clean after several decades of use.

Although all the key contacts appeared to work reliably it made sense to clean them anyway. Fortunately the circuit board is readily removable from the keyboard chassis, permitting easy access to the contacts for cleaning with silver polish. Three contacts and the adjacent busbar have been cleaned in the photo. Cotton wool bud sticks were helpful when cleaning the springs. The springs themselves had to be well cleaned afterwards with a contact cleaner aerosol to remove the silver cleaner residue. Overall this was a fiddly business but worth doing to give the keyboards a new lease of life.

The way in which the contacts are arranged to implement an 8x8 row/column array can be seen here, the busbars forming the rows.

Electrical connection is made with a couple of ribbon cables. The integrated circuit is a 74138 TTL 3-to-8 way decoder, reducing the number of digital input lines required for row selection from 8 to 3. Provision is made on the circuit board to identify the individual keyboard as great, swell or choir by wire links, two being snipped by the organ builder on installation. It would of course be possible to use more than three of these keyboards with additional external selection.

Initially I MIDI-fied the keyboards with an Arduino Uno, one Arduino being more than fast enough for both, and pedals too. See circuit and code. However this required an external MIDI to USB cable and tied up two of the Arduino's digital lines (A0, A1) for TX/RX, although only TX was used here.

I then discovered the Arduino Leonardo, a variant of the original Arduino Uno that allows the keyboard to appear at the USB port as a USB device without any programming required, while not impeding the normal operation of the Atmel Studio compile/upload via the USB port, something that is not easily achievable with the Arduino Uno. The MIDIUSB library takes care of the MIDI communication via the USB port. A single Arduino Leonardo was quite capable of scanning both manuals and the pedals with only an external 74138 decoder required to drive the pedal diode matrix columns in the same way as implemented in the keyboards, due to the limited number of digital I/O lines available on the Arduino. See code. However later I used two Arduino Leonardos, one for the two manuals (see circuit), and another for the pedals, where the number of digital I/O lines were sufficient to interface to the pedal column/row matrix directly.

Note that there is some contact debouncing inherent in the loop interval of the code execution, however no special attempt was made to implement more agressive debouncing since the keyboard contacts were in good condition after cleaning, and the pedals use inherently trouble-free reed switches. See Hauptwerk Project 2 for the code to achieve more thorough contact debouncing on an old Makin organ.


The pedalboard is a standard RCO 32-note concave/radial specification.

Electrical contact is by magnet and reed switch, with the magnets embedded in the pedalboard frame and the reed switches on a pair of circuit boards. Originally the switches were wired into a separate diode matrix board which had been broken, and the two reed switch boards were modified by judicious track cutting to directly host the diodes and minimise external wiring.

At rest each reed switch is shielded from the corresponding magnet's field by a metal strip attached to the end of the pedal. When a pedal is depressed the shield moves out of the way and the reed switch is activated by the magnetic field. Slots in the shields allow vertical adjustment so that all the pedals sound at a uniform amount of travel (the RCO specification is half way down).


These are not strictly drawstops, since they do not stay drawn when pulled. Rather they are illuminated spring-loaded centre-off switches: pull to engage, push to disengage, either way they return to the same position when released, the internal light providing the only indication of stop state. Made by Syndyne they are no longer listed in their catalogue but are still used on new Rodgers organs. When reusing them it is a good idea to replace the 12 volt bulbs with modern bright white LEDs, since the whole stop assembly will most likely have to be removed from the console to gain access to unsolder and dislodge a blown bulb (it is not just a screw in).

The stop knobs are in turned wood held in place with a small Allen screw. The stop engravings are on separate 1" diameter translucent plastic discs which can be easily popped out and replaced or creatively re-used (for example the engraving ink can be dissolved out and new stop assignments made with 1" round laser labels).

These type of stops are useful in a budget electronic organ since the current required to light the bulb, and even less for LEDs, is a good deal less than that needed to power the solenoids of conventional Kimber Allen style drawstops that typically draw 0.33A @ 24V (although the solenoids do not need to be continuously powered).

Swell Pedals

The organ came with a couple of plastic swell pedals. These work by shining the light from a LED through a plastic film whose aperture varies with pedal position and on to a light dependent resistor. The aperture is crafted to simulate the opening of real swellbox shutters, where the first 10% of travel makes much more difference to the volume of sound than the last 10%. Today one can implement this with a simple linear variable resistor in the swell pedal and software modelling to mimic the real swellbox characteristic.

The swell pedals were interfaced to analog ports on the Arduino Leonardo together with the four toe pistons. See circuit and code.

Thumb and Toe Pistons

The organ came with a strip of thumb pistons on the Great manual only. These are made by Syndyne and look unchanged in their current catalogue. They contain tiny incandescent light bulbs and as with the drawstops it is a good idea to replace these with bright white LEDs before reuse.

The toe pistons are plastic bodied with brass toe caps. The caption has a small glass fuse style light bulb behind it which can be illuminated when the stop or coupler that the piston controls is on. The bulb can be readily changed with the piston in place, although again it makes sense to substitute with a LED. The caption strip can easily be updated with new lettering.


The organ has initially found a place in the corner of a bedroom as a barebones two manuals and pedals installation without any playing aids, where it is in regular use with headphones as a practice instrument. The space taken up is surprisingly small, especially compared to the original console, the footprint being determined by the size of the pedalboard. I will add swell pedals, drawstops and pistons in due course.