I have been studying trends in music, especially melody contour and texture, and I have found some particularly noteworthy (ahem) features about melody... nay, music in general.
Now, anyone who has taken chemistry or physics to a degree knows that a system, in nature, most always strives for entropy, or a state of little potential energy. Well, it appears that music follows this trend as well. This fact can be abused quite nicely to predict melodies in music.
I have found that most melodies (especially ones prior to the twentieth century) travel from full consonance (the first note/chord of the melody), to dissonance (the main part of the melody), back to consonance (the cadence). Most melodies start on a completely stable tone (for example, in C Major, the melody would start on C, or at least G or E) and progress through all kinds of various tones until finally reaching, you guessed it, another stable tone (C, E, or G, most likely) at a rest point, like the end of a phrase, period, or piece. However, melody is not the only thing that follows this trend; harmony plays a large role, and rhythm, just slightly less so. If you have a music theory book or resource, look up cadences, and be sure to look up rhythmic cadences. Rhythm will usually start slow, like quarter notes, then build up, before "slowing down" again at the end. Harmony, well, it is all about cadences, if not the building blocks of music.
Back to the point in hand. Besides melody, songs also follow some other rules. For example, there tends to be a climax point about 60-80 percent of the way through the song with typically higher dynamics, faster tempo, and more dramatic chord progressions. In modern songs, this point can usually be found in the chorus. In other songs, just near the end of a song just before the song quiets down a bit is usually the most convenient place to put it.
Melodies also have an interesting effect to them. Too much consonance in a melody sounds bad, and too much dissonance does too, but for completely different reasons. Intervals larger than (or sometimes equal to) a whole tone are usually more consonant to the song (keep in mind that notes can be consonant to their chords but dissonant to the song), while half tones or whole tones are usually dissonant, and sound too "concentrated" when put in large quantities together (like chromatic scales), just like too much chocolate syrup will make one sick (bad analogy, I know).
Another rule that music tends to follow is harmony rules. This is the I - IV - V thing your piano teacher drilled into your skull when you were little. The I, the tonic, the "main note," if you will, is fully consonant. The rest, even though they are harmonically consonant, are in truth slighty melodically dissonant (play them to yourself. They sound good, but they are full of energy... see below), especially the IV (an example of these chords would be C Major - F Major - G Major; the G Major is sometimes a 7th chord. See chord).
Rhythm, just to note, tends to follow similar rules to harmony and melody: small durations usually have more energy than larger ones.
This will all come full circle in time, I promise. Now, what how does this apply to entropy? Consider consonance to be the point of least potential energy - entropy. Now, consider dissonance to be full of potential energy. Whether this solidifies music as a science is yet to be seen, but still.
Now, to continue the analogy, the point of climax is the highest point of potential energy, and different points can have differing amounts of potential energy depending on melody, harmony, rhythm, texture, and timbre (in that order).
While no equations will be derived from this any time soon, it is still, IMHO, quite interesting. If anyone would like to fix my logic, please /msg me and I will be sure to add any comments.
And by the way, I was looking at what kind of music people listened to at different points in time, and I finally think I know why most songs in the early- to mid- 1900's were in major keys, and songs made recently are mostly in minor (just look at rock, metal, techno, and about one half to one third of the pop songs made now). World war I and II dominated the early 1900's, and people longed for a happier time, hence the major key. Now, during a time of peace (higher potential energy, maybe? Or less?), we are in a time of happiness and perhaps look for the more serious side of life. Just my two cents.
And yes, I realise I am partially going by the cliches non-musicians use to categorize major and minor keys. Yet, I am tempted to say they are partially true.