Barry Altschul, in which he discusses the drummer's relation to tunes, form, and melody, and playing melodically:
It is [...] the drummer's responsibility to know where the chord changes fall in the tune, and the song form. Knowing the names of the chords isn't necessary, but you should know where the chords change, and when a chorus is over.
Drums are a musical instrument and melody can be implied. Many drummers seem to get lost within a tune. If this happens to you, you should be able to find yourself by listening to the bass player. But, in order to know where he is, you must be familiar with the tune yourself.
Short of studying a melodic instrument, there are ways to achieve this familiarity. First, you must listen! Listen to tunes, sing them, learn the chord changes. Listen to saxophone, piano, and trumpet players. Learn to improvise around the melody of the tune by singing or whistling. Hear the chord changes while you're improvising.
A good method for accomplishing this, and one that will also help your conception and technique, is to learn a saxophone solo. Take a Lester Young solo, for example. Sing the solo away from the record. (The actual notes are not as important for the drummer as is the contour and the rhythms of the solo.) Tap the solo out on the snare drum. Then play it as if you are accompanying a band, with your right hand playing steady time, two and four on the hi-hat, and the solo between your left hand and bass drum! Interpret the sax solo as if it were a drum solo. You'll soon start to develop a melodic approach. You'll also become familiar with tunes and forms, and become aware of what the melodic instrumentalists are actually doing.
To imply melody, sit down at the drum set and make one sound. Then make another sound. Don't be afraid to be unconventional in your approach to making that sound or in the sound itself. Any sound imaginable can be used if it's used in a musical way. Do this again and again until you have explored all the sounds your set will give you. Concentrate on doing the same thing on each part of your set. A cymbal, then your snare drum, another cymbal, your bass drum. Even your stands and whatever else you use! If you want more sounds, use percussion instruments.
After you've found your sounds, utilize them when you are playing the saxophone solo we talked about earlier. Play the contour of the sax solo with your sounds to imply the melody. The only “notes” a drummer has are the high, low and middle pitched sounds. These must be related to in a melodic way with a drummer's own conception. Once this is achieved, melody can be implied. Melodies are also rhythmic, so to play in a melodic way, think that way!