Evochord

 

     Gordon Monro

Sydney Conservatorium of Music, University of Sydney, NSW 2006, Australia.

e-mail: gordon@gommog.com.

 

 

 

Abstract

 

Evochord is an installation in which a genetic algorithm tries to evolve a harmonious chord, but is always frustrated by mutation.  Each chord has 19 notes; the pitches are not tied to any scale, but are freely variable (with a resolution of 1/900 of a semitone).  At any time one hears the most harmonious chord of the current population and sees a visual representation consisting of coloured shapes, one for each note of the chord.  The overall process is controlled by a variable mutation rate, which changes from high to low and back to high in a cycle lasting about one hour.

 

 

1.  The genetic algorithm and the fitness function

 

The measure of harmoniousness (or its inverse, dissonance) of a chord is modified from the dissonance formula given by William Sethares [1][2].  Sethares first gives a formula for the dissonance of two sine tones.  The dissonance between two complex tones is obtained by summing the dissonances between all the pairs of sinewave partials in the two tones; the dissonance of a chord of complex tones is obtained by summing the dissonances between each pair of notes in the chord.  In Evochord a single timbre was used, containing the first five harmonics of the fundamental.  For this piece I modified Sethares' formula slightly to penalise higher pitches somewhat. This generally resulted in a better spread of notes in the chords.

 

The genetic algorithm maintains a population of 100 chords, using one-point crossover in the breeding; selection is by tournaments of size two, where the less dissonant chord survives.  The mutation rate varies cyclically over a cycle length of 1000 generations, from 0.5 to 0.0001 and back again.  One generation takes four seconds, so a cycle lasts a little over an hour.  The chord does settle down to a fairly stable and harmonious chord in the middle of the cycle, but the rising mutation rate disrupts it before an optimum value can be reached.  The artistic aim of the piece is to generate “interesting” chords.

 

 

2.  What is seen and heard

 

At any time, the most harmonious chord in the current population is seen and heard.  Each note is represented by a distorted hexagon whose vertices move at a speed governed by the mutation rate; the movement is more vigorous for higher mutation rates.  The pitch of a note is represented by colour: blue for high, red for low and green for intermediate pitches.

 

 

 

 

Figure 1 - The display at a high mutation rate (left) and at a low mutation rate (right)

 

A new generation occurs every four seconds.  If the fittest chord is different in the new generation, glissandi occur over four seconds as the old chord changes to the new. The colours of the corresponding shapes likewise change over four seconds.  In the early part of a cycle there are continuous glissandi, as the high mutation rate means that the fittest chord is constantly changing.  In the middle and later parts of the cycle the fittest chord can remain the same for some time.  The dissonance formula fits well enough with actual perception so that the chords the computer rates as more consonant generally sound that way as well.  Of course each cycle is different in detail because of the random mutations.

 

The installation is intended to be primarily an artistic experience and secondarily a partial visualisation and sonification of a genetic algorithm.  There is more information about Evochord in [3].

 

 

3.  References

 

[1] Sethares, W.  “Local Consonance and the Relationship Between Timbre and Scale”, Journal of the Acoustical Society of America, Vol 94, Issue 3 (September

1993), pp. 1218-1228.

 

[2] Sethares, W.  “Some Useful Computer Programs”, http://eceserv0.ece.wisc.edu/~sethares/comprog.html

 

[3] Monro, G.  “Evochord”, Generative Arts Practice: A Creativity & Cognition Symposium, ed. Ernest Edmonds, Paul Brown and Dave Burraston, Creativity and Cognition Studio Press, University of Technology, Sydney, 2005, 140-143. [Also at http://www.gommog.com/archive/docs/evochord_paper.pdf.]