Posts: 1
Joined: Mon Jul 01, 2019 10:36 pm

Raspberry PIpe Organ

Mon Jul 01, 2019 10:51 pm

I need to preface this by very briefly discribing how an organ works
Organs usually have at least 2 keyboards (manuals) 61 keys each and a 32 note pedal board a total of 154 keys and then however many stops to control different ranks of pipes for the pedals and manuals.
61 pipes per rank so an 8' principal would have 12 8' 4' 2' 1' and 13 1/2' pipes adding to 61

Would it be possible to get all of this information into a single Pi and then get it sent to a second pi in the pipe loft connected to relays to turn on and off the pipes? I assume that the manuals and pedals could be done through a matrix. Traditionally organs use a diode matrix system with a 64 pair cable to the chest matrix board but recent much more expensive iterations use digital controllers with a single cat5 linking console encoder to chest decode. I want to build the latter of the two options as the real systems are incredibly expensive.
The new systems being Peterson ICS-4000 or the Matters organ control system.

Posts: 229
Joined: Wed Jun 20, 2012 2:51 pm
Location: Southampton, England

Re: Raspberry PIpe Organ

Thu Jul 04, 2019 11:19 am

I have a similar project you might be able to borrow bits from. I am building an organ console (two manuals and stops up and running so far, pedalboard still under construction) where the note press/release and stop statuses are monitored by a Pi, and then the status changes communicated to a sound producer - the relay controller in your case, or synth software in my case. In order to spread the synthesizer CPU load I am using one Pi per manual, which would not be an issue for you, but you might still want to spread across multiple Pis just because of the high number of inputs (notes and stops) or outputs (relays). I use mqtt to link the status changes from the hardware monitors to the sound production side. This seemed the easiest way to allow coupling between manuals.
The problem with organs is that fingers times stops can reach quite a high number. e.g. An eight note chord played with 10 stops out means triggering 80 relays, preferably within a few milliseconds of each other. Your relay power supply will need to be handle high surges in the load.

It is still a work in progress on the woodworking side, but I think the code is more or less complete. You can find a build description and code at https://github.com/Squeack/rpi_organ. Once the pedals are complete and the whole thing tidied up into a self supporting console instead of sitting on a table I will tidy up the documentation and republish.

Posts: 10
Joined: Sun Sep 09, 2018 9:43 pm

Re: Raspberry PIpe Organ

Wed Jul 10, 2019 8:49 pm

I did a lot of work for my own music keyboard. I will share what worked for me and eliminated a lot of the tricky stuff.

I wound up using LinuxSamper, which I had to patch (tiny patch) and build for the Pi. It is NOT too big for a Pi, even a Pi 3B+.

Once you have LinuxSampler working, all you need is a MIDI keyboard and a MIDI to USB adapter or just a modern MIDI over USB controller keyboard.

LinuxSampler supports Soundfont2, the modern SFZ format, and legacy Gigastudio .gig format. It sounds great. I have some pipe organs for it.

This is not the solution for you if you want arbitrary registrations and blending, because it's sample based. You could, however, easily play and blend several layers of samples on a Pi 4.

I can share my Python code for managing LinuxSampler and configuring MIDI and audio devices.


User avatar
Posts: 147
Joined: Tue Feb 28, 2017 1:13 pm
Location: Sydney, Australia

Re: Raspberry PIpe Organ

Fri Jul 12, 2019 12:15 pm

My only advice is to base your design on a MIDI interface between the console controller and the loft controller (and maybe a controller in the air pump/bellow room). There are countless MIDI over fibre/cat5 extenders, splitters etc. You may need multiple loft controllers for ease of design or performance, using MIDI will allow you to scale the design effortlessly.

Using MIDI allows you to drive the organ with a standard MIDI keyboard or PC MIDI application to test the organ controller, and also use a MIDI analyser app on a PC to test the console. trying to debug both ends at the same time is hard.

I always recommend to base any design on available industry standards. MIDI is a purpose built comms standard for keyboard instruments. Dont re-invent the wheel. There are solid pre-tested libraries for the RPI.

Using MIDI you could drive the organ from a PC MIDI sequencer, how cool would that be.
..the only thing worse than a stupid question is a question not asked.

Posts: 229
Joined: Wed Jun 20, 2012 2:51 pm
Location: Southampton, England

Re: Raspberry PIpe Organ

Fri Jul 12, 2019 2:06 pm

MIDI is good for most instruments, but can struggle with 'real' organs. The problem is that it does not send 'keyboard note down', 'keyboard note up' messages, but sends 'note on', 'note off'. Since having multiple stops out means that each press of a keyboard note generates multiple sounds, the MIDI protocol can get overloaded, especially when using real MIDI serial cables which run at quite a low bandwidth. Watch out that the MIDI controller generates the correct messages when a note is held but stops or couplers are changed.
See http://www.pykett.org.uk/midi_for_organists.htm for more details.

Return to “Other projects”