Electro-sax keys
The keys of the saxophone are one of the parts it’s taken me longest to get right. Like the other parts, I want it to feel close to a real saxophone so that muscle memory can help me out. That affects both the arrangement of the switches and the feel of the switches. This post sat unfinished in my drafts folder for 2 years but it’s time to get it posted.
Arrangement of the 21 keys on a real alto saxophone compared to the electro-sax's 14 (and another was later removed). The electro-sax is heavily simplified to just the basics, which might make it limiting to some players.
The arrangement is seemingly easy - just arrange the buttons like they are on a real sax! It’s a bit more complex than that, since I want to simplify the sax and not end up with something quite so large. There are three main types of button, which I’ll call finger buttons, side buttons and thumb buttons. The finger buttons are the main ones on the front of the saxophone, actuated with the pads of your fingers. Usually there are a few keys available for both little (pinky) fingers, but I’ve simplified those down to a single one on each hand.
The side buttons are pressed with the palm of your hand or the sides of your fingers. They’re used to access a few extra notes or alternative ways of playing notes. Usually there are 3-4 of them on each hand, but I’ve simplified it down to just one on the left hand and 2 on the right.
And finally the thumb keys are the octave buttons. Yes, that’s plural. Because I’ve cut down the number of little finger keys, you need an extra “octave down” button to reach the bottom few notes of a typical alto sax. Technically it’s still missing the top couple of notes too but we can get away with some different finger positioning for those!
Finger keys on a saxophone mostly change the note when they’re fully closed. You’re putting a lid across a hole - while the hole is partially open it’s still a hole. So to feel natural the finger keys need to actuate when your finger reaches the bottom of its stroke. Side keys and thumb keys are different - they mostly open valves, so after absorbing a bit of play in the mechanism the action is near the top of the stroke. There are exceptions to these rules, but that’s probably a good enough approximation.
The early switch prototypes for the electro-sax. The numbers in the image match up with the numbers I'm giving the prototypes in the headings.
Prototype 1: Keyboard switches
The first prototype of the electro-sax was quick and dirty, using keyboard switches with round caps for the keys. They actually worked surprisingly well. It felt a lot more natural than I expected, and I could actually play a tune on it!
The first prototype of the electro-sax, with keyboard switches for the keys.
The main thing which felt awkward was the actuation point. MX-style keyboard switches turn on when you reach roughly 2mm of travel, which is only halfway down. With an actuation point halfway through the switch stroke, it’s hard to lift and lower your fingers at the right time. That results in very brief-duration wrong notes whenever you lift or lower multiple fingers.
Prototype 2: Capacitive switches
Having 2mm of travel after actuation was too much, so how about no travel at all? Capacitive switches are the approach taken by KontinuumLab in his Open Horn MIDI System project. They’re very simple - no moving parts, just an insulated copper pad - and they’re easy to implement on a Teensy with its built in capacitive touch library and a single analog multiplexer.
The capacitive touch prototype
I made another cardboard prototype and tried them out. The result worked extremely well but is very far from what I’m looking for. Without any parts for my fingers to move, it felt more like a recorder than a saxophone. One aspect that made it difficult to play was that you can’t rest your fingers in place on the keys - that would count as a press! So the analogue capacitive sensing is great for expression options, but not so great for a familiar feel.
Prototype 3: Microswitches
This prototype was very short-lived. A microswitch sounds like a good idea because they have short travel so can actuate at just the bottom end of a longer-travel lever press. After assembling a few I found them far too clicky, both in feel and in noise! Quiet microswitches would have helped with the sound but not the feel. Having a click in the travel didn’t work for me.
I didn't even need to make this prototype functional to know it would be unpleasant to play.
Prototype 4: Hybrid capacitive
What if you physically moved a lever and sensed that movement capacitively? This prototype felt great - very satisfying and matched my muscle memory really well. You can individually adjust the sensitivity of keys to adjust the actuation point.
This hybrid capacitive switch prototype was the first one that felt great to play. I moved on for reasons you'll see below, but it did feel like an instrument!
The downside is calibration. The exact value required for actuation drifted over time, meaning switches would actuate too soon or not at all and I’d be left playing the wrong note. The calibration process was slow and had to be done multiple times during a play session. This could probably be improved so that it’s automatic, but it would take a better programmer than me!
The other problem with these switches was that the need to wrap copper tape around the button constrained its shape. You can’t easily have a rounded dished shape like a real sax button as the copper tape will crumple. That limits how similar it can feel to a real sax. I could probably get around this by printing the button tops in a conductive filament.
Prototype 5: Hall effect
Another short-lived prototype this time. The principle is that you press a moving lever with a magnet in it, and the proximity of the magnet is sensed by a hall effect sensor below the lever. This should vary a lot less over time than capacitance measurements, as long as it’s not near any strong magnets.
This looked promising but buying enough analogue Hall-effect sensors would be too expensive. You can get cheaper fixed Hall-effect sensors which trigger at a certain magnetic flux density, but I suspected it would take some trial and error to find the right sensor, magnet and distance. I also wasn’t sure how much trouble I’d have with interactions between nearby keys. Overall, too much hassle for quite a complex solution.
Prototype 6: Conductive silicone
We’re finally at the latest prototype. This uses two interdigitated contacts on a PCB, which get bridged by a conductive silicone pad mounted on the lever you press. It’s very similar to how TV remote buttons work. This design worked fantastically! It’s very simple, there’s no calibration needed and the switch can only actuate when it bottoms out.
Lineup of conductive silicone key prototypes. The first 3 are resin printed, which I find too messy to cleanup for a design I'm iterating on repeatedly. The rightmost design is a single filament print which flexes as you press it - no need for separate springy material or a hinge! The later designs all use a small PCB I designed which contains the switch contacts and a diode. The diode enables the switches to be easily wired up as a matrix.
For finger buttons this feels perfect - it feels very similar to a real sax. However for the side keys it leaves a bit to be desired. I flipped them round to break contact when you press the button, but it’s too sensitive. The mechanism needs a little play in it so you can rest a finger on the key without activating it.
Comparing switch types
Here’s a graph of roughly how I perceive the actuation points of the different switch types, and how they compare with how my childhood alto sax feels:
This graph comes with some caveats - actuation point isn't the only factor. As discussed with the microswitch version, actuation force is a big part of it. Several of the switch types would also have a tuneable actuation point - both capacitive types and hall effect switches in particular.
Perhaps the answer is a combination of approaches - for example conductive silicone for the finger and thumb keys, and keyboard switches or Hall effect switches for the side buttons. And that’s what I ended up with on my latest prototype!
More on this prototype when I get round to writing another blog post!