Here's a little four measure phrase by Thelonious Monk, which has been a big influence on my thinking, in playing the drums. It's a little microcosm of the way you develop a melodic idea in jazz, and easy to relate to the drums since it consists of only two pitches. This happens around the 2:00 mark on Monk's solo intro to Lulu's Back In Town, from the album It's Monk's Time:
It's easy to intuitively grasp what's going on when you hear it; I've been listening to this record for years, and have never actually analyzed the line until now. But, to go ahead and break it down a little bit, with the melody written in a form we're used to seeing, on a drum staff:
A) Our starting motif is very basic.
B) Rhythmic variation, slightly syncopated.
C) More syncopated, begins before we expect it, on a weak beat.
D) Inverted and syncopated; an extension of C.
E) Same as the first variation, with a two-note ending on the phrase.
These are easy ideas to use on the fly while improvising, without a lot of thought or contrivance; while playing along, you recognize that you have just played a melodic idea, then you play it again with a rhythmic variation, and again, starting in an unexpected place. Just a simple way of developing ideas.
The line happens at 1:57: