From La Mantovana to the Moldau. Musical similarity in the absence of rhythm and what it means to FolkTuneFinder

· 1780 Words

Má Vlast is a set of pieces written by the composer Smetana in the late 1800s about his homeland, Czechoslovakia. One of the pieces in the set, The Moldau (Vltava in Czech) is one of my favourite symphonies of all time ever. It could be something in my partially Czech blood, it could be the fact that I’m soppy about Romantic-period orchestral music, whatever it is, I love this piece of music and know it intimately.

The theme from it is very well known, and deeply expressive. It goes something like this:

(I’ve transposed it into G for the sake or argument)

In theory it’s quite straightforward: after a dominant up-beat, it starts on the tonic and goes up a minor scale to the dominant, hangs around at the top and then heads back down again at half speed. It employs a simple swung rhythm. As themes go, it’s not massively complex in terms of melody or rhythm. And yet is is arguable that much of this very powerful piece of music is based upon it.

The theme is repeated in different transpositions, in different modes, with variations. The subject of the piece is a river and, to my mind, the movement of the melody, and the variations of it mirror the flow of the river.

I have a habit of looking things up when I don’t know enough about them as I would like, and it was whilst looking for a nice performance of it on Spotify that I decided to look the piece up on Wikipedia.

The article claims that the theme is an adaptation of an old mediaeval melody, called La Mantovana. ‘Oh aye,’ thought I, ‘that’s a shame.’. I followed the link through, and was surprised to see a tune that I know by the name of The Italian Rant, which has come to me via a tune collector you may have heard of, Mr Playford.

I know this tune well. I have played it at sessions. In my head there was absolutely zero connection between the theme from the Moldau and the Mantovana.

Here is a simplification of the section from the piece in question:

Seeing it written down, it clicked. Of course, the melodies are identical. I have known these two pieces well for years, but it took seeing them written down, and it being pointed out to me, to recognise the similarity.

Here’s an MP3 of the me playing Moldau and La Mantovana for comparison.

Still, I think it a bit unfair to say, as it does in the Wikipedia article, that the tune is virtually based on La Mantovana. It would be musically criminal to suggest that just because two melodies can be written down and the pitches look similar, that they are the same, or copied. It’s all about feeling, how the music is written, how the rhythm places stress on which pitches, what relationship those pitches have to the tonic, what harmony is used. Phrasing is everything.

If we line up the two scores, we see they are essentially identical:

But if you’ll permit me a brief excursion into a graphical score, to indicate the phrasing and stress, as I have heard them performed:

These are quite, quite different.

~

So, it is an unforgivable mistake to cast away phrasing and rhythm (not to mention harmony) in the artistic analysis of music.

And yet I can name two parties who are guilty of this besides the author of the wikipedia article.

The first is the United States copyright law, which considers two melodies the same for the purposes of copyright if they have the same sequence of pitches. Legal cases have been fought and won on this basis, and the law holds even when the two tunes are perceptibly ‘not the same’. The argument here is, I suppose, whether one artist has stolen the substantial portion of a creative work and used it themselves. I can see the argument myself, as it pertains to legal wrangling rather than criticism and analysis of art. A full colour photograph is artistically very different to a monochrome version, but you can see the similarity if you look. No-one is saying that they are identical pieces of art, but the argument for them being broadly ‘the same’ can be made.

The second party is yours truly. When I started researching FolkTuneFinder, I did a lot of background reading on the topic of music storage and retrieval and drew my own conclusions. FolkTuneFinder treats two melodies with the same pitches but different rhythms in the same way. The only reason that FolkTuneFinder is storing melodies in its index is for the purpose of allowing people to search for and find tunes, so the aim is not to store the tunes in a precise musicological fashion, but to store them in a way that is most likely to allow them to be found with a melody search. The melody index itself isn’t something that people can browse, it is a data structure in a computer that enables search.

~

Whenever you take some data and transform it in a way that loses information, you have to consider the likelihood of collisions, that is to say, if two different pieces of information were transformed, what is the chance that the transformed values would be the same. One example would be the transformation ‘make some text lower case’. If I gave it the word ‘Sandwich’ and the word ‘sandwich’, they would both come out ‘sandwich’. This is no bad thing if that’s what you actually want to happen.

FolkTuneFinder has always used some kind of fuzzy matching, which means that almost-correct matches work: if you get a note wrong you should still find the tune you’re after, and the most similar matches get a better score. Early versions of FolkTuneFinder based this score on the length of notes. It took the position that if a note is short it is less important, and if it is long, it is more important. If you made a ‘mistake’ on a shorter note, therefore, it would be more more forgiving. Casual research over the years showed that this didn’t actually make much difference, and complicated things somewhat, so that feature was eventually removed. It really comes down to which melodies exist in the index. If there are very few clashes in the actual tune data, then the likelihood of collisions is low.

So, if FolkTuneFinder throws away rhythmical data, and the rhythm and phrasing is so crucial to the melody, isn’t that a Bad Thing?

Well no, not unless it leads to poor quality results. The only way that poor quality results could happen is if the user was thinking of a sequence of notes which makes up a tune, and they’re in a given rhythmical formation, but a ‘false match’ is found where the same notes occur in a different formation. To quantify this, we need a process which effectively takes the melody for each tune and searches the index for it to see if it matches any other similar tunes. This gives the specificity of the search term, that is to say, given a search input, how specific is it when it comes to identifying tunes: how far can it narrow them down?

If a given search term, clearly excerpted from a known tune, returns lots of tunes for which it is a reasonable match, but which the person doing the search does not want, that means the input has low specificity, it has a large number of collisions, and the search results are probably low quality.

The flip side of this is that there are lots of tunes in the index (around 200,000) and many near-duplicates. The search is ultimately a function of similarity: ‘given this input phrase, find tunes that are similar to it’. If a search for a tune turns up lots of very highly similar tunes (i.e. very slightly differing transcriptions, possibly of the same tune), having a low specificity for that search term is a good thing, not a bad thing.

(Of course, the above paragraph is totally spurious. Search engines manage to cluster results just fine. If I was paid to write FolkTuneFinder (or did it as an academic) and had expensive computing power and spare time to burn this could be achieved.)

~

I get emails from people regarding FolkTuneFinder, probably at least one every week or two over the last 3ish years, a small number of them saying ‘my search didn’t work’. Whenever this happened, I condensed the above into a sentence or two by way of reply. I also explained exactly how their search results came about. In only one or two cases over the years I have been unable to explain the results.

In the new version, I have done this automatically, adding result highlighting to explain how a search result was arrived at.

Here is an example in which I search for ‘Foxhunter’s Jig’.

After three pages of correct results such as this:

I come across a partial match (i.e. some but not all of the input was matched). If it isn’t my old friend ‘Merrily Kiss the Quaker’s Wife’. But what’s this? That tune has absolutely nothing to do with what I typed!

Well actually, if you look at the highlighted notes, it really does. Not a perfect match, but some of the notes are there. Furthermore, they’re in … the wrong rhythm! Note that this was on page 3, after at least 20 correct results.

~

This is the kind of confusion that can ruin search results, and if it does ruin them, that’s a problem. But in the last three weeks since I launched FolkTuneFinder version 4, I have received a lot of mail but not a single one about crazy incorrect matches. I think if people do have unexpected matches, if they get a satisfactory explanation from the result highlights and think ‘Oh, I was wrong’, they carry on and find the tune they were really looking for.

Of course, I have also re-written the search agorithm. It could just be that the quality of the search results has increased anyway…

So the conclusions I draw are that

  1. Rhythm and phrasing matter a huge amount on a personal artistic level, and it’s not enough for the pitches to be the same. Tunes only sound the same if they are broadly similar in rhythm as well as pitch.
  2. The US Patent Office fly in the face of this. But perhaps that’s OK.
  3. FolkTuneFinder flies in the face of this, but so long as that doesn’t cause any problems, that’s OK too.

I welcome your feedback!

Read more