Hacker News new | past | comments | ask | show | jobs | submit login
Parsons code (wikipedia.org)
85 points by trampi on Dec 6, 2017 | hide | past | favorite | 22 comments

Wrote a quick perl script that implements the functionality of the wikipedia image:


Kinda reminds me of the notation scheme someone was trying to implement for DJ scratching 15 or so years ago.

I remembered when I first learned that and how mind blowing it was to help learn complex scratches. I dug it up. Turntablist Transcription Method, TTM: http://www.studioscratches.com/scratchy-100-ttm-turntablist-...

I'm very interested in music but never took a class or learned notation or theory. This appeals to me because it has always irked me that people would write down songs like Twinkle Twinkle Little Star or Happy Birthday as if they start on certain notes. They don't. They start on whatever frequency you want. The frequencies and lengths afterward are relative to the first whatever-you-want-to-call-it.

I wrote about Parsons Code a few weeks ago in my Chord Progressions dataset documentation!


There are only 81 possible Parsons Codes for a 4-chord song.

So that's the name of what I spent hours doing while trying to solve that sunken ship puzzle on The Witness.

I have been mentally trying to devise a scheme for doing this for years because I hear music as the position of the notes moving relatively. From this I dance to the relative notions but I have had difficult writing it out, this is perfect!

Cool – I sometimes used a notation like this (the visual form of this) myself to (attempt to) remember melodies I heard on the radio... before Shazam existed

I would be interested in hearing more about this technology being used in practice. Are these codes primarily "hand written" by an individual listener or are they encoded by computers?

It's typically handwritten because computers aren't very good at transcribing music. You can use it to search for music: http://www.musipedia.org/melodic_contour.html

Sure, but I'd love to be able to, say, input a midi file and get Parsons codes for all the tracks.

Oh, that would be pretty easy. MIDI's not a difficult format to parse, and I'm sure there are libraries already written that would just dump out lists of note events, or something.

It depends, MIDI files can be complicated. I don't think it's easy to programmatically isolate the melody in the general case.

Ah, yes, that's true. Finding the melody, tracing it across different instruments and such, could be difficult, and that depends on how the music is structured.

I should've said that a naive version of it would be easy (like a channel-wise, instrument-wise, or track-wise code).

Agreed, it'd be easy if the melodies are already isolated. It'd be an interesting challenge to isolate them out of a combined track!

It's probably not impossible - this guy[0] has made a midi-to-text converter, which i've been trying to use to make some simple tracks. With moderate success, but that's more my lack of practice and musical knowledge.

edit: i forgot to mention that it's a completely different format - but it shows what's needed for such a parser.


Doesn't mention time signatures, purposely ignores key, but also doesn't represent note interval. How exactly does this facilitate search?

Exactly for those reasons.

Most people can't pick out intervals by ear, but they can manage "higher" "lower" or "the same".

Think of it like a hash; it's actually important to discard specifics in order to be robust to changes in key & tempo.

Someone without rhythm and who's tone deaf could theoretically hum a song parsed through this notation and find the song they're thinking of.

Sure there's a possibility to identify a completely different song, but the more notes given, the smaller the chance to coincidentally find two different songs with the exact same ups/downs/repeats.

Time signature and key are totally irrelevant to the task of identifcation. Interval could be important, but vastly complicates the matter - identifying intervals is hard enough for many competent musicians.

There should be a babeljs converter for this.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact