In the previous unit, we talked about networks and their representation through graphs: nodes, links, that represent the connection between the different data points, but we didn't talk about music, and how music fits in this picture. So, in this unit, I will introduce you to a way of representing musical spaces using networks. And when I talk about musical spaces, I talk about melodies, or harmonies, or rhythms, timbres, orchestrations, so the arrangements of the different instruments in a particular song, for instance, and how this can all be represented through network and giving us this view of music through the complexity of the graphs. In what follows, we'll concentrate on the Western classical music tradition, but this approach is completely general, you can apply it to any musical tradition, being Western or not, and one can see how there are some universality structures that emerge from the representation of these musical spaces through networks. The individual elements, or units, that we will use in defining these musical networks, are actually the pitches, the individual notes, that form the basis for this classical music tradition and not only classical. A pitch is a perceptual representation of a sound through its frequency and timbre. It's what we hear when we hear a note played by an instrument. In Western classical music tradition, there are 12 pitches that are defined, or that are tuned to a particular temperament that we call equal temperament. This is not very important in the following discussion but it is something that you should keep in mind. There are musical traditions where there are more than 12 pitches, for instance, where the tuning is different and it depends on the particular instrument, the particular genre, or style of music. So, with these 12 pitches, we can create all the possible melodies, all the possible harmonies and so they provide us with an enormous space that you can explore by combining them. So, in a way, one of the most famous novels by Jorge Luis Borges, The Library of Babel, he hypothesized a potentially infinite library, where each book contains all possible combinations of the 26 characters of the alphabet and so eventually, out of all these possible combinations, you might have a book that is Moby-Dick, for instance, or The Odyssey, in this infinite number of combinatorial possibilities of letters arranged in all possible ways. In a way, what I want to push is the idea that we could do the same with pitches, with the notes of our music, and basically construct all the possible spaces that connect notes with each other, or that can connect chords, so combinations of notes with each other. So, in the following, I will talk mostly about the concept of harmony space, that means all the ways I can construct vertical combinations of pitches in chords so, you now, typical chords in any song where you have a succession of chords that provide the backbone of the harmony, of the progressions of the song. And we need to start doing some mathematical abstractions, here, so as you will see in this slide, I can construct all the possible combinations of these 12 pitches in this harmonic space by basically calculating all the combinatorial possibilities excluding all pitch repetitions, all permutations within the same chord, so that I reduce this space to a minimal dimension. And if I do this, I can still combine the 12 pitches in a large number of effective chords. So in this redaction if I use 12 pitches, I can construct 4'096 chords, with different numbers of notes per chords, but if I extend this to a 24-note space, or a different temperament, a different tuning system, for different cultures, musical cultures, these combinations become enormous. So, in a 24-note space, we go higher than 16 million possible chords and if we look at the whole keyboard of a piano, as you have here in this slide, and we think about all the possible chords that we can combine notes with, then we get to an astronomically large number of 10 to the 26 different chords. So, out of all these possible combinations, what we want to do is we want to construct a geometrical model of this harmonic space. And remember that here, what we are looking for is how we can represent this harmonic space through a network representation, through nodes and links. So, in this approach here, we can see that chords as order pitches, combinations of pitches, that mathematically can be seen as vectors. So, a vector of three components is, for instance, the first chord in this slide, in the left corner, is a C Major chord, is a vector of 3 different pitches. On the other hand, since we are defining a vector space, we can associate to this vector space, a concept of metric, of distance: how far our chords are within this space, and if we can quantify the distance. And indeed we can, and it's actually relatively simple, we just generalize the Pythagoras's theorem, it's the Euclidean metric that gives us a distance between chords. By doing this, we basically define our nodes of the network, as the vectors, so the chords, and we hypothesize links between chords based on their distance. So, if I decide I want to see all the chords, and the connection between chords that are distanced, say 1, in the space of chords, then I will have a network representation that corresponds to this metric. In this slide, I am showing a very complex network of chords. This is a network that is obtained using the 24-pitch space, so it's this larger pitch space that I was talking about earlier, and I am only connecting nodes that are distanced 1 from each other in this metric space, and you see that the representation of this network becomes extremely complex, actually even artistically pleasing if you wish, and we will talk about what the different colors mean in this image in the next slides. So, in order to make things easier and kind of better follow the relationship between all these geometrical elements, let's focus on a subset of chords, of the 12-pitch space, that are the chords made of 3 pitches, the triads. And what I'm showing in this slide, are the networks that are formed building links at different distances. So, the first one on the left is the network where I am connecting triads that are distanced 1 through each other, that means that I can go from one chord to the next chord by changing only one note by a semitone. If I do a similar representation but for a distance of, say, square root of 2, like in the right top corner, then the topology of this network changes. Instead of having one single network, I have two networks that are separated, it means that the movement from one chord to another is constrained by this topology, and if I want to move by a square root of 2, in this space, I can either stay on one network or on the other. And so on and so forth, I mean, the square root of 3 is also bipartite, it's a kind of 2 different networks - one is very small, that contains chords that are very dissonant, and another one that contains all the chords that are more harmonious to our perception. So, not only do we have a representation of a space, that we can navigate as composers, for instance, choosing paths through these networks, but we also have some sort of classification of different chord categories, that emerges from these representation itself, so from the topology of this representation. So, what I'm showing you here, is some sort of map, of a space that we can navigate, and that composers navigate when they write music that is based on these particular chords. So, the classical chord progression of a rock song, for instance, might belong to one or more of these networks that I am showing you here, and this kind of spatial representation, or topological representation is very much linked to what we learned by talking with Pr. Dmitri Tymoczko about the geometry of chords, of chord spaces, in one of the previous units. Now, this is not a composition, this is just a map. So, how do we do a composition starting from this mapping? Well, the composer here becomes the agent that takes from this deterministic representation of the pitch space, the complexity of a work of art, or a piece of music, as an emergent property of these systems.