Virtual Pipe Organ

Table of Contents


An old hobby of mine is playing church organ. At the beginning of 2016, I was looking for a digital instrument which imitates the sound of a real organ. In my research I stumbled upon the concept of Virtual Private Organs (VPO). This consists of an organ console console (keyboards, pedal, bench) which, instead of being connected to lots of pipes, is connected to a computer. The computer runs a so-called VPO software which loads high-quality samples of the original pipe organs into the RAM memory and plays them through the audio interface, to which a sound system is connected. The software plays the music, as it gets it from the console keys using the MIDI protocol. In other words, when a note is hit on the keyboard, the software plays that note. The end result is playing a real pipe organ in the living room.

The existing commercial solutions for such an instrucment were too expensive. Labor exceeded by far the cost of materials. Many people have already built such systems in different shapes and formats. I asked myself whether I would be able to also build one given that I had no previous experience with woodworking or electronics.

My first experiment was to check that I understood the principles right. My KAWAI CA63 piano is able to produce MIDI events through an USB port. I installed the free version of the Hauptwerk VPO software on my good ol' Thinkpad notebook running Windows 7. I connected the laptop to the piano using USB and fired it the software. It worked! I could play/listen to organ sounds when playing the piano, which was quite strange.


Figure 1: Hauptwerk running on a KAWAI piano

Deciding to go further and build a complete organ console was not easy. I designed it a few times, then gave up. I convinced myself I would be able to grasp the electronics part eventually. There are a lot of tutorials on YouTube. I had heard about Arduino… But the woodworking was something I knew nothing about. I live in an apartment and have no tools. After searching a bit, it turned out there was a Woodworking facility for DIY enthusiasts 15 minutes from where I live. It seemed very well equipped. So I decided to give it a shot and see how far I get.


I started with the manuals (keyboards). In order to play a wide range o music, from different historical periods, I decided I wanted three keyboards. They are supposed to be stacked on top of each other. I went for the professional wooden Fatar keyboards for Organ (cherry naturals, ebony sharps). I had tried them in a retailer shop and they felt nice. Wood also looked better as a design element in the house. I bought them from, a retailer in Germany. They arrived very well packaged and communication with the shop was prompt and smooth. They even did the customs and I only had to pay Swiss VAT plus import taxes. Some pictures bellow:


Figure 2: Packaged keyboards


Figure 3: Unpacking


Figure 4: Wooded Fatar keyboard

Next thing I had to do were the key cheeks, the things that hold the keyboards together, stacked on top of each other. For this I found a Sketchup model on the Internet (1). I pulled the keyboards block from the 3D model (Figure 5) and so the build began.


Figure 5: Sketchup Model for keycheeks

The friendly guy at the workshop suggested Maple for the wood so I went for that. I bought two long pieces of lumber. I then sawn them to length, planed them and carved them using a manual router. I drilled them on the top/bottom and stacked them on top of each other with dowels. I did not glue them as I may want to access the keyboards in the future when doing maintenance.

As expected I did many mistakes. In an attempt to achieve maximum efficiency, I set a piece of wood on fire, drilled misaligned holes etc. In the end I got the sizes right, according to the German BDO standard. Bellow are some pictures:


Figure 6: Raw maple, rough cuts


Figure 7: Work in progress


Figure 8: Work in progress

For the music stand, I bought a piece of Plexiglas and glued it at a 90 degree angle with another piece of maple. For the piston rails, I cut three thin (1cm) stripes of maple height with the height of 3cm.

For the top I bought a piece of plywood and cut it to dimensions and put some maple veneer on the edges. I don't like this so much but it was fun to learn how to do it.

In the end, I sanded everything with a progression of 150, 220 grit and polished the pieces with some transparent satin varnish. The end result looked like this:


Figure 9: At home, after sanding and varnishing


Figure 10: "Lego"


Figure 11: Assembling the sanded key cheeks

I mounted the keyboards using screws directly into the key cheeks. This could have probably done better, but this is my first DIY project.

MIDI processing

Next step was to capture the note-on/ note-off signals from the keyboards and send them to the computer. For this I needed a MIDI encoder PCB. This piece connects to the keyboards, captures the signals from the switches, encodes them into MIDI events (NOTE-ON/ NOTE-OFF) and sends them to the computer (through the audio card) using a MIDI connection.

I bought the circuits from, a provider from Netherlands. I chose them because of the very reasonable price and the simple architecture: there is one central board (Gino Midi Big), which merges signals from other scanners (Gino Midi Encoder) and sends them to the computer. The scanners/ encoders for keyboards, pedal boards, stops etc. simply connect to it. gino-midi also offered great support, as I would later learn.

I ordered:

  • 1x GINO Midi Big;
  • 3x GINO Midi Fatar: these fit perfectly with the Fatar keyboards I had;
  • 1x GINO Midi Encoder (general): for the potential pedal board (I didn't know at this point weather I would really use this);

They arrived nicely packaged and assembling them was very straight forward:


Figure 12: Gino MIDI box


Figure 13: The Gino MIDI circuits


Figure 14: Fatar connector on the keyboard, where the Gino Fatar is connected

I mounted them and attached them to the keyboards:


Figure 15: GINO MIDI circuits attached

I bought a Focusrite Scarlett 6i6 sound card. It has MIDI IN/MIDI OUT connectors. You can plug two headphones in it and it has 6 output channels. The Big Midi Encoder connects to the MIDI-IN port of the sound-card. The sound-card takes the MIDI events from the encoder, sends them to the VPO Software which picks the correct samples from the computer and plays them through the sound-card.

After putting everything together and connecting the power supply to the Big-MIDI encoder I had a working "setup" and I was able to play the "organ" on the keyboards.


Figure 16: Mounted block



Combination Pistons

Next step was building the "combination pistons". It is very useful when playing the organ to store different combinations of stops in some sort of memory. Instead of pulling all the stops every time, one could change the whole registration with a push of a button (piston). These buttons are placed between the manuals so one can easily reach them while playing. The VPO software has the ability of storing such combinations in memory. It has buttons for activating the different combinations and those buttons can be accessed using a touch screen monitor. Obviously it would be much more convenient to activate them using real buttons.

I needed some physical buttons that emulate the buttons of the software. The VPO software can be configured to listen for a certain MIDI event so that when received, the software activates the piston and implicitly, "pulls" the right combination of stops.

In order to capture the piston signals, I thought about using an Arduino board. So I bought an Arduino MEGA. There are libraries in Ardiuno that deal with buttons switches (including de-bouncing) and sending MIDI events. I wrote a small program for the Arduino that capture the buttons events and sends corresponding MIDI messages to the computer.

I bought 25 buttons on eBay with about $1 a piece. I was a bit too enthusiastic about the price without realizing in the end, you get what you pay for. But I'll move on.


Figure 19: Arduino MEGA board

The Arduino would be connected to a computer using an USB port. It would also get its power from the same port (Arduino only needs 5V). In order to connect the Software with this device, the device must be MIDI compatible. By default, the Ardunio MEGA, when connected with USB is not "visible" by the virtual organ software as a true MIDI device. For this to work, I had to flash a custom firmware on the Ardunio, which would make it behave like a true MIDI device (which the VPO would "see"). The steps to do that are described bellow (also this page on Arduino DFU Programming was very useful):

  • Generate a HIDUINO firmware using PimpMyHiduino
  • Short pins as described here (first two pins when looking at the board with the USB port oriented upper-left):
  • On Mac, install dfu-programmer then from the command line:

    sudo dfu-programmer atmega16u2 erase

  • Flash the new hiduino firmware (so that Arduino is seen as a true MIDI device):

    sudo dfu-programmer atmega16u2 flash hiduino_combi_prodan_firmware.hex

  • Soft reset the Arduino board:

    sudo dfu-programmer atmega16u2 reset

  • Hard reset the Arduino using the button on the board

The problem with this approach is that once you flash the hiduino, you don't have access to serial port anymore, meaning, you can't debug/ flash anything on the Arduino. This is a bit inconvenient because every time you need to make a change to the software, the firmware also needs to be updated. To make the Arduino debuggable again, you need to flash the old firmware (step 4. becomes):

  • sudo dfu-programmer atmega16u2 flash MEGA-dfu_and_usbserial_combined.hex

The layout for the buttons is the following (each line corresponds to a row of buttons, under a keyboard):

a b c d                    -   +

-  +                       -   +

S         0  1  2  3  4    -   +    5  6  7  8  9     ---  --  ++  +++   C

All buttons, except for the S, are programmed to send the PROGRAMCHANGE MIDI event to the VP Software. The S button sends NOTEON/ NOTEOFF. They map to the Combination Stepper of the VPO software. In short, given X number of combinations of stops stored in memory:

  • -, +: step one combination down/ up;
  • 0-9: step through the combinations 0 to 9 in a group of 10;
  • --, ++: step 10 combinations down/ up;
  • ---, +++: step 100 combinations down/ up;
  • a,b,c,d can be assigned different functions;
  • S - store one combination. To use it, one needs to: "pull" the desired stops, hold S, and press one of the 0 to 9 buttons;
  • C - cancel registration;

The source code of the whole Arduino program can be found in my git repository:

Arduino Combination Program

Beside handling the button the program is also is able to read some special messages (MIDI SYSEX) to be displayed on a small 2x14 display. The VPO software can be configured to output these messages to a MIDI OUT port. I can show for example what organ is loaded, what is the current activated combination. Although I tested this and it seems to work, I don't use it in the my organ because I could not find a suitable place for the display.

I mounted the buttons on the wooden strips, soldered and wired them. I tested the connections with the multimeter. Then I connected them to the Arduino board and looked for events on the MIDI monitor. It worked. This was a major milestone.


Figure 20: Soldering …


Figure 21: … and wiring the thumb pistons

Desk & Bench

This was the point where I got really lucky. During the period I worked on this project, from time to time, I used to peek at the different eBay-like websites, for potentially useful organ related stuff. It was a random process. One morning, I found an add with a church 2 donating an old Johannus. The sound board was broken and I learned later that nobody was playing on it anymore. I exercised my French a bit and called them. They said I can come and pick it up. So I did that.

At this point I had a desk, a bench and most importantly a really nice wireless pedal board. The MIDI part on the organ was also functional but I already had my own MIDI processors. I had to remove the "illuminated rocker tabs" and pretty much everything inside "the box". The speakers inside I kept, thinking I might do something with them, as well as the keyboards, which were in good shape. The pedal board was in very good shape. The bench is also very stable. The top can be opened and sheet music can be stored inside. A neat and unexpected feature! Also the ability to cover the manuals and protect them from dust and small kids is something I found useful.


Figure 22: The block I had built and the old Johannus


Figure 23: Pedal board in pristine condition


Figure 24: Working on the integration by putting the manuals into the "new" desk


Figure 25: Integration… somehow done

Pedal Board

I had the pedal board so the next step would be to connect it to my setup. That means, when touching a note with the feet, sound should be emitted. On the bottom of the desk, where the pedal board touches the desk, there are some PCB stripes with reed switches. Each reed swatch is aligned with a note on the pedal. The pedal notes contain a magnet at their end (so the magnet is aligned/close to the reed switch). When the note is pressed with the feet, the magnet goes down, closer to the reed and this closes the circuit. I needed to send these signals to the MIDI encoder. In the beginning I mentioned I had already purchased a Gino Midi Encoder (general) that can be connected to the main MIDI board, for the pedal board. Now I had the opportunity to use it. I "simply" had to somehow connect the pins on the reeds boards to the MIDI encoder.

After four consecutive "late night shifts" of wiring, measuring and failing, I gave up. I could not get signals to pass properly. So I wrote to gino-midi about my problem. They were very prompt and informed me that Johannus usually put the diodes on the pedal boards, the other way than normal, and I should simply remove them from the PCB as they are not needed. As I said, my experience with electronics is super small.


Figure 26: Johannus pedal switches board


Figure 27: Cutting the diodes on the stripe

So at this point I had keyboards, pedal board and combination system in place.

Expression Pedals

There were three expression pedals on the Johannus organ I got.


Figure 28: Mounting a new potentiometer in the expression pedal

These can be hooked with the VPO software in order to control things like volume, expression, swell box enclosure etc. They have analog linear potentiometers inside. The Big Gino MIDI board is able to read up to 7 analog inputs (from potentiometers) and transform those into MIDI messages that the software can than read and control the organ behavior. The potentiometers were really old and worn so I bought new ones, mounted them and connected them to the MIDI Encoder.

Stops and registration

An pipe organ can have many stops. These are the different "types of sounds" (flutes, reeds, violin-like etc.). One or more stop can be "activated" (pulled) at one time. These are controlled in the VPO software. I needed a way to control the stops in the software using some external mechanism (buttons/ rocker tabs). This part I struggled with the most. I had three attempts. The first two failed and the third one is ugly (but efficient).

I have to mention that I was very stubborn and wanted to push physical buttons for activating the stops as opposed to touching some glossy touch screen. Here's what I did in short:

Attempt No. 1

Many people were using Novation Launchpads to control the stops. These can be configured to emit MIDI messages to the software that control the stops. Pushing a button on the Launchpad is equivalent to pulling a stop on the virtual organ. They light up when the stop is activates. Colors are configurable. So I bought a second hand Novation Launchpad.

The stops are labeled on the organ so I needed a way to label them on the Launchpad. I bought some transparent sheets and "glued" them with Velcro that I stuck on the Launchpad. I printed the names of the stops on a sheet. Each organ sample set has it's own stops/ disposition of stops, so for each organ such a sheet needs to be printed.

I wrote a small program in Ruby that generates an A4 pdf with the names of Stops read from a text file. The pdf can be printed on the transparent sheet.

The source code of the Ruby program can be found here:

Launchpad Stops Ruby

The final result:


Figure 29: Launchpad with transparent sheet


Figure 30: Unit testing the launchpad

I didn't like this because:

  • it felt cumbersome to change the sheets when changing the organs;
  • the feeling of pressing a button through a plastic sheet is not nice. I did manage to cut a rectangular piece on each button, in order to press the button directly;
  • I didn't find a reasonable way of mounting the Launchpad.

So I sold the Launchpad six months after the purchase for the same price I bought it and moved on the attempt no. 2.

Attempt No. 2

I the meantime I got to my senses and started to appreciate the flexibility of a touch screen. Changing the organ and the stops is done with a touch. I thought about writing a Java program that renders some buttons and connects with the VPO software through a virtual MIDI port.

On Ali Express I found a 10" capacitive touch screen, frame only, which looked like I could integrate in the organ. It would fit on the side of the console, in a portrait mode mode next to the manuals. Being precautios, I order one to test. It looked somehow cheaply made but it worked.


Figure 31: 10" monitor from AliExpress


Figure 32: JAVA midi program

There were two problems with this approach that I didn't foresee. First, the resolution of the screen ~1000x600 was smaller that the VPO software minimum required ~980x800. So the screen was not able to display the whole interface of the software. And secondly, everything was super small to manage with the fingers. I started working on the Java software that sends MIDI messages to a MIDI port and got a prototype.

I decided to order the second monitor. This one arrived… broken. It had no panel for capturing touch events, like the other one. Not cool! Oh well… I contacted support and after about 3 months of back and forth, explaining my problem 4 times, with screenshots etc., they said I should send it back. The only problem was that sending it back costed like 2/3rds of the price I paid for it.

Later I realized it was quite hard to see which stops are active when playing the organ. One would always had to lean on a side to inspect the status.

It's also worth mentioning that at this point in time family matters slashed a big portion of the small free time I had so I was not able to finish the Java program I started.

For the record, I uploaded the progress with the Java program on github (pure Java, no other libraries):

Java Midi Stops

Which takes me to solution number three.

Attempt No. 3

I've decided to try something new, so I bought a 23" inch touch screen monitor, capacitive touch (HannsG HT231HPB), decently priced, with warranty from a German company and placed it on top of the music stand using a monitor mount. There! Flexible, big, able to control the stops and perform maintenance tasks for Windows and the VPO software with little effort.

The only problem I see with this solution is that it's not so pretty, but it's very efficient. Maybe it will be prettier in v2. Pictures in the final section.

The computer

So far I had been using my Thinkpad notebook as a computer. But this was slow. I could notice the roundtrip latency between touching a key and hearing the sound. The VPO software reported ~30ms roundtrip. I had already planned to buy a desktop computer to use for the organ. I didn't need a dedicated Graphics Card so I decided an Intel i5 CPU with integrated graphics card would be enough. Also, I wanted a Mini-ITX so that I can place it inside desk and wouldn't be visible to the outside.

I bought the following components and assembled them:

  • Mini ITX case + Power supply: Fractal Node 202 + SFX 450W PSU (HTPC);
  • Hard drive: Samsung SSD 850 Evo 500GB SSD;
  • CPU: Intel Core i5-7600 (3.50GHz / 6MB);
  • Motherboard: Gigabyte Z170N WiFi;
  • 32 GB RAM: Corsair Vengeance LPX (2x, 16GB, DDR4-3000, DIMM 288);

This was the first time I've put a PC on my own. Of course, I had to do at least one big mistake. There was an incompatibility between the CPU and the motherboard (very stupid mistake). In short, same model of motherboard, but with two "revisions". One revision, the one that I got, not compatible with the CPU, the other one, compatible. This information was somehow hidden on the producers website and non-existent on the vendor website so I simply overlooked it. I ended up buying the cheapest CPU the board would support, do a BIOS upgrade which made the board compatible with the CPU (luckily this existed) and sold the CPU at 1/3rd of what I paid. It could have been worse I guess…

I bought a key switch (momentary) that is connected to two pins on the motherboard which, when shorted, turn the computer on. Very useful if you have small kids. For turning on the MIDI circuit, I used another switch.


Figure 33: Computer parts


Figure 34: Assembling the computer


Figure 35: Key switch to turn the computer on

For maintenance/ installing sample sets I use a wireless keyboard integrated touch pad from Logitec. It can be easily stored inside the bench.

The software

There are two main alternatives in terms of software. The most popular and advanced is Hauptwerk. The "Advanced Edition" (advanced because it doesn't limit how big can the organ samples be) is very expensive in my opinion ($600 US, 700EUR in Europe). It is the most advanced in terms of features. It can do crazy things I heard, like voicing separate pipes etc. - which I don't need. If you want to be able to load a bigger than 3GB sample set, you need this version. It comes with a HASP dongle that cannot be backed up, so if you loose it - it's not good…

The alternative is Grand Orgue, an open source software which worked very well when I tried it. The community is smaller though.

All the Sample Set manufacturers create samples for Hauptwerk by default. Some manufacturers also encrypt the sample set so you need to upgrade the Hauptwerk dongle to use them. This makes the sample set unusable with Grand Orgue. It is (in theory) possible to port the unencrypted samples to Grand Orgue, but it's an extra step that the user needs to do before using the sample set. I've never tried it.

In the end I bought Hauptwerk. I'm enjoing it, the quality is very good and I'm hoping not to loose the USB dongle.

Sound system & Illumination

For quiet practicing I'm using AKG 701 headphones. They are open and they sound very nice. It feels like the sound isn't really coming from the headphones, but from the room. They also go very low in terms of frequencies, which is important for the low frequencies of the 16' stops. I'm no expert in headphones, I bought these after reading some reviews and I'm happy with them. They are also supposed to be very neutral. I bought a small thing from eBay: to "hang" them on the organ.


Figure 36: Headphone holder


Figure 37: Pedal illumination

Next came the speakers. I wanted a very simple stereo setup, with two monitors. Same requirements for the speakers: frequencies as low as possible, neutral sound and studio grade. In my research I discovered a small polish company called APS. Their Klassic monitors go as low as 35Hz, which seems to be quite low for speakers of this size. This should be enough for the low 16ft stops. They sound very neutral to me and very clean. Price wise, they were also very attractive.

I don't have an illumination solution for the sheet music yet. For the pedal board I found some strips at IKEA, and it looks ok.

End result and conclusions

After putting everything together, my console looks like bellow. The computer is hidden, the big touch screen monitor is accessible and the sound is crisp and clean. The manuals can be covered with a wooden rolling cover.


Figure 38: Final version #1


Figure 39: Final version #2

Lessons learned:

  • don't buy cheap stuff from eBay; you get what you pay for;
  • don't buy cheap power supplies. At one point, some cheap power supply interfered with my speakers in a very weird way;
  • when building a computer, all components must be thoroughly verified for compatibility;
  • if you buy new speakers, and have small kids, they will be tempted to push the dust cap inside;

This has been a very fun ride. I started in April 2016 and considered it done in ~April 2017. I learned a lot and am I very happy to use an instrument I put together myself. Also in terms of servicing, it's very probably that I have an idea how to fix it. No doubt, I will make further improvements along the way.

During the process of building this, my wife has been extremely kind and patient and agreed to keep this mammoth into the house. I am very thankful to her. I believe version 2 will look much better.

written by Cristi Prodan on <2017-08-01 Tue>.

If you would like to post a comment to the article, please write me at prodan.cristian AT



Sketchup 3D Model Warehouse, "Custom Pipe Organ Console Design", Copyright Jeffrey Sharp 2008, Licensed under Creatives Commons v.3


Eglise Adventiste du Septième Jour de Renens