For a long time, fine arts have been
duplicating nature, or at least trying to imitate
her as much as possible. Yet, music seems to
be the least imitative of those arts. So, how can
it be connected to nature’s seemingly
structured randomness? Well, a certain
statistical property of the world appears to be
the connection. This property was discovered
by Richard F. Voss, an IBM physicist. His
discovery concerns the relation or
“autocorrelation” between vibrations and their
To understand this concept, we have to
consider types of random sounds. For instance,
changing the speed at which you play music on your old
phonograph naturally decreases or increases the sound’s
pitch. However, a type of sound called “scaling noise”
sounds the same no matter what speed you play it at. An
example is white noise like the random noise produced in
a resistor, or even plain static. One bit of noise is
completely unrelated to the last bit or any future bit. Its
autocorrelation factor is zero. You can write a program to
generate such random notes, but it soon becomes boring.
A more correlated noise called Brownian noise is also
random, but each bit of noise is related to the last bit and
to the next bit. To get a picture of this type of noise,
imagine a butterfly flying. Its path is apparently random,
yet it is connected, though in a wandering flight. Although
music made from Brownian noise has a high
autocorrelation factor, it still tends to be dull.
Halfway between white and Brownian noise is Voss’
discovery, or 1/f noise. If white noise is 1/f0 and Brownian
noise is 1/f2, halfway is naturally 1/f, or pretty close to it.
Basing music on this type of noise is a lot more fun and
Before I get to that, I should explain the term
“fractals.” Benoit B. Mandelbrot coined the term to
cover a class of patterns having the property that
no matter how closely you look at them, they
always look the same. He discovered that the
flooding of the Nile, variations in sunspots, and
undersea currents are based on 1/f fluctuations.
Voss said our total experience is based on 1/f
An article by Martin Gardner in Scientific
American (April 1978) contained an example
showing how to produce 1/f numbers using dice. I
took that example and programmed the KIM-1 to
do it repeatedly, and to play notes and tunes based
on the 1/f numbers. This time, I used an Arduino.
How the Program
Say we get three dice, or rather program our
computer to get them. We also make three
columns of binary numbers with each column
representing one of the dice. Since there are
three dice, we need to count in binary up to 23,
or eight. Refer to Figure 1.
To determine what row is to be thrown, we
have a sequence of eight numbers ( 3, 1, 2, 1, 3,
1, 2, 1) stored in an array called
NumColsToChangeN. Since the first number is
3, we throw all three dice. The three dice
(actually generated random numbers) are
added up; this sum points to a note on a piano
or, in our case, to a note in memory in another
The second number in the NumCols ToChangeN array
is 1, so we throw one dice in the one column. After we
throw the one dice, all three dice are added up again, and
we point to another note. The next number is 2, so two
dice are thrown and again all three are added.
This process continues until we have a pattern for the
eight rows. After row seven, the whole thing repeats. The
numbers generated are random, yet (as you can see) the
dice in column three changes occasionally, in column two
more so, and all the time in column one. Thus, we create
1/f random numbers. These random numbers are very
closely correlated due to the always changing one’s
column, and the least changing two and three columns.
Take a look at the flow chart in Figure 2.
About the Arduino
I’ve put in a lot of comments in the code (that’s
available at the article link), so it should be fairly easy to
May 2016 31
■ FIGURE 1.
■ FIGURE 2.