top of page

Beat Shaker

Project Vision

In much of popular music, the drumbeat – the groove - forms the floor that holds up the rest of the song. There are many tools that try to help musicians create these but their UIs do not line up well with the way musicians actually experience, express, and think about a groove. A groove is a physical, moving, thing so the best UI for creating one should involve physical movement. The BeatShaker solves this problem with an intuitive physical interface for generating percussion grooves that play through a computer or smartphone via BLE. You hold the BeatShaker in your hand and build your groove by shaking it to the beat. Funk, rock, jazz, swing; it’s all in your hand.

Design Process

In 2023, Elektor Magazine and STMicroelectronics teamed up for a design contest using the STM STM32WB5MM-DK development board. This board has several interesting features:

​

  • STM32WB5MMG (1-Mbyte Flash memory, 256-Kbyte SRAM, in Module RF package)

  • Dual-core 32‑bit (Arm® Cortex®-M4 and dedicated M0+ CPU for real-time radio layer)

  • 2.4 GHz RF transceiver supporting Bluetooth® specification V5.2, 802.15.4 with Zigbee®, Thread®, and proprietary protocols

  • 0.96-inch 128x64 OLED display

  • 128-Mbit Quad-SPI NOR Flash Memory

  • Temperature sensor

  • Accelerometer/gyroscope sensor

  • Time-of-Flight and gesture-detection sensor

  • Digital microphone

  • RGB LED

  • Infrared LED

  • 3 push-buttons (2 users and 1 reset) and 1 touch key button

  • USB user with Micro-B connector

  • On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration capability: Virtual COM port and debug port

  • Comprehensive free software libraries and examples available with the STM32CubeWB MCU Package

​

The highlighted items immediately suggested a way to make this vision a reality.

​

I then used the demonstration code for the STM32WB5MM-DK board to develop an application that read from the accelerometer to determine when a shake had occurred and then send MIDI commands using BLE to a laptop. This required adapting and incorporating pieces of demonstration code along with developing and debugging my own code.

Current Status

This project is a proof-of-concept for a hand-held musical instrument with an intuitive physical interface as a submission for the STM32 Wireless Innovation Design Contest (2023-2024). It uses the STM32WB5MM-DK board as-is and is based on a BLE-MIDI app created by STM. 

     In its current form, the ‘groove’ begins with a 4 beat per measure metronome sound that plays through a MIDI Digital Audio Workstation (DAW) like Apple’s GarageBand. Button 2 controls playback or pausing of this repeating pattern. Clicking Button 1 cycles through a choice of three classic percussion instruments (bass drum, snare drum, hi-hat cymbal). Once an instrument is selected, shaking the board up and down rapidly – as one would strike a drum - adds a hit from that instrument at that instant in the groove. In addition, the user has a choice of two modes: “tight” mode, where their hits are aligned to the nearest 16th note as an aid to beginners; and “loose” mode, where their hits are wherever they occur to allow the beats to ‘swing’. In this way, the user can build up a more complex drum rhythm beat-by-beat and instrument-by-instrument. These grooves can be played live as well as saved and edited in the DAW as part of a larger project. Finally, a rapid side-to-side shake – like erasing a whiteboard – erases the groove and restores the metronome pattern.  
     I chose to send MIDI commands over BLE rather than live audio for several reasons. First, MIDI reduced the latency and made the response to shaking smoother. Second, MIDI commands require much fewer BLE packets to be sent, reducing power consumption and reducing demands on the processors. Third, the DAW produces percussion sounds with much higher quality than the low data rate of BLE would allow. Finally, it is possible to record the MIDI commands in the DAW and then edit them and make them part of a larger project.
     This serves as a proof of concept for the timing issues with a physical interface like this. A key requirement for live addition of hits to a groove pattern is very low latency between the shake and the sound production from the DAW – a significant lag between these would make it impossible to get the rhythm right. As you can see from the video, the latency is inaudible and, therefore, it is clear that this sort of interface is not only possible but easy and fun to use.     
     There are many more advanced functions that could easily be built on this foundation. Currently, the tempo is fixed at about 120 beats per minute; it would be easy to add a “tempo mode” where the user shakes the board at the desired tempo before adding individual instruments. Currently, the volume of each hit is fixed; these could either be controlled by the intensity of the shake or adjusted using the gyroscope’s twist sensor. Other facets of the many sensors on the board (eg. tap sensors, distance sensor, microphone, etc.) could be used to add further physical intuitive controls (eg. switching beats between verse and chorus, adding other sounds, etc). These controls will be based on the physicality of generating, editing, and playing a rhythm groove.     
     The final product will be a handheld object with a physical, movement-based, interface that plays through a computer or smartphone. This simple intuitive interface will make the BeatShaker easy and fun to use for a wide range of musicians. These include: solo live musicians using it as an on-the-spot drummer who knows exactly the groove they need; solo studio musicians using it to build up a backbeat to a larger piece; music students using it to learn about percussion accompaniment; and musicians of all sorts using it to give their work a solid groove.

bottom of page