locating the chorus in a MIDI song?

Mr.SpOOn mr.spoon21 at gmail.com
Wed Nov 5 00:52:47 CET 2008

On Tue, Nov 4, 2008 at 5:20 AM, Joe Strout <joe at strout.net> wrote:
> We've got a need to generate short "samples" of songs that are in MIDI
> format, to provide a preview function in a web app.  We'd like to do
> something more clever than just taking the middle 20 seconds (or whatever)
> of the song -- ideally, we'd like to find the chorus, since that's likely to
> be the most easily recognized part of the song.
> I believe this could be done fairly reliably by looking for patterns in the
> MIDI file, though I'm sure there are plenty of complications to this simple
> idea.

I think that the first thing to do is to identify patterns so that you
can divide a song in a certain number of repeated section. At least,
this should work with most of the pop music.

The search for patterns maybe based on the melody or on the chords. I
think that the search for repeated sequences of chords is simpler,
because there are less used chord-patterns than melody-patterns. And
usually a chorus has just a few chords.

Once you have divided a song you have to choose which one maybe the
chorus. I think it is very common for a song to end with the chorus,
so you could try to pick the last part.

Anyway, in for these tasks maybe useful statistical analisys and
(Hidden) Markov Chains, or Markov Models.

> 2. Anybody have an interest in music theory, as well as mad Python skills?
>  Want a paying contract job?  If so, please contact me off-list.  I'd enjoy
> pursuing this myself, but if you think you can do a better job at a
> reasonable rate, I'm happy to let you do so.

I'll contact you because I'm interested in the argument and I'm
already working on an application dealing with music theory.

More information about the Python-list mailing list