Spatial Theremin
An instrument played by hand distance across a 25-speaker dome.
- Role
- Independent Project
- Timeline
- Sep–Dec 2024
- Type
-
- Physical Computing
- Sound
- Interaction
- Tools
-
- Max/MSP
- Arduino
- Reaper
- Audacity
Overview
Spatial Theremin is an instrument you play without touching it. Two ultrasonic sensors measure how far away the hand is. One reading shapes the sound. The other moves it: eight sound sources travel through a 25-speaker dome as the hand rises and falls.
- Context
- Independent project, Sep–Dec 2024. Performed on the 25.4 Loudspeaker Array in RISD’s Studio for Research in Sound and Technology.
- I made
- The sensor rig, the Max/MSP patch, the sound palette and a five-minute performance.
- Signal path
- Arduino → Max/MSP → third-order ambisonics → 25 speakers and 4 subwoofers.
The move
A theremin changes what you hear. This one changes where you hear it.
The project starts from embodied interaction and listening. The gesture doesn’t trigger a sound; it steers one through the room. Perception, interface and space have to work together for the instrument to mean anything.
The Instrument
Two HC-SR04 ultrasonic sensors sit on a breadboard, wired to an Arduino Uno. Each one sends out a pulse and times the echo off the hand. The board streams both distances to Max over USB.
Turn an echo into centimeters
Each loop fires a 10 µs trigger pulse and measures how long the echo pin stays high. Sound covers about 0.0343 cm per microsecond and travels there and back, so distance is duration × 0.0343 ÷ 2. A missing echo, or one longer than 46 ms, is thrown away and the last good reading is kept. Pulling a hand out of range freezes the instrument instead of sending garbage into the room.
const int trigPin1 = 9;
const int echoPin1 = 10;
const int trigPin2 = 5;
const int echoPin2 = 6;
float lastValidDuration1 = 0;
float lastValidDuration2 = 0;
void loop() {
digitalWrite(trigPin1, LOW);
delayMicroseconds(2);
digitalWrite(trigPin1, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin1, LOW);
duration1 = pulseIn(echoPin1, HIGH);
if (duration1 > 46000 || duration1 <= 0) {
duration1 = lastValidDuration1;
} else {
lastValidDuration1 = duration1;
}
distance1 = (duration1 * 0.0343) / 2;The Patch
The Max/MSP patch does three jobs: it reads the sensors, decides what each distance means, and places the sound in space.
Reading
A metro 33 polls the serial port about 30 times a second. sel 13 10 cuts the byte stream at each line break, and zl group, itoa and fromsymbol turn it back into a message such as Distance1: 18.89. route sends each sensor down its own column.
Mapping
Each column passes readings under 223 cm and drops the rest. A line object glides to every new value over 500 ms, so sensor jitter never reaches the speakers. From there the two readings split up. One is scaled from 0–22 cm onto the controls of a granulator, the texture of the sound. The other is cut by eight split objects into 5 cm bands: 1–5, 5.1–10, up to 40 cm. change lets a band number through only when the hand crosses into a new band.
Placing
The band number recalls one of eight stored scenes in an ambimonitor, a map of where each sound source sits. The patch moves the sources to the new scene over 500 ms (pack 0 500 0). The sources are eight channels: six from a prepared multichannel file and two from the live granulator, through a comb filter. mc.ambiencode~ 3 8 encodes them into third-order ambisonics, 16 channels that describe the whole sound field, and mc.send~ hands them to the decoder for the room.
Decisions
-
Steps, not a slide
Height is cut into eight 5 cm bands. A position in the air becomes a place the performer can find again, and the room only rearranges when the hand crosses a line.
-
Glide, never jump
Distances ease in over 500 ms, and so do scenes. A shaky reading can’t make a sound teleport or click.
-
Leaving holds still
Bad echoes are dropped on the Arduino and gated again in Max. Taking the hand away freezes the last state instead of throwing sound across the room.
Sound
I built the sound palette in a hybrid workflow, moving between a DAW and patch-based processing before committing any mapping in Max.
Sound workflow
-

Palette
Field recordings, sampled and edited in Audacity: cleaning, cutting, normalizing, filtering. -

Instability
Time-based and spectral treatments for motion and instability: time-stretching, pitch shifting, textural processing. -

Space
Spatial effects in Reaper, such as delay-based depth cues and stereo encoding, before the mappings went into Max.
Spatial effects in Reaper, with the IEM plug-ins at third order: StereoEncoder sets azimuth, elevation and width; DualDelay rotates and filters two delay lines.
Sources for the palette: pads in a sampler app and the studio’s modular synthesizer.
The live voice runs through a granulator and a comb filter inside the patch. The scaled distance plays it directly.
Performance
I performed the piece in RISD’s Studio for Research in Sound and Technology (SRST), on its 25.4 Loudspeaker Array: 25 Genelec monitors in a hemisphere around and above the audience, plus four subwoofers. Every speaker can be addressed on its own. In ambisonics the sound is described as a field rather than as speaker feeds, so the patch doesn’t care how many speakers there are: the decoder spreads the same 16 channels across all 25, and would spread them across a different room just as well.
SRST and a vector diagram of its loudspeaker array. Images: RISD Sound.