0% found this document useful (0 votes)
55 views1 page

First Species Counterpoint Generation With VNS and Vertical Viewpoints

This document discusses using machine learning and a variable neighborhood search algorithm to automatically generate first species counterpoint music. It trains a Markov model on dyad transitions in counterpoint fragments to learn the objective function for the algorithm. The algorithm takes a cantus firmus as input and generates a counterpoint line by minimizing the cross-entropy between the generated fragment and the trained Markov model. The approach shows potential for generating music from styles without fully documented theoretical rules.

Uploaded by

Dorien Herremans
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views1 page

First Species Counterpoint Generation With VNS and Vertical Viewpoints

This document discusses using machine learning and a variable neighborhood search algorithm to automatically generate first species counterpoint music. It trains a Markov model on dyad transitions in counterpoint fragments to learn the objective function for the algorithm. The algorithm takes a cantus firmus as input and generates a counterpoint line by minimizing the cross-entropy between the generated fragment and the trained Markov model. The approach shows potential for generating music from styles without fully documented theoretical rules.

Uploaded by

Dorien Herremans
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

First species counterpoint generation with VNS and

vertical viewpoints
Dorien Herremans1
1

Kenneth Sorensen1

Darrell Conklin2

ANT/OR, University of Antwerp Operations Research Group, Antwerp, Belgium


2
Department of Computer Science and Artificial Intelligence
University of the Basque Country UPV/EHU, San Sebasti
an, Spain
and IKERBASQUE: Basque Foundation for Science, Bilbao, Spain
Preferred format: talk

Computer aided composition is a research area that


focuses on using computers to assist composers. In its
most extreme form the computer generates the entire
musical piece. This can be done by realizing that composing music canat least partiallybe regarded as
a combinatorial optimization problem, in which one or
more melodies are optimized to fit the rules of their
specific musical style. In a previous paper, a variable
neighbourhood search (VNS) algorithm was developed
that could generate first and fifth species counterpoint
fragments based on an objective function that was manually coded from music theory [5]. In this research machine learning is used to automatically generate the objective function for a VNS that generates first species
counterpoint.
When composing or generating counterpoint fragments, it is essential to consider both vertical (harmonic)
and horizontal (melodic) aspects. These two dimensions
should be linked instead of treated separately. Furthermore, in order to confront the data sparsity issue in any
corpus, abstract representations should be used instead
of surface representations. These representational issues
are handled by the vertical viewpoints method [1, 3].
A first species counterpoint fragment can be viewed
a sequence of dyads (two simultaneous pitches). Every
dyad is represented by three linked features: two pitch
intervals between the two melodic lines (previous and
next dyad), and the pitch interval within the dyad. The
dyad sequences are transformed to abstract feature sequences with the vertical viewpoint method [1] and a
first order Markov model is constructed. A total of 1000
first species fragments were used as training data for the
Markov model. They were generated by the approach
described by Herremans and S
orensen [4].
To generate counterpoint, the VNS algorithm receives
a cantus firmus as input (composed by the user or automatically [4]) and generates the corresponding counterpoint line. The quality of a counterpoint fragment is
evaluated according to the cross-entropy (average negative log probability) of the fragment computed using the
dyad transitions of the transition matrix. This forms
an objective function that should be minimized. This
minimization is done with a local search strategy. Three
different move types are defined to form the different
neighbourhoods that the algorithm uses. The first move
type swaps the place of a pair of notes (swap). The

change1 move changes the pitch of any one note to any


other allowed pitch. The last move, change2, is an extension of the previous one whereby the pitch of two sequential notes is changed simultaneously to all possible
allowed pitches. The VNS performs a tabu search in each
of the neighbourhoods. When no improving solution can
be found in any of the neighbourhoods, a perturbation
strategy allows the search to continue out of the local
optimum by changing a predefined percentage of notes
to new random pitches.
The results are very promising as the algorithm converges to a good solution within very little computing
time. The described VNS is a valid and flexible sampling
method and was successfully combined with the vertical
viewpoints method. In future research, these methods
will be applied to higher species counterpoint [5, 3] with
the multiple viewpoint method [2] whereby training will
be done on a real corpus of music.
The approach used in this research shows the possibilities of combining music generation with machine
learning and provides us with a method to generate music from styles whose rules are not documented in music
theory.
This research is supported by the project Lrn2Cre8 which is
funded by the Future and Emerging Technologies (FET) programme
within the Seventh Framework Programme for Research of the European Commission, under FET grant number 610859.

References
[1] Conklin, D. (2002). Representation and discovery of vertical
patterns in music. In Anagnostopoulou, C., Ferrand, M., and
Smaill, A., editors, Music and Artificial Intelligence: Lecture
Notes in Artificial Intelligence 2445, pages 3242. SpringerVerlag.
[2] Conklin, D. (2013). Multiple viewpoint systems for music classification. Journal of New Music Research, 42(1):1926.
[3] Conklin, D. and Bergeron, M. (2010). Discovery of contrapuntal patterns. In ISMIR 2010: 11th International Society
for Music Information Retrieval Conference, pages 201206,
Utrecht, The Netherlands.
[4] Herremans, D. and S
orensen, K. (2012). Composing first
species counterpoint musical scores with a variable neighbourhood search algorithm. Journal of mathematics and the arts,
6(4):169189.
[5] Herremans, D. and S
orensen, K. (2013). Composing fifth
species counterpoint music with a variable neighborhood search
algorithm. Expert systems with applications, 40(16):64276437.

You might also like