A Day That Will Never Happen Again

Volume 1

A Day That Will Never Happen Again

A Day That Will Never Happen Again

A rhythm generator that changes every day.

All code and associated files available on GitHub.

How does it work?

There is a library of 123 sounds, all recorded on 15 December 2018. Each day the instrument is used, the software selects a subset of 10 of these sounds to play, and creates a number of randomised tables of data. These tables are used to organise the 10 selected sounds into a repeating loop, with various parameters controlling how they are played.
The potentiometers control the playback speed of the sequence, the length of the playback of each sample (as a percentage of the original recording), the length of the sequence, and “other”. The “other” knob controls four semi-randomised parameters at once, each of these being in turn controlled by a graph drawn from random slopes that are reset each day. The four parameters are the chance of the sound being played back at each step, the range of pitch shifting, the range of volume randomisation, and the chance of the sound being played in reverse.

This instrument uses the following hardware:

And the following software:

Raspberry Pi

This uses a Pi 3 B+, though a number of the other models would probably work just as well, namely the A+ or even the Zero. The instrument uses the built-in headphone output of the Pi for simplicity’s sake, though this is something of a compromise. Using a separate sound card or hat (such as Pisound) would improve the overall sound quality.

The Pi runs the Pure Data (PD) patches to create all the sound. It uses the “date” object from the Zexy external library to create the unique sound patterns for each day. In order to keep track of the date when no network is available, the Mini RTC module is attached to the Pi. I used this one.

Teensy LC

This is used as a USB MIDI Controller, converting the four potentiometers and the switch into MIDI values sent via USB to the Raspberry Pi. It also converts MIDI note data from the Pi to turn the LED on when the patch is ready to make noise. The code for this is included in the repo.


I use 1kΩ linear potentiometers with solder lugs, each with a .1µf capacitor for smoothing. I connect the outer two pins to 3.3v and Ground on the Teensy LC, and the middle pin to the analog input pins (14,15,16,17). The capacitor connects between the ground and middle pin of each potentiometer.


This is controlled via a MIDI message and simply lights up when the patch is ready to play.


Any type of switch is suitable. I use a latching anti-vandal button. This starts and stops the playback.


To install Pure Data using the command line on the Raspberry Pi, simply type “sudo apt-get install puredata”. This will install the latest version of Pure Data “vanilla”.
For these patches you will also need the Zexy library, which is installed with the command “sudo apt-get install pd-zexy”.

A Day That Will Never Happen Again