MIDI Wind Controller – the “e-WB”

11 Apr 2024

Overview

This describes my latest MIDI wind controller, which uses a Raspberry Pi Pico microprocessor. My previous MIDI devices used Teensy 3.2 processors, which are now extinct, and so I figured that if I ever had to replace the processor I would be without my instrument for a long while. I decided to make a completely new instrument, but relying on the previous experience I had with the midi-Sax.

I re-used the side-by-side hand arrangement that I had tried previously. The result looks like this:

Details

The instrument has the following features:

  • Compact size – 380mm long
  • Low weight – 510gm (without battery)
  • RPi Pico microprocessor
  • 5-octave range
  • Touch sensitive keys
  • 128×64 OLED display
  • Menu knob
  • Program button (for presets)
  • Reed pitchbend using Roland AE20 mouthpiece
  • Portamento key
  • Either USB or BLE MIDI (with battery and adapter)
  • Accelerometer to drive growl (programmable)

The body of the instrument is 3D printed in PLA+, and mouthpiece holder is printed in ABS for strength and so that it can be smoothed with acetone (hygiene).

The mouthpiece is from a Roland AE-20 and the reed and pitchbend mechanism is 3D printed in ABS.

The keys are set at an angle in two dimensions to get a comfortable feel:

The back of the instrument (below) shows the LH thumb octave keys and (red) program key, the earthing RH thumb pad, the glide (portamento) key above the thumb pad. In the centre is the adjustable neck strap loop.

The OLED display and knob enable the settings of the instrument to be shown and adjusted.

The instrument can be connected to a synth via a USB-C cable, or via a BLE adapter. Shown here is the battery and my Yamaha UD-BT01 Bluetooth adapter. The battery provides at least 6 hrs of play time:

Inside the instrument (below), the RPi Pico processor is mounted on a vero board:

Mounted below the processor is the accelerometer, and above the processor are all the cable sockets to go to the display, knob, mouthpiece, etc

In the photo above, the EEPROM can be seen next to the USB connector in the bottom right of the case.

The photo below shows the mouthpiece holder and the mouthpiece itself. Inside the holder is the photo-cell that detects the reed movement.

The video above shows the reed action.

How does it Play?

I use XpressO synths and this instrument has been built with that in mind. That said, it will work with most synths, it’s just that there some features are targeted specifically to the XO (e.g. the fine tuning)

The biggest hurdle with this instrument is getting used to the side-by-side hand positions. The best way to approach it is not to think about it!

As far as the ease of use and performance, it meets all my needs. All the functions work reliably, and the latency is acceptable at about 65msec incl a 35msec key delay. I’m sure that can be improved as I’ve only just started programming it.

The ability to scoop notes with the reed is very sax-like, and the touch-sensitive keys enable really fast playing. I’ve never had an instrument that has an accelerometer to drive effects. I’ve got it doing growl at the moment, but it’s a work in progress.

Peculiarities of the RPi Pico and CircuitPython

I hadn’t used a Pico before, but it looked like it had all the requirements, so I jumped in.

I managed to use ALL the I/O pins:

  • 18 touch-sensitive keys
  • SDA and SCL for I2C (the display, the accelerometer and the EEPROM)
  • Program button
  • Encoder knob A, B and click
  • Analog breath
  • Analog bite

I used CircuitPython as the programming platform, as it had the modules I needed. The touch sensitive keys were easy to configure, but I discovered that they require a lot of processing time, particularly when using a lot of fingers. The program scans the keys on each cycle and it was taking about 12msec with no fingers applied to around 23msec with all fingers down. This is clearly too much for fast keying. The solution I found was to overclock the processor from125MHz to 260MHz. This was fairly simple to do, and it dropped the all-fingers-down time to around 13msec. While that is not fast, it is workable. I’ve been running a check on the processor temperature (there’s an in-built sensor) and even with the overclocking it’s running cool. I haven’t been able to find the code to attempt to adjust the touchio module yet.

I needed to store program configuration values that are kept between boot-ups, but using CircuitPython it is hard to store data on the processor chip, as it involves un-mounting and re-mounting the USB drive. Instead I installed a I2C EEPROM. It is fast, easy to use, and didn’t take up much space.

I initially chose a Pico W model with the BLE and Wifi capabilities. I was hoping to be able to get MIDI over BLE sent out by the chip, but I soon discovered that the code for BLE MIDI is not ready yet. I had to use the Yamaha adapter. That in itself presented problems as I found I had to build in a 0.5 sec delay on start-up before any python modules are loaded. If there was no delay, the USB interface didn’t come up cleanly and many modules wouldn’t load. I reverted to using a Pico (not W model)

The SSD1306 display has limited font files using CircuitPython. I’m using a 8×5, and it is pretty small. I couldn’t find any other font files that worked.

The power consumption is low. Even with the overclocking it pulls about 440mA. For comparison, my EWI-USB draws about 580mA, and my Midi-Sax (Teensy 3.2 + other processors) draws 720mA

The rotary encoder module that CircuitPython uses requires that the GPIO pins you use for the two encoder inputs be SEQUENTIALLY NUMBERED. It would have been really good to know that BEFORE you solder a lot of stuff… Mine are now on GPIOs 0 and 1.

Technical Stuff

Components:

  • Processor – RPi Pico
  • Accelerometer – ADXL-345
  • Display – SSD-1306
  • EEPROM – Adafruit 24LC32
  • Reed movement detector (optical sensor) – QRD1114
  • Pressure sensor – ABPLLND060MGAA3

The wiring diagram:

Why is it called “e-WB”?

I didn’t have a name for the instrument when I first brought it along to band rehearsal. The band director said, “it looks like a hot-water-bottle”. Thanks.

Update History

11 Apr 2024 – changed pressure sensor

29 Mar 2024 – original post