The Musical Chair

Portland, Oregon 2024-10-17

Description

The Musical Chair is an interactive instrument disguised as an office chair. Participants are able to play solo piano selections by spinning in the chair, with the playback tempo corresponding directly to their rotation speed.

The Hardware

Rotation of the chair is detected with a rotary quadrature encoder mounted to the shaft of the chair with a small custom fitting. The encoder is connected to a custom PCB from JLCPCB, with a Seeed Studio XIAO RP2040. The microcontroller reads in rotational data and sends appropriate MIDI events to a Raspberry Pi running FluidSynth, which essentially acts as a MIDI synthesizer.

The PI is connected to a small Nobsound audio amplifier and a pair of Dayton Audio speakers. The enclosure also includes a pair of Mean Well power supplies for 5V and 24V power.

The Software

The software for the Musical Chair consists of two main elements. First, an offline process written for Node.js takes MIDI files as input and converts them to a custom event sequence stored inside a C header file.

Second, Arduino code on the RP2040 reinterprets rotational data from the encoder as time advancing through the music event list. It also includes some logic to “humanize” the playback with slight variations in note timing and velocity.

Music Selection

Compositions were selected based on the right balance of cartoon whimsy and chaotic energy, with Hungarian Rhapsody No. 2 serving as the benchmark. The sheet music/MIDI files used to generate the tracks can be found at MuseScore.

Thanks

Very special thanks to Anne Fullenkamp and the Children’s Museum of Pittsburgh for commissioning the first complete version of the Musical Chair for MuseumLab.