Summer of Sound: "Jam-Box" Ergonomic Hand-Held Digital Synthesiser
The Summer of Sound Design Challenge was a perfect opportunity for me to use my amateur interest in music in an electronics context to create an original instrument designed around some of my personal requirements.
To give my entry some background, my interest in music has always revolved around the idea of improvisation and creating complex soundscapes quickly from momentary creative impulses. In order to support in this idea, I have enlisted the help of a number of effects and sample-looping devices, making it entirely possible to build highly personalised and progressive soundscapes while not requiring a backing band at your beck and call. However, my grasp of music theory is always a point of resistance when playing and jumping between a growing number of instruments, especially with how unintuitive it is to learn.
My idea for an original instrument aims to optimise the user-experience by improving ergonomics to take the pain out of music theory, allowing any level of player to directly focus on creating music. There were two pivotal aims for this project, the first was the ability to pick any musical key to play in with no cognitive overhead e.g. play in C Major or G Minor with the push of a few buttons. The second was to employ a small hand-held form-factor for maximum portability and for travel use e.g. on the train.
My design aims to utilise modern components, chip-sets and networking to create a small and fun to play 8-bit digital synthesiser that is perfect for improvising, with a hint of old-school arcade chip-tune music. The device will eventually aim to become open-source with users able to hack or program their own synthesiser programs.
Code is stored in a Git-Hub repository: https://github.com/ElectricJosh/Jam-Box
- ATMEGA328P-PU 8-bit through-hole microcontroller (131-0276)
- MCP23S17 SPI 16 bit I/O expander (823-3523)
- MCP23008 I2C 8-bit I/O expander (040-3563)
- MAX517BCPA+ I2C digital to analogue converter (622-9392)
- 28-pin DIL socket (674-2450)
- 18-pin DIL socket (674-2441)
- 8-pin DIL socket (674-2435)
- Blue back-lit 16x2 LCD Module
- PCB mounted DPDT push-to-make switches (758-2105)
- 3mm stereo jack socket (907-5680)
- USB pigtail cable-assembly (324-8362)
- Matrix board (607-7012)
- Differential pressure sensor (719-1021)
- Atmel Studio 7
- Atmel ICE debugger and programmer
- DesignSpark Mechanical
- TronXY 3D printer
- Guitar amplifier
There are three main user-selectable variables in the system that directly control the tones that can be played on the instrument’s note buttons.
- Root-note: Scales are composed of a sequence of harmonics related to a common note frequency, this is called the “root-note” and is always the first note in a musical scale note sequence which is mapped to the first note button.
- Mode: The two most common musical modes are major and minor but there are actually seven modes available to use, all of which are a sequence of seven notes with slightly differing frequency spacing in each case. All seven modes are available for mapping to the note buttons on the device.
- Relative mode: Adding a root-note offset to a mode sequence allows the user to play over one mode using another. E.g. playing over C major using A minor scale – C major’s relative minor mode. Relative modes can also be mapped to the device’s note buttons.
By using these three variables the user should be able to create and improvise over any popular music piece in any key with automated ease, which is the objective for this project.
There are other settings that the user will have access to including, oscillator selection, overtone generation, master volume, frequency and amplitude modulation which when implemented will make a compact, portable and highly capable digital synthesizer.
The circuit was designed to fit one 160mm by 100mm piece of matrix-board, using through-hole components to keep the cost down. This design choice will allow me to hold the whole instrument comfortably using two hands, with switches placed along one edge allowing easy synthesis of different tones in the user-programmed musical scale.
The functions of the device were enabled through the popular ATMEGA328P-PU microcontroller. While this is an Arduino UNO at its most bare, for performance purposes the chip was programmed through Atmel Studio and an Atmel ICE debugger and programmer, not the Arduino IDE.
The microcontroller uses its internal 16-bit counter to dynamically calculate the synthesiser sample rate asynchronously without using fixed delays, doing this massively optimises performance and tone accuracy, with a temporal-fidelity only limited by an 8Mhz internal clock which significantly cuts Nyquist aliasing harmonics in the audio range.
The microcontroller uses both SPI and I2C networking to communicate with peripheral devices, including two I/O expanders and a digital to analogue converter. The system was designed with future development in mind, as such an intuitive back-end code hierarchy was created to control peripheral devices and networks at the bottom layers while implementing major functionalities in the top layers all using C++ custom classes. Doing this allows for clean programming, debugging and modifications through the use of contextual header files.
The settings and functions of the system revolve around the use of a two-line, sixteen-character LCD display which acts as a basic HMI for the user to program the synthesiser without any guesswork. The LCD screen itself is controlled by a MCP23S17 16-bit SPI I/O expander. The placement and orientation of the LCD screen was important to make sure it can be read easily without the user needing to change their grip on the instrument.
The playable note buttons were spaced alongside the right edge of the circuit board. Using a MCP23008 8-bit I2C I/O expander made it very easy to transpose a musical scale into a single byte of data, one bit for each note button input. When received by the microcontroller, each bit can be used to synthesise the respective note in the programmed musical scale.
Three buttons were placed along the top edge of the circuit board which are used to control the synthesiser settings. The mode button toggles the programming mode which is used to select scales and synthesizer meta settings like volume with the help of the LCD screen and the up and down buttons.
Digital to Analogue Converter (DAC)
As the microcontroller does not have a dedicated analogue output (only input), a MAX517BCPA+ 8-bit I2C digital to analogue converter was used to output a direct analogue signal instead in 8-bit resolution. The signal is then decoupled and protected from any DC bias or shorting using an electrolytic decoupling capacitor. This can then be fed into an amplifier, effect-pedal or external speaker.
Differential Pressure Sensor
I also intended to implement a pressure sensor as a volume controller that would allow me to use the system like a wind instrument by blowing into the pressure pipe. Unfortunately, I ran out of time and was unable to implement this functionality.
As the unit requires a fairly low amount of power, I decided to use a direct 5v source. Using a USB cable pigtail as the power coupling added to the modern design themes nicely, while also allowing the system to easily be powered from most outlets, either statically from a phone wall adapter, computer port or remotely from a pocket power-bank.
For extra flexibility of the circuit and ergonomic aspects, a 3D printed enclosure was designed and made out of PLA plastic using DesignSpark Mechanical and Repetier-Host software packages. The box was designed into two parts for best circuit access and programming, the two halves are fixed together with four M5 screws and locking nuts. The internal buttons are perfectly accessible from the edge of the box and provide intuitive feedback to the user. Later iterations of the design will include carrying handles, a belt clip and improved ingress protection.
Basic demonstration video of the primary functions of the synthesiser. (Apologies for the poor quality, I am in desperate need of better recording equipment).