Composing first species counterpoint with a variable neighbourhood search algorithm
169 - 189
MetadataShow full item record
In this article, a variable neighbourhood search (VNS) algorithm is developed that can generate musical fragments consisting of a melody for the cantus firmus and the first species counterpoint. The objective function of the algorithm is based on a quantification of existing rules for counterpoint. The VNS algorithm developed in this article is a local search algorithm that starts from a randomly generated melody and improves it by changing one or two notes at a time. A thorough parametric analysis of the VNS reveals the significance of the algorithm's parameters on the quality of the composed fragment, as well as their optimal settings. A comparison of the VNS algorithm with a developed genetic algorithm shows that the VNS is more efficient. The VNS algorithm has been implemented in a user-friendly software environment for composition, called Optimuse. Optimuse allows a user to specify a number of characteristics such as length, key and mode. Based on this information, Optimuse 'composes' both cantus firmus and first species counterpoint. Alternatively, the user may specify a cantus firmus, and let Optimuse compose the accompanying first species counterpoint.