A Simple Wind Controller for Kids
Updated 7 Jan 2019
This started when my granddaughter said she wanted to play an instrument and her parents got her a soprano recorder. Her fingers were having difficulty covering the holes, and the sound was, well, like a recorder
So, I had a vision. It went like this:
- Imagine a kid’s instrument with keys instead of holes, so there would be no problem covering them
- Imagine it small and light
- Imagine it as a MIDI instrument so it could sound like any instrument, and the kid would LOVE the sounds
- Imagine the instrument wireless
- Imagine a whole class of kids with these instruments plugged into a synth – an orchestra!
I said, “How hard can it be?”…. and I produced this:
The whole instrument is 3D printed (I have lots of orange filament). It weighs 300g and is 350mm long. It consists of two parts – the instrument and the receiver (below), which plugs into a synth via a DIN socket.
The back has the octave buttons, an adjustable thumbrest, and looks like this:
The body and bell are printed in PLA (easy to print large shapes without warping). The mouthpiece is in ABS for strength, and it is over-coated with gloss acrylic to seal up the surface and make it more hygienic.
I decided that, in order to keep it simple, I wanted the minimum number of keys. I settled on 8 finger keys. The LH pinky key is used for the 1/2-hole sharps on the RH of a recorder. The keys themselves needed to have low actuating pressure, and have tactile feedback. I chose Cherry MX Brown keyboard keys, which have an actuation force of about 50g. I decided one octave up and down (total of 3 octaves) was sufficient, so I needed only 2 thumb keys. The thumb keys I chose are short movement keys, but have too high an actuation force for my liking (about 140g), so I’ll have to replace them in the MkII version.
I implemented recorder fingering for the notes that I could. The exceptions are upper C# (all fingers off), and lower C# and D# (using the left pinky). I included all the simpler sax fingerings as well, so for example, there are 4 ways to play an F.
I decided not to implement pitchbend. Why? Well I was designing the instrument for kids, and I think the ability to bend pitch is a higher-order requirement. In addition I like pitchbend actuated from the mouthpiece, and that would mean a fairly complicated mechanism.
I wanted to be able to plug in to the DIN port of a synth. Why? Well my synths have DIN ports! If I need to plug into a computer, I can always use a cheap MIDI/USB converter. I wanted to make it wireless, so the options were Bluetooth LE or some other wireless system. I’d had experience with BLE with my previous instruments, and I found it complicated from a programming point of view. The decision was made easy when I selected the NodeMCU (ESP8266) processor – I had two of them lying around from a previous project. This processor has WiFi, but not Bluetooth, so I opted for a WiFi-based system. I did some testing and found that the latency was minimal.
I initially decided to go for a TCP client/server arrangement because the wireless packets are virtually guaranteed to get to their destination. After building the instrument and doing much testing I was getting the occasional one to two-second delay. I eventually tracked it back to the TCP. Although TCP guarantees packet delivery, it doesn’t necessarily do it in a timely manner. I think what was happening was occasionally a packet was lost and a re-send was requested, but that took time – hence the delay while everything waited for the replacement packet to arrive. I switched to UDP which is much faster, but there is no guarantee. I worked around that by sending the critical commands (note-on, note-off) multiple times, and then filtering out the multiples at the receiver. It doesn’t really matter if a breath command is lost – the next one will arrive very quickly afterwards.
I kept the length of the body as short as possible so that I could print it on my 3D printer, which is limited to 200mm width. As it happens, that is about what is needed to accommodate the keys. There needed to be room inside for the processor, battery, charging equipment, breath sensor and wiring. It ended up looking like this:
The battery is a 18650 Li-ion from a powerbank. I used the powerbank connectors inside the “bell” of the instrument as the on-off switch – you just plug in the USB cable like this:
The photo above also shows the main air tube with a screw in the end. It also has a hole in the side of the tube, and the screw partially covers the hole, enabling adjustment of back-pressure.
For good performance, it is important to get the breath sensor plumbing right. After looking at the arrangements in my EWI and Aerophone, I tried to allow easy venting of the sensor tube when you stop blowing, and tried to eliminate condensation from entering the tube in the first place. The following photo shows the breath chamber below the mouthpiece with the elevated sensor tube (left) and the lower main tube (to take away the condensation).
The mouthpiece exit hole is positioned directly over the main tube entry. The mouthpiece is sealed to the chamber using food-grade grease.
The receiver has the same NodeMCU processor and is powered by a simple USB lead. The NodeMCU processor is fussy about power supplies, so I included a large capacitor (the instrument is powered by a battery which shouldn’t need a capacitor). The driving of the MIDI DIN port is simply done using a optocoupler from the serial out pin of the processor. The receiver sets up its own WiFi hotspot, which the instrument connects to automatically. Connection takes about 5 seconds.
Well, the proof of the pudding…. My granddaughter loves it. She particularly likes the great Patchman Soundbank sounds that my synth has. There are all the orchestral sounds as well as the “synthy” ones. The ability to make a good sound by simply blowing is priceless, and she spends a lot of time just mucking around with the instrument.
For me? I’m having fun with it too. It’s small and light. The battery lasts for about 12 hours. I’m having to learn to use alternate fingerings (eg. both index fingers for Bb rather than the side key), and that’s a good thing.
The thing I was particularly worried about – the transmission latency – is a non-event. It just WORKS (after much tweaking). I have the processor sending out CC2s (breath) every 6ms, and it’s doing it easily. It has all the normal functions: note-on delay, key delay, transposition, octave selection, MIDI channel selection.
- NodeMCU ESP8266 processors on both instrument and receiver
- MPX5010DP pressure sensor
- 10650 Li-ion battery with powerbank charger
- Cherry MX brown – finger keys
- SPST round PCB tactile switch – thumb keys
The interface schematic on the receiver looks like this: