Generative Music composition reflecting one’s heartbeat

A pulse sensor attached to one’s finger determines the piece’s tempo

BPMdemo.mp4

Final Pure Data patch

Final Pure Data patch

How it Works

I connected a pulse sensor to an Arduino and sent the pulse data to Pure Data, a visual programming environment. In this way, a heart’s bpm controls the song’s bpm

Pulse sensor to Arduino Pure Data

Pulse sensor to Arduino Pure Data

The generative component of the score comes from the random sequence of notes chosen from the pentatonic scale played every fourth beat (”metro*4”). In addition, a random number generator gives values from 0 to 99 (”random 100”) every half a beat (”metro/2”), in which half of the numbers continue a four-note pattern and the other stops it. The beat of the song continually updates to match the user’s heartbeat, and another four-note melody plays every half a beat. I also experimented with sine (”osc~”) and sawtooth (”phasor~”) waves and low pass filters (”lop~”) to change the sound characteristics of the notes. Finally, I visualised the waveforms produced by the music and heartbeat, and the notes played in the four-note patterns.

The Process

Pulse sensor to Arduino

Pulse sensor to Arduino

Randomising pentatonic scale

Randomising pentatonic scale

Layering of notes

Layering of notes

More layering

More layering

Repeating a melody

Repeating a melody

Lowering frequency of pentatonic scale

Lowering frequency of pentatonic scale

Visualising the music

Visualising the music

Adding a beat

Adding a beat

Adding accompanying melody

Adding accompanying melody

Organizing composition

Organizing composition