You can edit almost every page by Creating an account and confirming your email.

Musical composition network

From EverybodyWiki Bios & Wiki




A musical composition network is a network representation that describes a melody as a set of connected nodes.

Musical composition network from Bach violin sonatas.

Overview

A melody is a sequence of notes that may or may not have intervals between each pair of pitches.

As a key component of melodies, notes can be represented as a pitch and an associated duration. In this sense, a musical composition network can be constructed by considering nodes as notes and links as connections between notes chronologically subsequent[1].

Network construction

Nodes

In modern musical notation, a note summarizes the combination of a pitch and a duration. A pitch represents the fundamental frequency of the sound, and the duration indicates how much it lasts.

The standard pitch system — A440 system — states that the relation between a pitch p and a frequency f can be written as:

p=69+12log2(f440Hz)

Notes and rests can be considered the building blocks of a melody. In a musical composition network, the nodes should be designed as either:

  • A pitch and its duration
  • A rest and its duration

Thus, nodes in the network can be fully qualified by the pitch and its duration in case of notes, and only a duration in case of an interval between notes.

Links

To construct the network, links can be described as connections between two notes as they are chronologically played in the analysed piece of music[1].

Let i0, i1 and i2 be notes played at times t0, t1 and t2, chronologically ordered. We can define the links between these notes as (n0,n1) and (n1,n2).

More generally, given two subsequent notes ni and ni+1, we can determine a link lk as follows:

lk=(ni,ni+1)

Weight

The property weight of links in a musical network can be described as follows: suppose that in a piece of music, a note ni and subsequently note nj are played. We determine the weight wk of the link (ni,nj) in this scenario as being 1. Suppose now that, as the music is played, the notes ni and nj appear again in the melody — notice that a note is represented by the concatenation of its pitch and its duration, thus the same node would be seen multiple times in the same music. Now, we increment the weight wk by 1, assigning 2 to it. This process continues until the music ends, and the weight wk is considered as being the number of times that the edge (ni,nj) appears in the music.

Scale-free property

Scale-free property from Chopin's musical network.

Scale-free networks are networks where node degrees follow a power law distribution. In other words, in a scale-free network, the probability P(k) of a node having degree k can be described as:

P(k)kγ

Musical composition networks may follow a scale-free distribution with power law exponent ranging from 1 to 2[1][2].

However, not all pieces of music exhibit the scale-free property[3].

Furthermore, musical networks display the small-world phenomenon — in these networks, most nodes are not neighbors of other nodes but neighbors of a random node are likely to be neighbors between themselves.

Music generation from networks

Because many music composition networks follow a scale-free distribution and have the small-world property, it is possible to generate appealing melodies based on a controlled random walk algorithm.

The algorithm should start with a musical composition network as the input. A melody can be seen, in simple terms, as a sequence of notes. Thus, we can start from a random node and select the next one based on defined decision rules.

The algorithm should end when the current node does not have any outgoing links or when a maximum number of nodes has been reached.

The decision rules to choose the next node in the melody could be, for example, to take the neighbor whose link has the greatest weight.

A simple algorithm considering the neighbor with maximum weight is presented below:

GenerateMelodyFrom(network, maxLength):
    
    melody ← []
    currentNode ← getRandomNodeFrom(network)
    
    while (melody.length < maxLength) and (currentNode.hasOutgoingLink()), do:
        nextNode ← getMaxWeightNeighbor(currentNode)
        melody.append(nextNode)
        currentNode ← nextNode

See also

References

  1. 1.0 1.1 1.2 Liu, Xiao Fan; Tse, Chi K.; Small, Michael (January 2010). "Complex network structure of musical compositions: Algorithmic generation of appealing music". Physica A: Statistical Mechanics and Its Applications. 389 (1): 126–132. Bibcode:2010PhyA..389..126L. doi:10.1016/j.physa.2009.08.035.
  2. Ferretti, Stefano (July 2018). "On the complex network structure of musical pieces: analysis of some use cases from different music genres". Multimedia Tools and Applications. 77 (13): 16003–16029. arXiv:1709.09708. doi:10.1007/s11042-017-5175-y. ISSN 1380-7501. Unknown parameter |s2cid= ignored (help)
  3. Rolla, Vitor; Kestenberg, Juliano; Velho, Luiz (2018-02-01). "The complexity of classical music networks". EPL (Europhysics Letters). 121 (3): 38005. Bibcode:2018EL....12138005R. doi:10.1209/0295-5075/121/38005. ISSN 0295-5075.


This article "Musical composition network" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Musical composition network. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.