A haxophone is an electronic musical instrument that resembles a saxophone. It is designed to be an inexpensive and fully customizable travel saxophone. You will never get the same expressiveness or depth of sound of a real saxophone. But with a haxophone you should be able to play alone or with friends wherever you might be. The mechanical keys and unique ergonomics give it a different kind of satisfying feel.
https://user-images.githubusercontent.com/676181/133919454-f654cb48-cca9-4b6e-bcb5-27de6ea2deb8.mp4
The design is fully open, software and hardware. This means that you can make it your own, from changing the type of key switches to making your own note and instrument mappings.
The haxophone is designed as a HAT (Hardware Attached on Top) for the Raspberry Pi family of single-board computers.
The haxophone HAT is a special type of keyboard laid out in the same way as saxophones are. It also includes a mouthpiece and a pressure sensor to detect breath intensity. The HAT also includes an audio amplifier so it does not rely on the amplifier that is built into the Raspberry Pi 3 and Raspberry Pi 4. Because of that, the HAT will also work with the least expensive of the Pi's, the Raspberry Pi Zero.
The software that runs on the Raspberry Pi is:
In order to keep costs down, the HAT PCB (printed circuit board) is an integral part of the physical structure of the Haxophone. This means that key switches, thumb rests, mouthpiece and the Raspberry Pi are all attached directly to the PCB. The side keys (left palm and right knuckle keys) are mounted on smaller PCBs and attached to the main PCB via right angle metal brackets. This smaller PCBs are detachable pannels from the design. This brings down the manufacturing cost.
For improved ergonomics, a few parts are designed to be 3D printed. These are the mouthpiece neck, the left thumb rest, and the right thumb rest, that also incorporates a strap hook. The source 3D models for those parts are included in the repository.
The haxophone hat is comprised of three subsystems: a keyboard, a pressure sensor and an audio amplifier.
The keyboard is organized as a 3x8 matrix. The diagram below shows the mapping from saxophone keys to keyboard column/row values.
Note that due to PCB size constraints, a design decision was made to not include a high F# key. This key is not present in all saxophones, as that note can be played using alternate fingerings with other keys. The most common mappings of the high F# are already configured on the haxophone. If you are used to a less common configuration, the software is easy to extend.
Also note that at the moment the matrix is not completely used: keys (col 0, row 7) and (col 2, row 3) are unused.
The haxophone HAT includes an audio amplifier and a 3.5mm mini-jack. This allows connecting the haxophone to headphones or to an external amplifier.
The diagram below shows how the HAT connects to the Raspberry Pi. The keyboard matrix uses discrete GPIOs, the pressure sensor uses I2C and the audio amplifier, I2S.
You can refer to the diagram below from Raspberry Pi Spy if you need to locate those pins on the Raspberry Pi header.
The circuit board is designed with awesome Kicad.
All 3D models are designed with Freecad, the open source 3D parametric modeler.
The code is written in Rust just for the pleasure and reliability of it.
See haxo-rs for details about the software that runs on all Raspberry Pis.
Alternatively, you can explore haxo-ino, a port of haxo-rs
for RP2040 boards. When using this board the audio port of the Haxophone will be disabled and notes will only be sent out as MIDI. However, if your intent is to use the Haxophone exclusively as a MIDI Controller, this approach has some advantages:
haxo-ino
boots in less than 2s, which is way faster, than haxo-rs
, even on the fastest Pi.The circuit boards were manufactured by JLPCB, who also assembled the surface mount parts.
The table below shows the main parts required to build a full Haxophone. Prices are rough estimates based on purchases made for prototypes. Shipping costs or taxes not included.
Qty | Part Description | Manufacturer | MPN | Supplier | Estimated cost USD (at quantity 5) |
---|---|---|---|---|---|
1 | Partially-assembled Haxo HAT PCB (small SMD parts populated) | N/A | N/A | Several | $15 |
1 | Differential pressure SMD sensor | NXP | MPXV7007DP | Arrow | ~$10~ Post-Covid: $24 |
1 | Set of 3D printed parts | N/A | N/A | Several | $4 |
1 | 30cm Food grade Silicon Tube ID:3mm/OD:6mm | JUNZHIDA | N/A | Amazon | $2 |
22 | Tactile-feedback 5-pin mechanical switches | Cherry MX | MX-Brown | Banggood | $11 |
22 | Keycaps For Mechanical Keyboards | Many options! | $10 | ||
2 | 4-pin 0.1in Pin Header Con Right Angle | Samtec | TSW-102-25-T-D-RA | Arrow | $2 |
2 | 4-pin 0.1in Pin Socket Con Straight | TE Connectivity | 215309-2 | Arrow | $2 |
1 | 40-pin 0.1in Pin Header Connector | TE Connectivity | 2-535542-0 | Arrow | $2 |
6 | Mounting Bracket L-shape | Keystone | 612 | Mouser | $1.5 |
18 | 4-40 1/4 screws and nuts stainless | Keystone | 9900, 4694 | Mouser | $1 |
4 | M2/7mm machine screws flat head stainless | Master-Carr | 92010A003 | Master-Carr | $0.5 |
3 | 7/16in aluminum spacers | Fascomp | FC1636-440-A | Mouser | $1 |
1 | Sax Mouthpiece + Reed | N/A | N/A | N/A | Bring your own (but optional) |
1 | Neck Strap | N/A | N/A | N/A | Bring your own (but optional) |
1 | Raspberry Pi Zero | Broadcom | Raspberry Pi Zero | Many | $5 |
1 | 16 GB SD Card | Many | N/A | Many | $6 |
~Total~ | ~$73~ (Pre-Covid) | ||||
Total | $97 (Post-Covid) |
See Assembly Guide
If you would like to help claim one of the open issues or create a new one for yourself. If you prefer to stay in software land, head out to the software issues.
See License. We'll gladly accept contributions via Pull Requests. Contributions are accepted under the same License of the project, as captured in github's terms of service.
If you plan to contribute a major feature or improvement, consider posting your proposed design as an issue before implementing it.
Ben Gonzales has been a great source of inspiration and encouragement. His midi-Sax is a great project worth checking out.