daemon@BARTOK.ENG.SUN.COM (10/12/89)
Music-Research Digest Wed, 11 Oct 89 Volume 4 : Issue 61 Today's Topics: programs that can infer key/meter (3 msgs) *** Send contributions to Music-Research@uk.ac.oxford.prg *** Send administrative requests to Music-Research-Request *** Overseas users should reverse UK addresses and give gateway if necessary *** e.g. Music-Research@prg.oxford.ac.uk *** or Music-Research%prg.oxford.ac.uk@nsfnet-relay.ac.uk ---------------------------------------------------------------------- Date: 7 Oct 89 15:59:47 GMT From: "David H. Brown" <gem.mps.ohio-state.edu!uakari.primate.wisc.edu!nic.MR.NET!thor.acc.stolaf.edu!brownd@edu.> Subject: programs that can infer key/meter To: music-research@uk.ac.oxford.prg In article <125936@sun.Eng.Sun.COM> briang@sun.UUCP (Brian Gordon) writes: >In article <15170@netnews.upenn.edu> hardt@linc.cis.upenn.edu (Dan Hardt) writes: >>I'd like to know what programs exist that can >>infer the key and meter of a melody, just based >>on the pitch and duration information. >Isn't that what Finale is supposed to do? Well, yes, this is what everybody thought Finale was supposed to do. However, I've always had to tell it what key and meter I'm playing in... even in the transcription mode. Even after it's been told what key a piece is in, it will sometimes put Ab and F# in the same measure (should be G# and F#) if these chroma are not part of the key sig. After playing a piece for transcription and setting the meter, the tempo is specified by tapping on some MIDI event for each beat while the computer plays the piece back. This doesn't really feel like the program is "infering" much of anything. Even so, Finale is the best program I've ever encountered for handling complete pieces of music (as opposed to collections of short sequences) in a comnputer/MIDI environment. It's also so complex that it may well be possible to get it to infer such things as meter and key, but it probably isn't as easy as we've all been told. St. Olaf College has very little to | M M | M M M | M M | M M M | M M | do with the things I talk about! | M M | M M M | M M | M M M | M M | | M M | M M M | M M | M M M | M M | Dave Brown: brownd@thor.acc.stolaf.edu | | | | | | | | | | | | | | | | | | "I _like_ programming the DX-7!" |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_| ------------------------------ Date: Mon, 9 Oct 89 13:29 BST From: A.MARSDEN <EJHI4978@UK.AC.QUEENS-BELFAST.CENTRE.VAX1> Subject: programs that can infer key/meter To: MUSIC-RESEARCH@UK.AC.OXFORD.PRG I refer to Brian Gordon's comments in MR-DIGEST v.4 no.58 on an original item by Dan Hardt on NETNEWS, concerning programs to infer the key and metre of a melody on pitch and rhythm information alone. This has been precisely the aim of Prof. Longuet-Higgins and his co-workers at the University of Sussex (see Longuet-Higgins' book "Mental Processes: Studies in Cognitive Science", MIT Press 1987). They had a degree of success, but found that there always remained problematic cases which did not yeild to their system of inference. If an FRS can work for years on this problem, then I doubt that a commercial program has overcome all the difficulties. Yes, in many straightforward cases the key and metre of a melody can be inferred by not-too-complex means, but many interesting pieces of music are far from straightforward, and some even apparently deliberately ambiguous. It must be realised that, ultimately, inferring the key and metre of a piece of music is not a question of pattern matching, but one of cognitive modelling; it is on a par with parsing sentences. Alan Marsden <A.Marsden@uk.ac.qub.v1> Music Dept., Queen's University, Belfast ------------------------------ Date: 10 Oct 89 00:27:22 GMT From: Greg Sandell <mailrus!accuvax.nwu.edu!ferret!sandell@edu.ohio-state.cis.tut> Subject: programs that can infer key/meter To: music-research@uk.ac.oxford.prg >In article <15170@netnews.upenn.edu> hardt@linc.cis.upenn.edu (Dan Hardt) writes: >>I'd like to know what programs exist that can >>infer the key and meter of a melody, just based >>on the pitch and duration information. Does anyone >>know about programs that can do this? Now that some responses directly addressing Dan's question have come in, let me suggest an indirect method. There have been several writings on meter in music that attempt to list exactly those features which instantiate this or that time signature. This theoretical material can (and has, I think) become the basis for something more computational. In particular I am thinking about A GENERATIVE THEORY OF TONAL MUSIC by Fred Lerdahl and Ray Jackendoff (MIT Press, 1983). Lerdahl (a composer and theorist) and Jackendof (a linguist) use grouping mechanisms from Gestalt psychology theory to define musical meter. For example, given a recurring pattern of two beats and silence, where the silence is longer than the duration of time separating the onsets of the two beats, the second of the two beats tends to be heard as a strong beat, or, the first beat of a measure. If the silence is roughly twice as long as the inter-onset time, then 3/4 meter will be perceived. Of course, competing musical elements could contradict that and create a different meter, but all things being equal, 3/4 time will be heard. Of course, real music is more complicated than this simple example, but the book also describes more complicated conditions Regarding the ability to figure out the key signature of the piece, I'm sure that what you are concerned with are non-trivial examples where more than seven diatonic pitch-classes present. One method uses a rather simple statistical approach of counting the number of each instance of every pitch-class in the piece, and comparing it with a prototypical distribution for every possible major and minor key. This method grew out of the research described by Carol Krumhansl in "Perceptual Structures for Tonal Music" (MUSIC PERCEPTION 1, 1983, pp. 28-62). (The actual key-finding algorithm has never been published). To successfully match C major, for example, the count will have to show a tendency to have more C's than any other note, G's running in second place, E's third, and so on. I can't remember the exact order of the remaining nine notes, but the remainder of the 'white notes' follow before any of the 'black notes.' The actual prototypical distribution is somewhat more detailed that a simple descending distribution (e.g., the ratio of G's to C's is not identical to that of E's to G's). Despite the seemingly anti-musical approach of a statistical count, I have seen the approach work quite well, especially when the pitch classes are weighted according to their duration and amplitude. Using MIDI, I once used the algorithm to analyze the keys of real-time performance using exactly that weighting scheme (key velocity to measure amplitude), and it had pretty good accuracy. *************************************************************** * Greg Sandell, Institute for Learning Sciences, Evanston, IL * * sandell@ferret.ils.nwu.edu * *************************************************************** 'Oh Hey, Look at that: there's a fish on a hat; And we'd like to treat everyone here to a cow souvenir.' - Peter & Lou Berryman *************************************************************** * Greg Sandell, Institute for Learning Sciences, Evanston, IL * * sandell@ferret.ils.nwu.edu * *************************************************************** ------------------------------ End of Music-Research Digest