Nibbletronic

crappy twitter profile pic because I was unable to find my decent camera's charging cable. Again.

The device

The Nibbletronic is a MIDI wind controller. I’m not yet sure about capitalization of the name. Or the version number, but I think 1.0 is right around the corner. At its heart it’s an arduino micro hooked up to a pressure sensor (Freescale MPX5010DP), a MIDI out connector and ten microswitches. Because, ten fingers, you know?

Find the firmware at https://github.com/schlimme-gegend/nibbleTronic

Building instructions for version 1.0α can be found here.

The controller allows you to play a range of four full octaves by encoding the notes in one octave as four bit (a nibble) binary numbers while using two additional switches to select an octave. So one can play 48 notes with six fingers. Version 1.0 will bring this down to five while expanding the octave range.

The controller is an ongoing project in early prototype stadium and object of permanent evolution. If you want to build your own, I encourage you to wait for the next iteration which will feature input from actual musicians and solve some issues I found in this design. Also it will be mounted to a PCB instead of threaded brass rods for increased hackability and ease of manufacture.

Why did you do this?

I’m interested in music and electronics and this project hit the right combination of problems. It taught me the MIDI protocol, analog sensors and forced me to come up with a good solution to read multiple inputs continuously without spamming the receiving end (which reliably killed the software synth I used in the beginning). MIDI is not exactly designed for the kind of signal that is is generated by a wind controller so that was interesting too.

How did you get this idea?

The nibbletronic can be placed somewhere between the Airduino which provides wind control without mimicking any existing instrument and the Hopkins Electronic Aerophone which clearly was designed by a musician. A lot of additional inspiration has been drawn from the Gordophone pages, especially the idea of using the channel volume to change the loudness of a note while playing. The first revisions used velocity and aftertouch signals with unsatisfactory results.

Is there a wiring diagram?

The current wiring can be found as KiCAD project in the repository. I’m using KiCAD for two reasons: First, it’s free software. Which is good in itself but has the added bonus that it doesn’t incur cost for people who want to recreate the project. Secondly its parts editor is much better than the one of fritzing. Fritzing has its strong points in mimicking the whole prototyping process from breadboard to pcb and generating really good illustrations. Also it’s incredible easy to use, as long as you stick to its parts library.

Why do you use serial MIDI when there is a USB cable?

MIDI via USB can easily be implemented but my current synth has a traditional MIDI port. The nibbleTronic’s firmware is kind of optimized for that machine as it interprets the upper end of the pressure curve as detune of the third oscillator of the synth to create a dirtier sound when playing really loud.

How to encode one octave with four bits?

A nibble provides you with sixteen states which is more than enough to encode the twelve notes in an octave. So I decided to map the whole steps to the even numbers and the next higher semitone to the next odd number. Mapping starts at 0000 for c and reaches a bit into the next octave so there are several ways to play a c of the next octave. Having the semitones on the odd numbers resulted in two ways to play an f (0011 and 0100) as there is no semitone between e and f.

found the cable :)

Click for useful resolution

What are all those buttons for?

The upper four are used to play notes, the there are two for octave selection and three more for random stuff. Of the last three, two are spaced closely to be played with the right hand’s pinkie, which is less than optimal from an ergonomics standpoint but kind of works. Random stuff currently means channel selection which was intended to trigger a second synth to play long notes or chords as accompaniment while one plays a melody on the primary device. They can also be programmed to add chords to played notes when using a polyphonic synth.

What will be different in version 1?

So far I know that I want to implement the octave selection with a slider. And maybe add a Joystick to the lower half. MIDI via USB would also be nice, Just look at the mock ups:

Top view

Bottom view

Bottom view

Note the two red switches, they will be used to change the input mode of the microswitches from “on when closed” to “on when open”. The one at the bottom doubles as tactile half way indicator for the octave slider. Also there is a new pushbutton (blue, just south of the Ardu) that can be used to send the maximal channel volume. Currently the Controller sends a channel volume of 0 when not in use and this interferes with adjusting the connected synth. The joystick may play the part of the dreaded pitch bend and modulation wheels.

Can you play this?

Sadly, no. I never got around to learn playing this (or any) instrument. However I just recently witnessed somebody else picking up this thing and playing his standard wind instrument testing melody after only a short introduction on how the notes are encoded, so it is definitely a playable instrument.

You really like to write dialogue, don’t you?

Yes. Now go away.

The next stage

Ok, first I have to thank Hackaday to direct me to this series of youtube tutorials for KiCAD. I finally understood KiCAD and picked up some useful knowledge on PCB design in the process. This allowed me to finally design a board for the instrument. I did some changes to the schematic.

The new schematic

The new schematic

In the center of the schematic you find the Arduino Micro. Above that is the MIDI connector and to the left there are the four ‘valves’. They are hooked up to a selector switch that changes, which of the pins of each valve is connected to ground, which allows the player to choose if he wants them to be active when held down (‘closed’) or when released (‘open’).

The octave selector is a potentiometre and is hiding to the right of the Ardu. Next to it, you find a battery, that is also a new addition to the design. Then there is a joystick next to the battery, which will be used for pitch bend and modulation and also comes with a pushbutton. Below the Joystick you find the pressure sensor which has been upgraded with another pushbutton that connects its signal pint to 5 V to send maximal volume. I hope the sensor can handle this, otherwise I should have added a diode.

Finally, in the bottom center there are two more sliders that will be assigned to some MIDI controller. All files can be found in the projects repository, including a bill of materials.

Prototyping is hard

So, the PCBs finally arrived after several weeks. I was already about to reorder them fro another source and am happy that I didn’t because I was reminded that the purpose of a prototype is to show you what you forgot or got wrong.

Is it a longboard? Or just a long board?

Is it a longboard? Or just a long board?

In this case it was mostly component footprints that I got wrong, most prominently for the sliders, where the holes didn’t match the location and size of the pins. The same goes for the holes in the mode selector switch. Then the spacing of several components turned out to be less than ideal. So overall this was not really version 1.0 but more 1.0α. In the end it looks like this:

assembled_bothsides

Sorry, no banana, but there is a 5mm grid for scale reference

And this is how I got there. Using 0.2 mm coil wire, I managed to get it soldered together:

No way this gonna work!

No way this gonna work!

When in doubt: Add hair to your project.

When in doubt: Add hair to your project.

I looked for the pads that were actually connected to something (The sliders use the same housing for the stereo and mono versions so the monos have twice as many legs as required) and soldered thin copper wires in there.

Original and Molested modified slide pots next to each other

Original and molested modified slide pots next to each other

I cut off the unconnected pins and bent the used ones outside to then wrap the copper wire around them. The copper then was soldered in place and most of the original pin, now facing outwards, cut off, to give credit to the somewhat crowded board. Some more details, where I found this iteration lacking:

 

Nice view at the sliders brokenlegs and the copper prothesis that replaced them.

Nice view at the sliders broken legs and the copper prosthesis that replaced them.

Not that crowded, but the legs really had to go.

Well... That's embarrassing.

Well… That’s embarrassing.

Another footprint with too small holes. Two actually, the switch is held in place by superglue.

That's one way to get a diode in there.

That’s one way to get a diode in there.

And finally: Adding a battery was a good idea. the nextversion will also get a power switch.

And finally: Adding a battery was a good idea. the next version will also get a power switch.

I also found some ergonomic shortcomings, the valves are a bit to close together to be played comfortably. Overall this was a nice experience, and the prototype actually transmitted MIDI notes directly after loading the firmware and powering it up. And soldering parts to a PCB I designed myself and ending up with a working device still feels like magic to me 🙂

So, what to do now?

Simple, just reiterate and get the next version up. In the current (Oct. 2016) revision of the board layout, I have corrected the slider footprints and fixed the spacing of the two sliders on the upper side. Same goes for the valves. The diode now has a place on the PCB and is no longer trying to poke the user in the eye. I decided to go with SMD components for some of the parts to make routing the board easier and to try my hand on SMD soldering. I considered to replace the octave slider with one of these fancy 1D touch sensors to overcome an ergonomic problem I encountered: To move the slider one has to exert quite some pressure and this may result in pressing valves unintentionally. But I failed to source such a sensor in the required dimensions, so the slider stays and will get a handle with a ring.