Re: locating the chorus in a MIDI song?
On Nov 3, 10:20 pm, Joe Strout [EMAIL PROTECTED] 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. Hi Joe, nice to hear from you from earlier discussion. Would it be applicable to mark one chorus by hand, and the program finds all the others? -- http://mail.python.org/mailman/listinfo/python-list
Re: locating the chorus in a MIDI song?
2008/11/4 Banibrata Dutta [EMAIL PROTECTED]: Without pretending to be an expert on the subject of music-theory or audio-processing, my n00b'ish doubt is -- MIDI, unlike MP3 would be devoid of voice... and in my overtly simplistic thinking -- presence / absence of which (i.e. voice) could be a brute-force way of detecting refrain/chorus I think you're right. After all, The melody of the verse repeats between verses, so without the words repetition is no longer a good indicator of the chorus, and a shift in style is as likely (maybe more likely) to find the bridge than find a chorus.. By the way, some of the papers referenced seem confused between refrains (which form part of the verses) and choruses (which are separate musical units). -- Tim Rowe -- http://mail.python.org/mailman/listinfo/python-list
Re: locating the chorus in a MIDI song?
Without pretending to be an expert on the subject of music-theory or audio-processing, my n00b'ish doubt is -- MIDI, unlike MP3 would be devoid of voice... and in my overtly simplistic thinking -- presence / absence of which (i.e. voice) could be a brute-force way of detecting refrain/chorus ... unless a lot of grammar (i.e. semantic constraints) of music-theory are enforced, and I am afraid such a grammer could only be made for a small subset of a particular genre at best. IMHO, some heuristics could be used to train a statistical model, to identify refrain sections, s.a. a Bayesian model. You use some heuristic parameters to detect refrain, and then use a large corpus of human responses to validate the identification, there by tuning the model. On Tue, Nov 4, 2008 at 3:11 PM, alex23 [EMAIL PROTECTED] wrote: On Nov 4, 2:20 pm, Joe Strout [EMAIL PROTECTED] 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. My first thought is that would be incredibly difficult, but a quick google search pulled up a couple of papers: Music Scene Description Project: Toward Audio-based Real-time Music Understanding http://ismir2003.ismir.net/papers/Goto.PDF The RefraiD (Refrain Detecting Method) detects sections being repeated and identifies the chorus (refrain) sections of songs in popular-music CDs. Most previous methods detected as a chorus a repeated section of a given length (Logan and Chu, 2000; Cooper and Foote, 2002) and had difficulty identifying both ends of a chorus section and dealing with modulations (key changes) (Peeters et al., 2002; Dannenberg and Hu, 2002). By analyzing relation- ships between various repeated sections, RefraiD can de- tect all the chorus sections in a song and identify both ends of each section. It can also detect modulated chorus sections by introducing a similarity measure that enables modulated repetition to be judged correctly. The paper doesn't go into much detail beyond that, but does refer to more that do. A chorus-section detecting method for musical audio signals http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?tp=arnumber=120isnumber=26996 By the same authors, I believe. Although they're talking about audio, I would expect the technique used could be readily applied to midi as well (probably more easily, in fact). Note that: Experimental results with a popular-music database show that this method detects the correct chorus sections in 80 of 100 songs. So it's going to be wrong 1 in 5 times, if that's an influencing factor in trying to do this programmatically. How many MIDI files are you talking about here? Could it be easier to just manually mark the chorus for each? 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. Give me a few days to see what my upcoming schedule is like and I may get back to you on this. I have a friend who has worked on computationally generating emotional expression with MIDI just recently, I'll pass this on to him as well. Is Python a strict requirement for this? -- http://mail.python.org/mailman/listinfo/python-list -- regards, Banibrata http://www.linkedin.com/in/bdutta http://octapod.wordpress.com -- http://mail.python.org/mailman/listinfo/python-list
Re: locating the chorus in a MIDI song?
On Nov 4, 2:20 pm, Joe Strout [EMAIL PROTECTED] 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. My first thought is that would be incredibly difficult, but a quick google search pulled up a couple of papers: Music Scene Description Project: Toward Audio-based Real-time Music Understanding http://ismir2003.ismir.net/papers/Goto.PDF The RefraiD (Refrain Detecting Method) detects sections being repeated and identifies the chorus (refrain) sections of songs in popular-music CDs. Most previous methods detected as a chorus a repeated section of a given length (Logan and Chu, 2000; Cooper and Foote, 2002) and had difficulty identifying both ends of a chorus section and dealing with modulations (key changes) (Peeters et al., 2002; Dannenberg and Hu, 2002). By analyzing relation- ships between various repeated sections, RefraiD can de- tect all the chorus sections in a song and identify both ends of each section. It can also detect modulated chorus sections by introducing a similarity measure that enables modulated repetition to be judged correctly. The paper doesn't go into much detail beyond that, but does refer to more that do. A chorus-section detecting method for musical audio signals http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?tp=arnumber=120isnumber=26996 By the same authors, I believe. Although they're talking about audio, I would expect the technique used could be readily applied to midi as well (probably more easily, in fact). Note that: Experimental results with a popular-music database show that this method detects the correct chorus sections in 80 of 100 songs. So it's going to be wrong 1 in 5 times, if that's an influencing factor in trying to do this programmatically. How many MIDI files are you talking about here? Could it be easier to just manually mark the chorus for each? 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. Give me a few days to see what my upcoming schedule is like and I may get back to you on this. I have a friend who has worked on computationally generating emotional expression with MIDI just recently, I'll pass this on to him as well. Is Python a strict requirement for this? -- http://mail.python.org/mailman/listinfo/python-list
Re: locating the chorus in a MIDI song?
On Tue, Nov 4, 2008 at 5:20 AM, Joe Strout [EMAIL PROTECTED] 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. -- http://mail.python.org/mailman/listinfo/python-list