Take the 2-minute tour ×
Musical Practice & Performance Stack Exchange is a question and answer site for musicians, students, and enthusiasts. It's 100% free, no registration required.

For those that don't know, this is wikipedia on parson's code: http://en.wikipedia.org/wiki/Parsons_code

The Parsons code, formally named the Parsons Code for Melodic Contours, is a simple notation used to identify a piece of music through melodic motion—the motion of the pitch up and down. Denys Parsons developed this system for his 1975 book, The Directory of Tunes and Musical Themes. Representing a melody in this manner makes it easy to index or search for particular pieces.

share|improve this question
1  
You should really specify what you mean by "sound file". The format of "sound file" will dictate to what extent it will be possible to extract salient lines, which is crucial to computing parsons code. For example, MusicXML - midi - Wave file are 3 kinds of "sound file" in descending order of feasibility for extracting/computing parsons code. –  Roland Bouman Apr 10 at 2:13
    
I am no sound expert, so I may very well be wrong. I assumed that the encoding is irrelevant. –  elpadi Apr 10 at 18:36
    
@RolandBouman I would have said that of the three file types you mentioned, only the WAV is a sound file. MusicXML and MIDI don't contain waveform data, i.e. sound. For the purposes of this question, as long as the file is indeed a sound file, (Mp3, aac, aiff, etc.) the encoding is irrelevant. –  NReilingh Apr 10 at 18:54
    
If we have a sound file, the problem may be effectively impossible. If we start with MIDI or MusicXML, it's relatively easy. –  Kevin Apr 12 at 7:31

1 Answer 1

up vote 6 down vote accepted

It depends.

For most music the answer is no, since this amounts to transcribing, which is still most accurately done by humans. There exist libraries of Parson's codes for existing known themes and songs.

For a sound file that consists of a single melody line in isolation, this becomes much more practical. All there is to do is generate an FFT for each point in time, find the peak Hz value, and then write some simple AI to track the upwards and downwards movements of that Hz value over time. This is how "theme recognition" websites work that allow you to find a melody using a computer microphone--the recorded sound is processed into a Parson's code, which is then compared with a database of known codes for various themes, which are returned as results.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.