PSYC56 Music Cognition
Lecture 6 Key Finding and Interkey Distances
Models of Key Finding
Longuet-Higgens and Steedman talked about diatonic scale, one can see 3 major chords within the
diatonic set, they took the major cords and arranged them such that diatonic was in the lower left
corner on the horizontal axis and then the vertical axis. Then they noticed if they took 3 major chords
they can overlap and form a shape. One can set up a shape for majors and a shape for minors. By
doing this you can use the shape to figure out a key of a piece of music is in. they took the 7 notes and
expanded it to form a map of key space.
Then they take the boxes and make the boxes fit into the space by taking note by note of a piece of
music and take the box and fit that box into the map of key space so you can see all the possible major
and minor keys that include that note. You can fit that box to seven different major keys. You can also
fit the minor box in and produce seven different minor keys. What can one fit 14 different ways?
Now you take the second note and produce a box that has to fit the first and second note. Once you
add the third note you try to fix a box that has all 3 notes, fitting the box to have that are included in
the piece until all the keys that we have are gone except a single one. By having an E and F#, C and
F# major are eliminated because they will not fit both notes. You just keep moving that box around
and eventually it eliminates all keys except one.
This method works great as long as notes stay in the diatonic set, but there is a possibility of two
things happening. You can have where you look at every note in the piece of music and you have
more than one key that is still alive, or as you go through note by note you can get to a situation
where you have eliminated every possible key because all tones do not fit in within the diatonic set.
The latter situation is seen in slide 23.
What do we do when the algorithm comes up with more than one key, or eliminates every key? To
deal with that situation Longuet—Higgens & Steedman proposed the tonic dominant preference rule
is look at the first note and assume that that first note is the tonic of the key and if that doesn’t key
then assume it is the fifth the dominant key, if you use this rule it can help you decide you assume it is
the tonic and go back to the step and see if it is the surviving key. If there are two keys alive, say if the
first note the tonic of one of those two keys and if it isn’t than say if it is the dominant of one of those
two keys. Assume it is the tonic first and the dominant second.
Why do we need an algorithm in the first place? We can figure out what’s key it’s in by looking at key
signature if you have the music but if you do not have the music then you have what you hear.
According to LHS, this is a model of perception, taking first note and saying what are the different
keys in our head that this key could be. A second reason is you want to say let’s take a piece of music
where we don’t have a key signature. Can we have a situation where just based on the notes we can
figure out what notes it is in?
LHS found the key for the different fugue subjects every time and it did it in a reasonable number of
steps; also found they had to resort to tonic dominant preference rule. Their algorithm consistently
eliminated all potential keys or had more than one key that was possible.
There are problems of this algorithm. If you are going to go note by note it only works by melodies, it
is unclear how it will work for harmonic passages or more than one note played simultaneously.
Once you add in more than one note at a time the preference tonic dominant rule will produce
problems because there can be 2 first notes or 3 first notes. The tonic dominant preference rule is a
cheat. It is saying let’s assume the first note is the tonic and if not let’s assume it is the fifth. The algorithm works but the performance isn’t that good, you had to use the tonic dominant preference
rule quite a lot. And once you hear music you get a sense of tonality quickly so as a model of
perception it doesn’t seem as if it is capturing a real aspect of music.
There is a different key algorithm that was used, began with perceptual tonal hierarchy data and
noticed a peculiar relationship, if you look at the tonal hierarchy, it compares or has a similar pattern
as what you would find if you looked at a piece of music and added up total duration of eat of 12
notes of chromatic scale. Krumhansl looked at all tone durations in beats and looked at how often
tone G# in this piece. The open circle dashed lines are tone durations for 12 notes of chromatic piece.
And asked how well did tone duration mark onto tonal hierarchy of G major. When we map the two,
they match. That is the tonal hierarchy ratings appear to match quite strong with the total durations
for each of the 12 tones within that piece of music. This suggests that we might be able to use tonal
hierarchy values as a model of key finding.
Take a piece of music calculate the durations of 12 tones or look at frequency of occurrence, and
match tone durations with 12 major and 12 minor hierarchies and we see which one of tonal
hierarchies these durations fit. What is the best fit? And we can do this in a couple of ways, by
calculating correlation between the two, absolute difference scores, regardless you get some measure
of fit. The key that produces strongest fit for durations if the key we are in. as an algorithm it has a
number of advantages
One advantage is we can use any piece of music as input, a melody, a sequence of chords, whole
musical score from a symphony, can use anything as input and can be of any size. Can take this
algorithm and apply it to a piece of music of any size. Also, there is no arbitrary tonic dominant rule.
It is just take the tonal hierarchies and match to the tone distribution and whatever key has the
highest correlation that is the key. A final aspect is this goodness of fit might actually be a measure of
the strength of tonality. What if the tone distribution don’t match the tonal hierarchies, this would
suggests the tonality may be ambiguously and we may not perceive well what tone we are in.
How well does this algorithm perform? There were 3 different applications; first it was applied to the
first four notes of all of the Back Preludes. The first four notes are the open dashed lines and if you
match with C minor there is a strong correlation with C minor. This suggests the first four notes are
going to tell us what key we are in and we are in the key of C minor. Overall the key finding algorithm
did pretty well in 48 cases, the algorithm was able to find the key in 44 of 48 cases based on just the
four notes. It was able to unambiguously and correctly to say that is the right key. In the remaining
four cases there was another key that had a slightly higher correlation then the correct key which
also had a high correlation.
Note this is just a statistical analysis. It is not actually a model of perception. Experiment played the
first four notes and sometimes five notes. Look at all the stars, one if the prediction of key by
algorithm for preludes and the other is what key do listeners say it is, for Bach both the listeners and
the algorithm did great, the listeners were modeling the algorithm. With Chopin, there is much worst
performance, sometimes it predicts the key based on first four notes and sometimes it doesn’t, the
same pattern is given with the listeners, sometimes the listeners perceive the keys and sometimes
they don’t, the case where algorithm predict there is the key is when listeners perceive the key. The
algorithms predictions of keys match with listeners perception of keys. It says one the algorithm can
predict when listeners predict het key, and when the algorithm fails it predicts how the listeners are
going to fail. It predicts perceptions (successes) and failures.
There were subsequent applications with note by note and algorithm was able to predict key more
successfully and quickly and LHS. One of the interesting is they asked how well can this algorithm
sense the track of a change of key, modulation, where the piece starts in one key and moves to
another key and moves back to the first key, the algorithm was applied to entire Bach prelude and found that the algorithm was very much predicted the judgments of musical key based by a number
of musical theorists.
The algorithm showed 24 correlations, 12 with major and 12 with minor.
When we talk about duration we talk about how long the note is sounded for. You can also calculate
in frequency of occurrence. It works either way, and if you look at duration and frequency of
occurrence they are pretty much the same not exactly the same.
There are criticisms of this approach. One potential criticism is that this is just looking at statistics of
the music, looking at what is occurring, how long and how many times. First it is a real static sense of
the music. There is no idea of how the music is moving, it is collapsing across some period of time.
even in the application when moved through a window of the music, it is still collapsing the
information and looking at statistics. In this sense it is extremely static. And it also collapsing across
or wipes out information we would think would be important, temporal order. This suggests we can
take these tones and play in any order, but this is a problem there is no temporal order information.
The algorithm takes in no account of temporal order information. Given that it is static and doesn’t
take temporal information, it is amazing that the algorithm does as well as it does.
Brown & Butler began by noticing a property of diatonic set, if you look at diatonic set and look at
interval relations between all of the members of diatonic set there are some interesting properties. If
we count how many minor seconds between tones of diatonic set within given tonality there are two
different minor seconds in (a).
A triton is an interval of 6 semi tones, the largest interval you can get, because any interval larger
than that you can take its inverse and it will be a different interval. (f)
We have a unique number of intervals, each intervals occurs a unique number of times, and there is
only one tritone in the major set. Because the triton is unique, if we were to hear that triton, that
could tell us what key we are in because it only occurs once, if we were to hear a perfect 4 there are
6 different in a diatonic set, but there is only one triton, so that is going to uniquely tell us what key
we are in. apparently there are two different major keys that that triton belongs to. Brown and butler
said we cannot tell base on triton but we need a third note and once we hear third note we can tell
the key. According