Recursivity is a standard mathematical procedure for defining objects by making reference to others which are similar, but simpler. For instance, the factorial of a number n is defined as

n!= n (n-1)!

In words, this would say, the factorial of a number n is n times the factorial of the number (n-1).

Consider a simple example, say 4!

By using the previous definition we have

4! = 4 X 3!

Now we can do this several times:

4! = 4 X 3 X 2!


4! = 4 X 3 X 2 X 1!

If we agree to define 1! as just 1, we have the usual definition of 4!:

4! = 4 X 3 X 2 X 1

The idea of extrapolating these techniques to music can be very fruitful, particularly if the focus is on the procedure, rather that the result. For instance, in the factorial example given above a number n could be assigned the meaning “write a musical fragment of length n”. Then the final result of the recursion with 5! would be a piece starting with 5 measures, then 4, 3, 2 and finally 1.

Fibonacci and other examples

One of the most often used examples of recursivity in music is the Fibonacci series. It starts with 1 and 1 as the first two elements, and then the next element is the sum of the previous two, so:

1, 1, 2, 3, 5, 8, 13, 21

would constitute the first eight members of the series.

In mathematical notation, if Fn is the n-th term of the Fibonacci series, we have:

Fn = Fn-1 + Fn-2

Straightforward modifications give rise to other series that can serve as starting points for musical compositions. We could replace the starting numbers 1 and 1 by any others; or we could start with three given numbers and construct the following as the sum of the previous three, etc.

The simplest musical application of this would be to use these figures to represent numbers of bars, going up to (say) 21 or 44; some method of musically indicating the start of each unit would assist in making them audible, if desired.

Back to index of algorithms