Home

Awesome

Table of Contents

<!-- toc --> <!-- tocstop -->

What is a haxophone

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.

Haxophone Prototype v0.5 Haxophone Prototype v0.5

Project Goals

Goals

  1. Build a travel saxophone that is fun and satisfying to play.
  2. Build an instrument with the same fingering as a saxophone so that muscle memory developed on the haxophone is directly transferrable to your main horn.
  3. Keep the cost low, below $100 USD.
  4. Easy to manufacture.
  5. Keep the design simple, sturdy and repairable to minimize maintenance cost. Using widely available and battle-tested mechanical keys from computer keyboards is one example of this principle in use.
  6. Fully hackable and customizable.

Non-Goals

  1. A haxophone is not designed to be a saxophone replacement.

How does it work?

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.

Block Diagram

The software that runs on the Raspberry Pi is:

  1. haxo-rs: This is the driver that detects key presses, breath and converts it into notes. It's written in Rust, and compiled on the Raspberry Pi into a native application.
  2. fluidsynth: This is the synthesizer software that will convert notes into sounds.

Mechanical Design

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.

renders

renders

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.

3dparts

Electrical Design

The haxophone hat is comprised of three subsystems: a keyboard, a pressure sensor and an audio amplifier.

Keyboard

The keyboard is organized as a 3x8 matrix. The diagram below shows the mapping from saxophone keys to keyboard column/row values.

matrix

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.

Audio Amplifier

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.

Pinout

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.

Tools/Stack

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.

Software

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:

Manufacturing

The circuit boards were manufactured by JLPCB, who also assembled the surface mount parts.

Bill of Materials

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.

QtyPart DescriptionManufacturerMPNSupplierEstimated cost USD (at quantity 5)
1Partially-assembled Haxo HAT PCB (small SMD parts populated)N/AN/ASeveral$15
1Differential pressure SMD sensorNXPMPXV7007DPArrow$10 Post-Covid: $24
1Set of 3D printed partsN/AN/ASeveral$4
130cm Food grade Silicon Tube ID:3mm/OD:6mmJUNZHIDAN/AAmazon$2
22Tactile-feedback 5-pin mechanical switchesCherry MXMX-BrownBanggood$11
22Keycaps For Mechanical KeyboardsMany options!$10
24-pin 0.1in Pin Header Con Right AngleSamtecTSW-102-25-T-D-RAArrow$2
24-pin 0.1in Pin Socket Con StraightTE Connectivity215309-2Arrow$2
140-pin 0.1in Pin Header ConnectorTE Connectivity2-535542-0Arrow$2
6Mounting Bracket L-shapeKeystone612Mouser$1.5
184-40 1/4 screws and nuts stainlessKeystone9900, 4694Mouser$1
4M2/7mm machine screws flat head stainlessMaster-Carr92010A003Master-Carr$0.5
37/16in aluminum spacersFascompFC1636-440-AMouser$1
1Sax Mouthpiece + ReedN/AN/AN/ABring your own (but optional)
1Neck StrapN/AN/AN/ABring your own (but optional)
1Raspberry Pi ZeroBroadcomRaspberry Pi ZeroMany$5
116 GB SD CardManyN/AMany$6
Total$73 (Pre-Covid)
Total$97 (Post-Covid)

Assembly Instructions

See Assembly Guide

TODO list

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.

License and Contributions

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.

Acknowledgements

Ben Gonzales has been a great source of inspiration and encouragement. His midi-Sax is a great project worth checking out.