In this notebook I will show you how one can generate
an actual score network, as the one that I discussed in the lecture
for Bach chorale.
And actually this is exactly the same example that I have in the lecture,
is the chorale that I had discussed there and I have represented
through a netbook. So, for working with actual
scores we need an additional library, python library,
that is called music 21, it's an amazing library for score
analysis, score generation,
musicological analysis, and all the many different functions in
this library, and in particular it allows you to import a score
from the digital format, like music.xml, for instance,
or midi. And once you have imported that, then we do this similar
procedure as the one that was done in the music data part for generating
all these musical spaces, but now we do it within a score.
So we basically build the dictionary of chords of the score and then we
build the network out of that. And so, this is in this cell,
basically you have all the steps in order to generate the score network like this
one. You can represent this network using
I mean three dimensional space here. And some of the things I talked about
in the lecture, for instance the fact that the networks are directional,
that these, that you go from one chord to another, for instance,
and not from this other chord to the original one is represented
in this graphical depiction. So all the concepts that I discussed
in the lecture can be obtained, I mean can be looked at from
this kind of representation. You can do some more sophisticated
analysis here, where you for instance isolate links that have a particular
distance or you look at the distribution of the different operations that go from,
that allow you to go from one chord to another.
That gives you representation of this harmonic space.
And in a way it's connected to the concepts that I discussed in class.
So as an exercise I would encourage you to explore more
of this music21 corpus, and maybe look at some more Bach chorales
and look at the similarities and differences between the networks
that you obtain this way.