Upload
saudade96
View
219
Download
0
Embed Size (px)
Citation preview
Eric Thul
COMP 560 Graph AlgorithmsMonday, November 21, 2006
Modeling Music: Graph Construction and Application
Part I: GraphTopological Construction for Melody● Peusner (2002)
Part II: Graph Construction with Application● Gueret, Monmarche, and Slimane (2004)
Part III: Conclusions
Brief Outline
What is a graphtopological construction for melody?
● Define a directed graph = ( , )G V E and M to be a sequence of music notes
● Let V be the collection of vertices where each vertex represents a musical note or rest.
● Let E be the collection of edges where a directed edge uv in E represents a transition from note or rest u to note or rest v in the melody sequence M.
● We have a graphtopological model, so distance is not measured
● We only care about whether two points are connected or not
● Geometry on a rubber sheet!
What is the construction algorithm?
● Construction Algorithm
1) Define =( , )G V E and let ,s t be in V such that s is the starting vertex and t is the end vertex. Also define the melody sequence M.
2) Add a vertex v to V for each note or rest in M, labeling each v with the note's pitch or r for rest.
3) Add a directed edge to E for each transition from note/rest u to note/rest v.
4) Collapse vertices with the same label.
5) Collapse edges with the same transition maintaining order with labels.
Construction Algorithm
1) Define =( , )G V E and let ,s t be in V such that s is the starting vertex and t is the end vertex. Also define the melody sequence M.
Melody Sequence =(M Eb, , , D D Eb, , , D D Eb, , , D D Bb)
Graph = ( , )G V E
Construction Algorithm
1) Define =( , )G V E and let ,s t be in V such that s is the starting vertex and t is the end vertex. Also define the melody sequence M.
2) Add a vertex v to V for each note or rest in M, labeling each v with the note's pitch or r for rest.
Melody Sequence =(M Eb, , , D D Eb, , , D D Eb, , , D D Bb)
Graph = ( , )G V E
Construction Algorithm
1) Define =( , )G V E and let ,s t be in V such that s is the starting vertex and t is the end vertex. Also define the melody sequence M.
2) Add a vertex v to V for each note or rest in M, labeling each v with the note's pitch or r for rest.
3) Add a directed edge to E for each transition from note/rest u to note/rest v.
Melody Sequence =(M Eb, , , D D Eb, , , D D Eb, , , D D Bb)
Graph = ( , )G V E
Construction Algorithm
1) Define =( , )G V E and let ,s t be in V such that s is the starting vertex and t is the end vertex. Also define the melody sequence M.
2) Add a vertex v to V for each note or rest in M, labeling each v with the note's pitch or r for rest.
3) Add a directed edge to E for each transition from note/rest u to note/rest v.
4) Collapse vertices with the same label.
5) Collapse edges with the same transition maintaining order with labels.
Graph = ( , )G V E
Why did we just do this construction?
● For each topological face (cycle) we can see a theme or pattern in the melody.● Also, with larger patterns we see larger cycles.● Counting vertices, edges, and faces can be used as measures for melodies.● The same graph can be used to represent different melodies by changing the note
values on each vertex.
Examples to follow...
What else can these graphs be used for?
● Graph Decomposition Procedure
1) Let H be the subgraph of G
2) Pick a vertex v
3) Let the neighborhood ( )N v be those vertices connected by outedges from v
4) Let { }v ∪ ( )N v be the vertices of H
5) Let edges connecting v to elements of ( )N v be the edges of H
6) Repeat for every vertex in V
● The result is a collection of disjoint subgraphs of G.
● There is a subgraph for each vertex of G.
Why decompose the graph?
● Operations of Graph Decompositions
● INTERSECT
● Given two subgraphs , P Q.
● Define P INTERSECT Q to return a graph which contains the common vertices and common edges between P and Q.
● This operation when performed pairwise on all vertices returns the original vertices of G (the notes in the melody)
● UNION
● Given two subgraphs , P Q. ● Define P UNION Q to return a graph where each vertex and edge is in P or Q.
● Applying this operation between subgraphs returns larger patterns in the melody.
● Applying this operation to all subgraphs returns the original graph.
What music applications use graph models?
● Applications within the field of Artificial Intelligence
● Consider melody composition.
● Graph models can be used in AI to generate melody.
● The following method uses this idea to compose music.
What is the following method?
What music applications use graph models?
● Applications within the field of Artificial Intelligence
● Consider melody composition.
● Graph models can be used in AI to generate melody.
● The following method uses this idea to compose music.
What is the following method?
● ANTS!
● Specifically, the AntMusic Project
● The collective behavior of artificial ants is used to produce a melody
How does the AntMusic project work?
● First, a graph model
● Define =( , )G V E to be a weighted digraph. Let G be fully connected.
● Each vertex v in V has the following properties
1) Pitch, simply a note
2) Duration, how long the note is played for
● Each edge e in E has the following properties
1) Positive weight value
How does the AntMusic project work?
● Second, an algorithm
● Initialization
1) Randomly choose a vertex for each ant.
2) Set the weights to a constant.
3) Set Time to zero.
● While Time < some max time
● For each ant
1) Choose the outgoing edge e of highest probability
a) Function to be defined*
2) Update the weight of the edge e
a) = + Weight Weight constant
3) Move to the vertex incident to e and play the note
4) = + Time Time 1
How does the AntMusic project work?
● Probability function each edge has a probability it will be taken by an ant
● Consider vertex i and j
● Let ( , )e i j be the edge from vertex i to j
● Let ( , )w i j be the weight on edge ( , )e i j
● Let ( , ) = / ( ( ), ( ))n i j 1 d label i label j , where ( , )d x y is how many semitones note x is from y. #C is one semitone away from C.
● Let B be a parameter which influences whether we listen more to ( , )w i j or ( , )n i j
● Let ( )N i be the neighbors of i
p i , j= w i , j∗n i , jB ∑k∈N i
w i ,k ∗n i ,k B
Can the conclusions please be brief? ...Surely
● Part I
● Graphs can be used for discovering patterns in music
● Graphs provide a visual way to generalize a melodic sequence
● The methods proposed can perhaps be used for similarity or education
● Part II● Graphs can be used in fields such as AI● They can provide the underlying structure for music generation● Still much work to be done!
[1] Christelle Gueret, Nicolas Monmarche, and Mohamed Slimane. Ants can play music. In ANTS Workshop , pages 310–317, 2004.
[2] Leonardo Peusner. A graph topological representation of melody scores. Leonardo Music Journal, 12:33–40, 2002.
[3] Marco Dorigo and Thomas Stutzle. Ant Colony Optimization. MIT Press, 2004.
[4] Jeffrey Johnson. Graph Theoretical Models of Abstract Musical Transformation. Greenwood Press, 1997.
[5] Isaac Albeniz. John Williams: The Seville Concert from the Royal Alcazar Palace [Extra Tracks] [Original Recording Remastered] “Asturias”. Sony, 2004. Sound Recording.
[6] Henry Mancini. In the Pink “Moon River”. RCA Red Seal, 1984. Sound Recording.
[7] The Rolling Stones. Singles Collection: The London Years [disc 2] “Lady Jane”. ABKCO Records, 1989. Sound Recording.
[8] Jimi Hendrix. Are You Experienced [Original Recording Remastered] “Purple Haze”. Experience Hendrix, 1997. Sound Recording.
References