I built a small midi decoder based on Arduino UNO, to signal when the stops was turned on and off in the GrandOrgue (or Hauptwerk) software. Arduino reacts to incoming messages from MidiON and MidiOFF on any channel, lighting or extinguishing LED connected to pins 2 to 13 and A0 to A5. To simplify the connection to the computer, I attached the firmware of the ATmega16u2 processor (responsible for USB communication) https://doremifasollasi.wordpress.com... . The processor with the new software has become a MIDI interface, so that communication with the computer running Grandorgue (or Hauptwerk) is done using a standard USB cable in Arduino UNO. The GrandOrgue program has been set so that it sends messages including notes from C0 (60) to B0 (71) for digital-pin 2 to 13 and higher (88) notes for pin A0 to A5.The decoder can support 18 stops directly, however, after adding shift registers and a small modification of the arduino script, it can support many more registers.
The first attempts looked like this:
Setup for Grand Orgue:
1. Right-click on the area of the register, e.g. Bourdon
2. Then choose the send tab

3. Set everything as shown above and OK!
4. You can also set other registries and keyboard shortcuts.




EXPANDED TECHNICAL DETAILS
Pipeline for Digital Pipe Organs
This project acts as a high-speed interface for Hauptwerk, the world-leading virtual pipe organ software, enabling vintage organ hardware to communicate with a modern PC.
- MIDI Note Decoding: The Arduino listens to a stream of MIDI commands (Note On/Off) coming from the PC via the Hairless MIDI-Serial bridge. It parses these bytes and translates them into digital triggers for individual pipe solenoids or lighted knobs.
- Matrix Output Hub: To manage dozens of stops and keys, the Arduino uses multiple 74HC595 shift registers, allowing it to control up to 64 independent outputs with minimal wiring.
Low-Latency Performance
- Asynchronous Data Handling: The firmware uses a "Non-blocking" buffer system. This ensures that even during complex musical passages with many simultaneous notes, the organ's physical response remains virtually instantaneous.