Whistle Plus Buttons Equals Instrument

A project log for MIDuino EWI

Building an electronic wind instrument using an Arduino

ellejoharaellejohara 07/10/2023 at 05:530 Comments

I have finally gotten around to making a project update. Hooray! Taking the code wrote in my previous two YouTube videos on Arduino MIDI, I've combined the whistle code with the buttons code to create a playable musical instrument I've dubbed the MIDuino EWI.

This is a super simplified instrument more akin to a recorder or a six-hole flute made from a PVC pipe, if either of those things were MIDI devices. I have eight buttons to play twelve semitones in an octave, and a breath sensor which enables a two octave range just from air pressure alone. (Though that particular feature is still a little fussy.) Key fingering is pretty versatile thanks to the power of math, and prior DIY EWI code pioneers Johan Berglund and Bret Pimentel. This is a chart of the key fingering I typically use, but there are a lot more options for each note than are depicted here.

Here is a flowchart of the loop function for the EWI code. Only when the airflow is above a specific threshold will the instrument begin checking for key fingering positions to determine which MIDI note to play. If the airflow stays above that threshold, and the key fingering stays the same, the EWI will send MIDI CC breath data to control volume (or whatever the player chooses in the synth). If airflow crosses the midpoint or cuts out completely, or the key fingering changes, the MIDI CC data ends and a note off signal is sent to the synth. Then the loop begins again.

I've been using software called Hairless MIDI to bridge the serial data from the Arduino to the MIDI port. It's just a stopgap until I get a model of Arduino that I can program to use as a true USB device. (I'm thinking the Arduino Micro will do the trick.) I'm also looking into using capacitive touch pads instead of mechanical buttons to try and make the instrument a little more efficient to use.

The code can be found on my GitHub page in the 'video-58' folder. It's file '5801-MIDuino_EWI.ino'.

Watch the latest YouTube video for this project: