Composing Music with Complex Networks
Page 1
Composing Music with Complex Networks
Composing Music with Complex Networks
Xiaofan Liu, Chi K. Tse, and Michael Small
Department of Electronic and Information Engineering
The Hong Kong Polytechnic University, Kowloon, Hong Kong
{xfliu,cktse,ensmall}@eie.polyu.edu.hk
Abstract. In this paper we study the network structure in music and at-
tempt to compose music artificially. Networks are constructed with nodes
and edges corresponding to musical notes and their co-occurrences. We
analyze sample compositions from Bach, Mozart, Chopin, as well as other
types of music including Chinese pop music. We observe remarkably simi-
lar properties in all networks constructed from the selected compositions.
Power-law exponents of degree distributions, mean degrees, clustering
coefficients, mean geodesic distances, etc. are reported. With the net-
work constructed, music can be created by using a biased random walk
algorithm, which begins with a randomly chosen note and selects the
subsequent notes according to a simple set of rules that compares the
weights of the edges, weights of the nodes, and/or the degrees of nodes.
The newly created music from complex networks will be played in the
presentation.
1 Introduction
The study of complex networks in physics has aroused a lot of interest across
a multitude of application areas. A key finding is that most networks involving
man-made couplings and connection of people are naturally connected in a scale-
free manner, which means that the number of connections follows a power-law
distribution [1]. Scalefree power-law distribution is a remarkable property that
has been found across of a variety of connected communities [2]–[8] and is a key
to optimal performance of networked systems [9].
Across cultures, and between individuals, certain musical pieces are consis-
tently rated more favorably than others and the mathematical analysis of mu-
sical perception has a long history [10]. One fundamental question of interest
is whether these different music share similar properties, and the implication of
this question is whether a common process/rule exists in the human brain that
is responsible for composing music. To answer this question, our approach is
to employ a data-driven transformation to represent a musical score as a com-
plex network. In particular we analyze a few distinct types of music, including
classical music and Chinese pop. Specifically we treat a piece of music as a com-
plex network and to evaluate the properties of the resulting network, such as
degree distribution, mean degree, mean distance, clustering coefficient, etc. The
purpose is to find out if different music would display uniformity or disparity
J. Zhou (Ed.): Complex 2009, Part II, LNICST 5, pp. 2196–2205, 2009.
c
© ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering 2009
Xiaofan Liu, Chi K. Tse, and Michael Small
Department of Electronic and Information Engineering
The Hong Kong Polytechnic University, Kowloon, Hong Kong
{xfliu,cktse,ensmall}@eie.polyu.edu.hk
Abstract. In this paper we study the network structure in music and at-
tempt to compose music artificially. Networks are constructed with nodes
and edges corresponding to musical notes and their co-occurrences. We
analyze sample compositions from Bach, Mozart, Chopin, as well as other
types of music including Chinese pop music. We observe remarkably simi-
lar properties in all networks constructed from the selected compositions.
Power-law exponents of degree distributions, mean degrees, clustering
coefficients, mean geodesic distances, etc. are reported. With the net-
work constructed, music can be created by using a biased random walk
algorithm, which begins with a randomly chosen note and selects the
subsequent notes according to a simple set of rules that compares the
weights of the edges, weights of the nodes, and/or the degrees of nodes.
The newly created music from complex networks will be played in the
presentation.
1 Introduction
The study of complex networks in physics has aroused a lot of interest across
a multitude of application areas. A key finding is that most networks involving
man-made couplings and connection of people are naturally connected in a scale-
free manner, which means that the number of connections follows a power-law
distribution [1]. Scalefree power-law distribution is a remarkable property that
has been found across of a variety of connected communities [2]–[8] and is a key
to optimal performance of networked systems [9].
Across cultures, and between individuals, certain musical pieces are consis-
tently rated more favorably than others and the mathematical analysis of mu-
sical perception has a long history [10]. One fundamental question of interest
is whether these different music share similar properties, and the implication of
this question is whether a common process/rule exists in the human brain that
is responsible for composing music. To answer this question, our approach is
to employ a data-driven transformation to represent a musical score as a com-
plex network. In particular we analyze a few distinct types of music, including
classical music and Chinese pop. Specifically we treat a piece of music as a com-
plex network and to evaluate the properties of the resulting network, such as
degree distribution, mean degree, mean distance, clustering coefficient, etc. The
purpose is to find out if different music would display uniformity or disparity
J. Zhou (Ed.): Complex 2009, Part II, LNICST 5, pp. 2196–2205, 2009.
c
© ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering 2009
Page 2
Composing Music with Complex Networks 2197
in terms of network structure. Our results demonstrate, quite surprisingly, that
different music types actually share remarkably similar properties. Our final task
in this paper is to make an attempt to create “reasonably good” music from the
network that has been formed from given compositions such as those of Bach
and Mozart. We basically find that if the same network property is retained,
it is possible to compose music artificially and the remaining open problem is
the choice of a particular sample from a large number of possible compositions.
In composing a music, from a system’s viewpoint, our human brain would have
automatically performed a processing step that allows only compositions that
satisfy certain network properties to emerge and finally pick the best composi-
tion according to the composer’s subjective choice. Of course, we do not know
exactly how the brain does that. As an interim approach, some rudimentary
rules may be incorporated when selecting compositions.
2 Review of Networks
A network is usually defined as a collection of “nodes” connected by “links” or
“edges” [2]. If we consider a network of musical notes, then the nodes will be
the individual musical notes and a link between two nodes denotes that the two
musical notes are neighbors in the score. The number of links emerging from
and converging at a node is called the “degree” of that node, usually denoted
by k. So, we have an average degree for the whole network. The key concept
here is the distribution of k. This concept can be mathematically presented
in terms of probability density function. Basically, the probability of a node
having a degree k is p(k), and if we plot p(k) against k, we get a distribution
function. This distribution tells us about how this network of musical notes are
connected. Recent research has provided concrete evidence that networks with
man-made couplings and/or human connections follow power-law distributions,
i.e., log(p(k)) vs log(k) being a straight line whose gradient is the characteristic
exponent [3]–[8]. Such networks are termed scalefree networks.
3 Network Construction Based on Co-occurrence
A musical note is defined by its pitch and time value. For example, a crotchet of
the middle C is considered as a note, and a quaver of the same middle C is a dif-
ferent note. See Fig. 1. Consider an 88-key piano keyboard. If we limit each key
Fig. 1. A crochet of middle C is a note (left), and a quaver of middle C is a different
note (right). Both are considered as different nodes in a musical network.
in terms of network structure. Our results demonstrate, quite surprisingly, that
different music types actually share remarkably similar properties. Our final task
in this paper is to make an attempt to create “reasonably good” music from the
network that has been formed from given compositions such as those of Bach
and Mozart. We basically find that if the same network property is retained,
it is possible to compose music artificially and the remaining open problem is
the choice of a particular sample from a large number of possible compositions.
In composing a music, from a system’s viewpoint, our human brain would have
automatically performed a processing step that allows only compositions that
satisfy certain network properties to emerge and finally pick the best composi-
tion according to the composer’s subjective choice. Of course, we do not know
exactly how the brain does that. As an interim approach, some rudimentary
rules may be incorporated when selecting compositions.
2 Review of Networks
A network is usually defined as a collection of “nodes” connected by “links” or
“edges” [2]. If we consider a network of musical notes, then the nodes will be
the individual musical notes and a link between two nodes denotes that the two
musical notes are neighbors in the score. The number of links emerging from
and converging at a node is called the “degree” of that node, usually denoted
by k. So, we have an average degree for the whole network. The key concept
here is the distribution of k. This concept can be mathematically presented
in terms of probability density function. Basically, the probability of a node
having a degree k is p(k), and if we plot p(k) against k, we get a distribution
function. This distribution tells us about how this network of musical notes are
connected. Recent research has provided concrete evidence that networks with
man-made couplings and/or human connections follow power-law distributions,
i.e., log(p(k)) vs log(k) being a straight line whose gradient is the characteristic
exponent [3]–[8]. Such networks are termed scalefree networks.
3 Network Construction Based on Co-occurrence
A musical note is defined by its pitch and time value. For example, a crotchet of
the middle C is considered as a note, and a quaver of the same middle C is a dif-
ferent note. See Fig. 1. Consider an 88-key piano keyboard. If we limit each key
Fig. 1. A crochet of middle C is a note (left), and a quaver of middle C is a different
note (right). Both are considered as different nodes in a musical network.
Sign up today - FREE
Mendeley saves you time finding and organizing research. Learn more
- All your research in one place
- Add and import papers easily
- Access it anywhere, anytime
Start using Mendeley in seconds!
Readership Statistics
3 Readers on Mendeley
by Discipline
33% Psychology
33% Economics
by Academic Status
33% Ph.D. Student
33% Associate Professor
33% Assistant Professor
by Country
67% Netherlands
33% Canada



