Introduction
The Oxford dictionary defines aesthetics as a set of principles concerned with the nature and appreciation of beauty, especially in art . Traditionally it is also a branch of philosophy concerned with the nature, expression, and perception of beauty and artistic taste [] wrote: The mathematics of beauty and the beauty of mathematics are ... inseparable.
Most research in these fields has been limited to the visual arts , such as painting [ ] .
It is useful to distinguish between algorithmic generation of music, and generation of music using electronic digital computers. The word algorithmic specifies the use of well defined rules, without necessarily implying that these rules must be implemented on an electronic digital computer. Indeed the algorithmic approach to music composition may use any other method such as rolling dice with human hands to generate rhythms and melodies, as was popular in 18th century Europe [].
The methods described above generate rhythms using complex probabilistic algorithms that involve parameters that must be tuned in order to yield good rhythms, with sufficiently high probability. Furthermore, the goodness or quality of the rhythms produced by these methods is evaluated either by mathematical measures of aesthetics such as fitness functions in simulated annealing and genetic algorithms [], or by human beings who are usually the designers of the algorithms .
In contrast to the complex and probabilistic methods outlined above, this chapter provides a description of some simple and deterministic rules that are guaranteed (within specified limits of rhythm length) to generate good musical rhythms. Furthermore, in contrast to the above methods that measure goodness by either human evaluations, or with mathematical measures of goodness, the methods described in the following consider a rhythm to be good if it belongs to the repertoire of the musical tradition of some culture in the world, is used frequently as an ostinato or timeline , and has withstood the test of time. Typical examples of good rhythms that satisfy this definition are the timelines in Sub-Saharan music [].
The most convenient and economical representation of a musical rhythm is in box notation as a sequence of binary symbols that represent sounds and silences, each of which has a duration of one unit of time. In text the simplest visualization uses the symbols x and . to denote the onset of a sound and a silent pulse (unit rest), respectively. Thus the sixteen-pulse, five-onset clave son rhythm would be represented by the sequence [x .. x .. x... x . x...]. Such a skeletal representation is eminently suited to objective mathematical and computational analyses, while at the same time, and perhaps surprisingly, encapsulates a rich enough structure to provide considerable musical insight into both the theory and practice of musical rhythm. Here several simple deterministic algorithms for generating musical rhythms are reviewed and compared in terms of their ability to capture goodness as defined above.
Maximally Even Rhythms and the Euclidean Algorithm
The most salient simple deterministic rule that generates good rhythms yields rhythms that have the property that their onsets are distributed in the rhythmic cycle as evenly as possible. In 2004 the author discovered that the ancient Greek algorithm for determining the greatest common divisor of two numbers, known as the Euclidean Algorithm [].
Fig. 1
The rhythm obtained by the Euclidean algorithm with
and
Given the two positive integers
and
, the Euclidean algorithm terminates with a remainder of 1, establishing that the numbers 16 and 5 are relatively prime . Two integers are relatively prime if there exists no integer greater than 1 that divides both. On the other hand, with
and
the remainder is 0, the arrangement of boxes forms a
rectangle yielding the regular rhythm [x... x... x... x...], a house kick drum (four-on-the-floor) pattern [].
Fig. 2
The rhythm obtained by the Euclidean algorithm with
and
Fig. 3
The rhythm obtained by the Euclidean algorithm with
and
By varying the values of n and k one may generate scores of Euclidean rhythms that are used in traditional music all over the world. The number n is generally smaller than 24 [ ] .
The Euclidean algorithm described above, based on repeated subtraction, generates rhythms that are maximally even sets []. Alternately one can snap the intersections to the next higher integer to obtain the IOI pattern 43333, a rotation of 33334. It is also possible to implement the snapping algorithm on a circular lattice. For the case of