Raspberry Pi is this church’s new organist

A few months ago, Eugene Olsen’s church lost its organist when they moved out of the area, but Eugene noticed that the organ happened to have a MIDI interface. He used a Raspberry Pi 4 and grabbed MIDI files of the hymns, then wrote a custom hymn player in C++.

Here’s Eugene’s tribute to our UK-made computers
(Video shot by Kathryn Burgess with the help of Timothy Burgess)

Hardware

Software-wise, a custom-built MIDI sequencer written in C++, and based on cxxmidi library which uses rtmidi and ALSA, runs on 64-bit Raspberry Pi OS.

How does it work?

The organ player is controlled over Wi-Fi by an iPad, and Eugene made the Raspberry Pi into a Wi-Fi access point with the help of this Tom’s Hardware tutorial. A Wi-Fi dongle connects to the church’s Wi-Fi. This way you can download new hymns and updated software without removing the Raspberry Pi from the organ.

The software that allows remote control of the Raspberry Pi from a mobile device is RaspController, which is available for both Android and iOS, and in many languages.

Looking down inside the organ with the new hardware

Eugene opened up the organ at church and saw that it has a MIDI interface. He found a USB to MIDI adapter and some MIDI libraries for C++. Luckily, he has been making music with MIDI since the 1990s, so he knew what he was doing. He experimented with some off-the-shelf software MIDI sequencers, but none played the hymns just as he wanted, so, being a professional software engineer, he looked for some libraries and wrote his own sequencer. Eugene settled on the cxxmidi library because it’s written in a way that can be easily extended. He wrote a few small extensions and stitched the library routines together with C++, creating a MIDI sequencer that plays the hymns exactly the way he wants.

Sibelius music notation software takes the written music from the hymn book, then exports the hymns as MIDI files.

Why not find a new human organ player?

Every aspect of the Eugene’s church is volunteer-run, so there aren’t the funds to hire musicians and whatnot. When the organist moved away, Eugene was asked to play the organ for services. However, while he’s a software pro, he is a beginner keyboard player and he found it took him around three to five weeks to learn each hymn to his satisfaction. When he discovered that he’d need to learn three or four new hymns every week, he enlisted Raspberry Pi as the new organist.

A simple tap of a screen is my kind of musical training. Work smart, not hard!

17 comments

Baba Ganoush avatar

Please reformulate. It reads now as they (the church) moved out of the area, which is nonesense. Did the organist move out???

Helen Lynn avatar

I’m very comfortable that a different writer or copy-editor might refer to a church as “they” rather than “it” — that’s a nice bit of flexibility English allows around referring to organisations and groups of people — but I am cut to the quick that someone would suspect me of using the possessive pronoun “its” and the subject pronoun “they” in place of the same noun in the same sentence.

John A avatar

Yes, I had to read that sentence twice too! While using “they” to refer to a singular is sometimes correct, it would have been clearer to say “..when he (or she) moved out of the city.” Then there would be no ambiguity. But, regardless, this is a cool project.

Dave avatar

Which moved first, the organist or the church? 😉

Ashley Whittaker avatar

The egg.

Allen Coons avatar

I didn’t know the egg knew how to play the organ?!

Jenna avatar

Yes, the church moved out. That makes much more sense.

Brian Fitzgerald avatar

Clever. And nice looking case. Is there a .stl file for that somewhere for 3D Printing?

Paul Smith avatar

It’s a commercially available case used for servers and kodi installations. Argon ONE M.2 case

tlennon avatar

That’s not 3d printed. It’s called the Argon One case for raspberry pi 4. It’s magnetically closed so no screws. It makes the top of many “best raspberry pi case” lists. Every once in a while I check for an stl hoping somebody made a copycat. No luck yet

Frank Kersh avatar

Amazing work!

Ian avatar

Nice article, although it does gloss over the finer points. Having scanned more than 209 hymns from a hymn book (plus other forms of liturgical music) and having worked with those in Sibelius, I can attest that there’s a little more to it than what was stated above. And in the real world of church music there are verses dropped from hymns at certain times in the church year, and there’s a need to improvise an introduction before many hymns, all of which requires more work and finesse than this simple description. Still…good work!

Eugene Olsen avatar

Ian, you are right about the finesse, verse selection, and so forth. I left out many super-techy details and in addition, the article was edited for simplicity, and that’s fine with me. I’m sure, as you scanned and edited hymns, you noticed that patterns emerged. I have automated many of those patterns along the way in either Python or C++ and can now scan and edit a hymn usually in less than an hour.

Rodoñfo Bonnin avatar

For a related project, you can check openpipes.org

AJ Wilcox avatar

Very cool! Eugene, please publish your code. I’d love to try this in my ward.

Eugene Olsen avatar

Brother Wilcox,
Currently, my code is very specific to the older Allen Protege-16 organ and is still evolving. The newer Allen organs already have the hymns you are interested in, plus a player, built in. What make and model of organ does your building have?

Philip H avatar

Way to go. That is awesome. At my church, we have the Liahona Kiawa Organ. I use the midi ports to run to and from my laptop. But I would like to make something, that can stay with the organ in case I don’t make it to church.

Comments are closed