Music hack of the decade: Panflute Hero!

Jhonny Göransson was part of the team that made what’s simply the daftest and most wonderful music hack we’ve seen so far. The moment he tweeted about it last night, we knew we had to show it to you as soon as we could.

It’s called Panflute Hero.

Panflute Hero was the result of a weekend at Way Out West Hackathon 2013. It’s a very silly panpipe version of Guitar Hero, which doesn’t use a plastic guitar controller. Instead, it’s controlled by a hand-built, bamboo set of faux panpipes (which are built according to the Golden Mean), all equipped with Arduino sound sensors that detect blowing, and controlled by a Raspberry Pi sending “blow” events to a desktop over TCP. Simulated flute noises are emitted when a “blow” is sensed, and…well, see for yourself.

The game itself is built in Lua, and runs on a PC (no reason you couldn’t run a port on a Pi). There’s some considerable *cough* sophistication in there, with libspotify playing some of Spotify’s horrifyingly large library of panpipe choons, which are delicately gameified for your panpiping pleasure.

Instructions, code (Jhonny says: “In the spirit of hacking and hackathons, our code really blows (get it?). You can look at it in BitBucket and publicly shame us if you want. Please don’t.”), and some kick-ass panpipe cover versions of the greats are available on the project webpage. Let us know if you make your own; I can imagine the controllers getting mildly unhygienic after much shared use, but any party involving Panflute Hero is bound to be a blast. A gently tootling blast.


elmsley avatar

Cool! At first I thought it was a b*mb, careful bringing that on the plane for the tech shows!

Ravenous avatar

Madness. Stairway To Heaven, anybody? (Ok, that was a Recorder I think)

More seriously, I wonder if this sound sensor method could be used as an input device for people who can’t use their hands…?

liz avatar

I believe something similar is used for people with very limited motion, and has been for a while; the wheelchair tech I’m familiar with is called Sip and Puff.

Declan Malone avatar

No Stairway!

paulc avatar

Stairway denied :(

CaptainofSpray avatar

What is it about the Pi that brings out this level of eccentricity in people? (yeah, me too).

Arnt Karlsen avatar

..put the blame where it belongs, it’s first watching Crocodile Dundee (“Naaa, needs garlic,”) and then Nyan Cat. ;o)

clive avatar

It’s completely irrational.

liz avatar

Badoom and also tish.

Ken MacIver avatar

Gheorghe Zamfir eat your heart out…
( I thought things based around Pi were transcendental )

Jim Manley avatar

I find it amusing that Göteborg (Gothenburg) Sweden is considered “Way Out West” by the hackathon organizers :) Perhaps we need to incorporate more geography lessons in our new-fangled computing curriculum to point out where the Prime Meridian is, and that there’s an entire hemisphere to the West of it, including at least a few hackathon sites that are, indeed, Waaaay Out West ;)

While well-heeled professionals and hobbyists may not care, for more budget-conscious educational and penny-pinching experimenters, it should be noted that the “Arduino sound sensors” used aren’t connected to an Arduino in this application, but directly to the Pi’s GPIO ports. They’re simply a prepackaged product containing a comparator, mike, and related circuitry that could be built for much less than the ~$5.00 these cost. In fact, a quad comparator device with four inputs would cost only pennies more than the single comparator used in this sort of product. Using four of the prepackaged boards costs upwards of $20, while a purpose-built quad unit would cost no more than a couple of dollars via on-line sources using ground/postal shipping. If a local group of makers pools their orders (e.g., via a Jam, school, etc.), then costs can be reduced even further. Hope this is helpful to someone.

Jim Manley avatar

I should note (before my detractors do) that if you do use a quad comparator, they only have two output pins and the channel number of an active input is encoded as two bits. The good news is that this cuts the number of GPIO pins needed from four to two, but the bad news is that would need to be modified to only monitor the two GPIO ports and decode the two bits to determine which sensor is active. So,
11: “MIC_1”,
12: “MIC_2”,
15: “MIC_3”,
16: “MIC_4”
would be reduced to just two ports (e.g., 11 and 12), and they would need to be renamed something like “MIC_BIT_1” and “MIC_BIT_2”. Some additional code would be needed to convert the two bits presented on those two ports to the four individual mike signals (“MIC_1”, “MIC_2”, etc.) used in the remainder of

Andy avatar

Göteborg – “Way Out West”?
Some time ago, like 300 years or so, the English and the French were arguing about where to put the Prime Meridian – through London or Paris (there were also those who thought Jerusalem would be good). England won, naturally, otherwise Umberto Eco would have had no story.
But just think, If the Germans had there act together at that point, Munich could have been chosen. Then Göteborg would indeed be as far West as you could go without wrapping round again.

Pete avatar

Completely off topic …. but I’m now running tiny core linux on my pi …. …. very quick!

Vetal avatar

Fo those who want to know name of the song:

Mike Oldfield – Moonlight Shadow ft. Maggie Reilly.

Ben Jacobs avatar

Zamfir comes to mind:

All jokes aside, awesome project!

Patrick avatar

This is hilarious.

Obviously this is just another incarnation of Guitar Hero, which is simply the old ’80s game Simon. Except that Guitar Hero is basically Simon attached to a stick.


Anyone who brags about their score on Guitar Hero is ridiculous.

Why not just learn how to play a real instrument?

liz avatar


Chris Waddle avatar

I completely agree. I’ve been constantly haranguing my son for the past year to stop playing that lame Minecraft and just get down the pit.

Billy avatar

Gamers? Lamers more like! Why play Guitar Lamer when you and you friends from Brazil and Canada could all fly to a jam session somewhere and play real instruments. With your fingers. No one who plays Guitar Hero can even play a guitar or a banjo, no one, it’s identical to “Matching Pairs!” but not played with cards and on the TV. Losers!

As for those of you playing Fifa: why not just learn how to play soccer? Soccer is just like Fifa 2008 but with better graphics. And F1 is simply another incarnation of Burnout, which is simply the old 70s game Datsun 280 Zzzap but without a steering wheel. Anyone who brags about their score on F1 should take a hard look at OJ Simpson and think about how they feel. Not so funny now, is it? Why not just learn how to drive a real car? With a “WWPD?” bumper sticker.

And don’t even get me started on Journey. Just make a robe out of your curtains and walk through your NEAREST FREAKIN’ DESERT! Get a goddamn life you goddamn lamers!

Ravenous avatar

I agree. Don’t stand on a street corner shouting all that though :)

mrpi64 avatar

At first it looked like a stick of dynamite to me!

Ravenous avatar

Good point. Imagine a band of panflautists going to a Panflute Hero convention passing through airport security with a suitcase full of those things…


clive avatar

Thanks for sharing this Jhonny: it’s great to see some other sensors other than IR, capacitive touch etc being used on the Raspberry PI. Lots of scope here for creative projects, cheers! (While writing this I have had a vision of a Skool Daze-alike game where you can fire virtual chewed up paper pellets at the teacher with a real peashooter… :))

Darren Townsend avatar

Surely for an authentic experience Clive, you should use a biro case instead of a proper pea-shooter (that’s just cheating)!

Cameron Smith avatar


Comments are closed