Computers and music go hand in hand these days. Music is stored digitally and often played by electronic instruments. Computer aided composing is a relatively new research area that takes the current relationship between music and computers one step further, by letting the computer generate an original score, or at least help a human composer in doing so. In a first version, Optimuse uses a variable neigborhood search algorithm to generate cantus firmi and 1st species counterpoint music. Version 2 can compose fifth species counterpoint. With this software, any user can specify a number of characteristics, such as length, key, mode, etc or even a full melody line, and Optimuse will automatically compose a first or fifth species counterpoint voice. If no melody line is given, Optimuse will compose the cantus firmus as well. Optimuse uses a variable neighborhood search algorithm to search for music that adheres to the classical Fuxian counterpoint rules as well as possible. In a third version, an option to generate counterpoint music with composer-specific characteristics was added. The selected composers are Haydn, Beethoven and Bach. An Android application of this software is available here. The application was implemented in C++ and a plugin for MuseScore was developed.


A few short demo 1st species pieces generated by Optimuse:

An example of a generated 5th species fragment:

More information:

  • Herremans D., Sörensen K.. 2013. Composing Fifth Species Counterpoint Music With A Variable Neighborhood Search Algorithm. Expert Systems with Applications. 40
  • Herremans D., Sörensen K.. 2012. Composing first species counterpoint musical scores with a variable neighbourhood search algorithm. Journal of Mathematics and the Arts. 6:169-189.

Access the articles here.

Download code: