I think the question is somewhat undefined… It’s like asking how many numbers there are… They can always get bigger, or fit more notes into one measure. There isn’t a finite number of paintings that can be made, so there probably won’t be a finite number of songs.

Yes, you’re right. But I’m limiting both the time frame (let’s say: two seconds) and the number of different notes (up to the maximum number distinguishable by your standard human in the given time frame).

For one thing, the human ear can vary a lot. Not only with rythmns, but also in pitch. The more pitches they can hear, the more options. There are huge amounts of variety in one note alone. Any combination of pitches the human ear can make out…

You still can jam in a TON of notes into two seconds that even the slowest human ear can hear.

There are insanely high numbers of ways in which you can arrange those notes, for any duration you wish.

Accidentals and key signatures make it even worse…

Though it’s a finite number, I’d equate it to counting the grains of sand on a beach.

I apologize for my ignorance, but what a timbral variations? My experience in music is somewhat limited (I’m currently in a high school theory class, and I have played trombone for quite some time), so the term was foreign to me.

Here is a very simplified example just to show how many musical possibilities there are for the first two measures of a song. Let’s assume that a 4/4 time signature is used and 16th notes are the shortest notes used (a quarter note would be the equivalent of four 16th notes strung together for the purposes of this example). Since there are 88 tones that a standard piano can produce and up to 32 notes that can be played within two measures, this calculates out to 88[sup]32[/sup], which is 1.67 x 10[sup]62[/sup], or about 167 novemdecillion possibilities. In short, it’s virually infinite. Remember that this example assumes just one instrument (a piano) with a wide range of notes that can be played, and it doesn’t even take into account multiple instruments being played. Factor in these possibilities and we’re looking at numbers that are beyond googolian proportions. Granted, many of these combinations would not even be what most of us would consider to be of any musical quality and would be just random notes.

As others have said, the permutations are endless, but…

Let’s simplify and consider only:

[ul]
[li]popular music (simple melodies, usually in 2-4 bars)[/li][li]diatonic scale (think do-re-mi with no chromatics, blues notes or key changes)[/li][li]staying in one octave, if your melody goes above or below we’ll wrap it around.[/li][/ul]

Even with these restrictions, I think that 90% of popular music melodies are still covered.

There are 32 eighth notes in 4 bars, so the number is still immense (7[sup]32[/sup]) but…

In a lot of these melodies, groupings of notes or melodic elements (sometimes called motifs) are simple rearrangements, inversions, reversed back-to-front, etc. Would these variations stand up in a court of law? Also, if my melody had 4 eighth notes repeated on do, and you wrote the same with 1 half note have you created a different melody? I don’t think so.

The “motif” thing is important. I believe all the motifs have been used up in popular music!

We tend to think of the 200-300 songs we know well, but in reality thousands of songs are written every day (think of all those amateurs out there!). I’m starting to wonder if anything can be written without repeating, at least by parts, a previous song.

Good question! I was thinking about this when George Harrison died and the “My Sweet Lord”/“He’s So Fine” fiasco was raised again.

To a certain extent, a melody is something that can be heard by the ear and understood by the brain. These mathematical permutations give us an idea of how many different ways there are to put notes in different order, but many of those permutations will be almost essentially the same – that is, they will be variations on a melody heard before, not a new melody.

A problem with doing the math with the 88 tones of the piano is that you end up with permutations that are not even, strictly speaking, variations. You’ll get the same melody plays in different keys or in different octaves, and it will be recognizable to the ear as the same melody. Even limiting the notes to a single octave, we still end up with permutations that are not new melodies. Some of the notes (if they fall at the right intervals) will sound like background harmony to the melody.

All told, I would suggest that the number of possible, recognizable melodies is smaller than these mathematical formulas would suggest. That doesn’t mean music is more limited than we realize, just that things like harmony and rhythm (as much as melody) account for a lot of the variations that we hear.