Stochastic Clock Divider

Stochastic Clock Divider

The newly released Cycling 74 RNBO patching environment allows for quick prototyping across desktop, single board computers, and other targets.  Standalone music electronics can be quickly prototyped using off the shelf components. This new workflow encourages rapid iteration and an efficient development process. In this example, I created a stand alone device that plays a repeated audio sample controlled by chance.


The first section of the video demonstrates the device and the second section provides an example of how I envision this device placed in a composition.

The control is limited to one “strip” of the midi controller which includes a button, fader, and knob. The knob controls clock speed, the fader controls the probability of the sample trigger, and the button doubles the clock speed.

The wood block sample is included in the patch and loaded on the raspberry pi. Audio is then output from raspberry pi via the attached audio interface. For demonstration purposes, the audio is routed back into my desktop computer through another audio interface where effects are applied and mixed with other tracks.

Ultimately, I imagine this device used in isolation from a computer with either the signal utilized dry or the patch further developed to include effects processing.


This project involves only off the shelf electronics:

While it is an option to assemble a similar device with only a raspberry pi and a few passive electronics, the midi controller enabled me to prototype without integrating a layer of sensor programming on top of the RNBO environment. More information on directly connecting potentiometers is available in the RNBO documentation: Adding Potentiometers to your Raspberry Pi with RNBO.

The U-Control works well an inexpensive ALSA compatible audio interface, albeit slightly cumbersome as an external peripheral. Other options such as HiFiBerry and PiSound can be directly mounted on top of a raspberry pi.

RNBO Media Transfer Issues

As of RNBO v1.0.2 there are known bugs in the transfer of samples to the export target. This forum discussion led me to organizing my RNBO patch as a Max Package and ultimately solved my sample dependency transfer issues.


I love the value proposition of RNBO: quickly iterate in an interactive environment and deploy your work in the world. In the past I’ve struggled to fit Max into my own workflow, but given this new utility it feels very promising.


You can find this patch here: Stochastic Clock Divider Patch.

If you have any interest in new features, format, or other questions / collaborations, please reach out.