As with lyrical styles, the lines separating different melodic styles have blurred considerably in the last 50 years. These days, it's not uncommon to hear Dolly Parton covering Collective Soul, Dave Matthews doing a tune made popular by Johnny Cash, or Johnny Cash singing a song by U2 or Soundgarden. While different genres are sometimes known for particular melodic elements, these elements can be used effectively to flavor most other styles of music.
Another way to look at melody writing might be to ask yourself, “What elements do great songs from all these styles have in common?” You'll find that most great songs have a melody that works with the lyric, either to magnify, add to, emphasize, modify, or in some cases, purposefully contradict the words.
Melody affects the listener on a subconscious level. An effective melody is memorable, hummable, and elicits a gut-level, emotional response. A melody must move the listener in one of two ways, emotionally or physically. If you can make listeners laugh, cry, or smile, it's a good sign. If you can make them dance, you're on to something. If you can do both, you will be smiling as you dance into the bank.
One of the cheapest and easiest ways to study the rhythmic components of different melodic styles is by tapping out familiar melodies with a pencil. Using the eraser end, tap the melody on a pad of paper. After a while, you can see where the stresses are by where you tap harder.
Pop is more of a treatment given to other genres than a true style unto itself. Almost any kind of song can be a pop song if it's successful enough. Frank Sinatra, Madonna, Gloria Estefan, and Prince can all be considered pop artists. Pop melodies draw from most other styles of music: Sinatra's brand of pop was influenced by jazz and swing, Madonna's by club and world music, Estefan's by Latin and disco, and Prince's by rock, R&B, and soul.
The trick to using other genres as influences in pop melody writing is to distill them down to their basic elements, define what makes those elements likeable to the general listening audience, and then craft a simple catchy melody from them.
Rock and Alt
Rock has subdivided into dozens of micro-genres. From a basic viewpoint, rock melody is about power and rhythm, like the blues and R&B music that influenced early rock-n-roll. To give a rock melody full impact, pay close attention to its rhythms. A rock or alt melody should be rhythmically catchy with a high degree of symmetry in the meter. If a line has extra syllables that break the flow of the intended meter, consider rewriting the line to match the meter or finding a rhythmic pattern that has a close mathematical relationship to the original meter.
The Melodies of Country
Country's traditional melodic roots are in Appalachian folk, Southern gospel, cowboy songs, and the blues. Over the years, influences including rock-n-roll, modern folk, and even some jazz have made themselves a place in Nashville. Alt-tinged melodies and hip-hop groove and meter have taken country in some exciting new directions lately. On the other side of the coin, a strong resurgence in bluegrass and the rise of the Americana and roots movements have shown that country's traditional roots aren't tapped out yet.
The use of syncopation, unusual intervals, exotic modes and scales, and notes outside the scale are common in jazz. With jazz, melody often reigns supreme. A good rule of thumb for jazz composition is to write a melody line that will sound equally as good in an instrumental version as it will with a vocal rendition.
While some purists insist that rap has no discernible melody, pitch variations are just as important to rap music as to many other genres. The hallmark of a rap “melody” is that the pitches change, usually up but occasionally down, with the stresses of the meter. These modulations are as closely related to pitch variations common in speaking as to those used in traditional melodic composition.
Hip-hop combines melodic elements of soul, rap, R&B, rock, jazz, funk, and may also have ska, dub, and reggae influences. It's common for hip-hop songs to switch back and forth between singing and rapping.