Friday, 3 February 2012

Music Box Toy with Elementary Cellular Automata

The Wolfram Demonstrations Project has just published my Music Box Toy with Elementary Cellular Automata

This demonstration uses a simple and novel mapping of elementary cellular automata (CA) to single-voice musical sequences. The mapping is created by evolving a small CA through all its possible initial conditions for a number of generations, converting the cells to decimals and storing them in a table. This table is visualized using Mathematica's built-in function ArrayPlot with starting conditions assigned vertically and generations evolving horizontally.

There are 3 experimental generative sound pieces I made for the demo. You'll have to download the demo from their website to hear them. Below are the example snapshots of the setup for each piece :

Piano piece with rule 105

Pizzicato viola piece with rule 110

Overwound Music Box piece with rule 54

This is a technique I have been using for about 10 years to make generative music with cellular automata. It is a quick and easy method of generating sequences, most often they are best approached with a bit of judicious editing after generation, but sometimes I get lucky after a lot of parameter fiddling... See noyzelab website for more info, e.g. Generative Music on the Roland MC4 MicroComposer - Cellular Automata Sequence Loops for Control Voltages page for a further example of this type of sequence generation.

Some info about Wolfram Demonstrations Project from their About Page :

Conceived by Mathematica creator and scientist Stephen Wolfram as a way to bring computational exploration to the widest possible audience, the Wolfram Demonstrations Project is an open-code resource that uses dynamic computation to illuminate concepts in science, technology, mathematics, art, finance, and a remarkable range of other fields.


Each is reviewed and edited by experts for content, clarity, presentation, quality, and reliability.


All Demonstrations run freely on any standard Windows, Mac, or Linux computer. In fact, you do not even need Mathematica. You can interact with any Demonstration using the free Wolfram CDF Player—for most platforms this happens right in your web browser. If you have Mathematica you can also experiment and modify the code yourself.


For a lot more info on the Wolfram Demonstrations Project please see their about page