Experiments with Automatic Music Composition

Experience Level: all

Learn how it is possible to use ancient music composition rules to automatically create music.


  • Timeslot: Sunday, 6th April 2025, 16:00-17:00, Room A
  • Tags: other

For a long time (since the 16th century) there are rule-sets for composing counterpoint music, mostly used for teaching music composition. These rules are so clearly defined that they can be checked with a computer. So it is possible to automatically generate counterpoint music searching for valid melodies. The search problem constitutes a constraint satisfaction problem [1]. Together with my daughter (she is studying music and had the idea originally) an experiment was implemented to automatically compose a two-voice counterpoint.
The talk gives a short intro into the ABC music notation and then proposes some methods to find a valid counterpoint. The search can currently use evolutionary algorithms or a depth-first search. The output is in ABC music notation, this can be converted to MIDI or into a printed music sheet in PDF.
During the talk you can listen to some examples of generated music.
The experiment (work in progress) is available on GitHub:

Dr. Ralf Schlatterbeck

see https://runtux.com/

Ralf_Schlatterbeck