Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice question, I think I can answer (although you'll soon notice that my understanding of this subject is limited as well)

First of all, this is a mathematically undecidable problem, as in that there exist tunes that could be in multiple scales. The extreme example is a melody that consists of only a single note. Ridiculous, but as a fellow nerd I'm sure you can see how I could call a single note a melody. So we have to lose the phase metaphor here a little bit.

Most songs "anchor" with the last note. If you really can't tell whether a song is in major or minor (songs in major are a bit happier, jollier; songs in minor a bit sadder and more melancholic), going for the very last note (or the last note of the chorus, if the song a chorus) is a very good bet. Find the core melody of the song, the thing everything is hung up on, the last note of that core melody is the ground note of the scale. This is a really safe bet.

There are, of course, exceptions, and then I think you'll need to do some mathematical analysis to find out which key the notes in the melody match the best to. I'm not 100% sure how this is defined but I'm sure people have researched it.

All that said, musicians don't really have this problem. After all, hardly any of this stuff was designed. The only genius piece of engineering in all this was the discovery that if you choose to 12 notes in an octave (and not 8 or 15 or whatever), you have a very versatile instrument that can play almost any melody at any pitch in a way that sounds pretty good to human ears (pretty good, not perfect, because of the all the ≈'s in the "Intervals" section of Eevee's article).

But the rest was discovered, not designed, just by fooling around. The analysis came after the music.

Musicians just start with a scale and then make the music they compose fit. This comes pretty natural to you with a bit of practice; most people have a pretty decent innate ability to hear which melodies "match" with a chord and which chords "match" with a previous chord. In all honesty, once you've understood things this far, I'd recommend fooling around with the easiest instrument or tool you know, rather than diving even deeper in to the mathematics of things :-)



> The extreme example is a melody that consists of only a single note. Ridiculous, but as a fellow nerd I'm sure you can see how I could call a single note a melody.

I got your single note melody right here:

https://www.youtube.com/watch?v=PQfKFwa-jEY


I was half expecting the One Note Samba (which is sort of the pathological case for the key-finding heuristic skrebbel describes).




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

Search: