One analogy I like to offer new composers is that writing music is a lot like performing music – it takes a lot of practice to get good at it. Learning to play an instrument well requires practicing exercises that aren’t really meant to be performed, but are designed to help us develop certain skills. Composers sometimes forget that we can do the same – develop our abilities by composing music that isn’t intended to ever be performed.
One way I like to stretch myself as a composer is to pick a particular musical element and sketch out some short compositions that only focus on that one idea. Today I’m going to practice my melodic writing and explain a bit my thought process so that other composers can take the basic idea of this exercise and alter it to fit their own needs and style.
The basic idea (influenced by Hal Crook’s approach to teaching and practicing improvisation) is to force yourself to compose in a box and not worry about any other elements other than the one specific thing you’re working on. For today’s exercise I’m going to explore the following melodic cell only.

The first thing I’m going to do is simply play those pitches in that order slowly and notice the shape and patterns the pitches make. For example, it starts with a small descending interval followed by a large ascending leap that returns back to the previous pitch. Other than the first interval, every other one is a leap. The melodic cell starts and ends on an Ab, and those are the only two times we hear that pitch. There are two Gs and two Es, but only one C.
Now take a look at different ways you might organize these pitches into groups. We could think of it as a group of three pitches followed by a group of four.

Or it could be grouped with the first four pitches followed by a group of three.

It could also be split up into more than two combinations or not at all, but you get the idea. Just take some time to think a little bit about different ways you could organize these pitches.
Up to this point, I’ve been using those pitches in that exact same order, but now I’m going to think about how I might organize these pitches into a different order and see what they sound like. The first thing that always leaps to my mind when I do this exercise is to try the melodic cell backwards.

After playing the cell in retrograde for a bit and also just going backwards and forwards into at various parts I’m starting to feel that this cell has a particular mood and it’s time to try to organize it. Just for the sake of the exercise, I want to remove all harmonic and even rhythmic elements from the melody for a bit.

I’ve started to alter the melodic cell just a bit now. I’m still using the exact same pitches, but I’ve reordered them. I’ve also changed around the number of times each pitch is heard, but I’ve maintained starting and ending the cell on the same pitch.
By now you get the basic idea behind this first part of the exercise. In addition to reordering the pitches you can also explore inverting the intervals or just changing a pitch by an octave. Each subtle change you make to a melodic cell will slightly change the mood and sound. The idea is to force yourself to explore many different combinations without trying to worry just yet about putting it into any context other than an order of pitches.
As you play around with a melodic cell like this, you might find yourself wanting to add additional pitches or start to add a melody or harmony underneath it. This is ultimately where you want to go, but make yourself try out many different variations on the cell before you start to flesh out anything. After you’ve worked on five or ten ideas (or spent a particular amount of time, however you want to structure your time), go ahead and pick the one that speaks to you most at this time and see if you can turn it into a melody.
At this point it’s time to start putting your melodic cell into a rhythmic organization, but for the sake of the exercise I would still recommend you try to avoid too much harmonic composing at this time. Write this melody with the idea that it should be interesting on its own, unaccompanied.
Most of the ideas I played with ended up as jazz melodies, like the below bebop-like line.

Notice that I’m still just using the exact same pitches from the original cell on purpose. By restricting yourself in this way you are forced to find ways to make your melody as interesting as possible without choosing a wide variety of pitches. In the above example I tried to generate interest with a surprising melodic shape (overall it descends before ascending quite high, descends, and finishes with a sudden large ascending interval) and some unpredictable rhythmic patterns. It would probably be a stronger melody if I allowed myself to use some different pitches in some places, but that is now easy to change if I want. Had I started without those pitch restrictions I might have focused on interesting note choices, rather than some of the more subtle aspects of melody. By composing a strong melody with limited note choices it’s easy to now go back and make it even better.
Try this exercise out and throw all those short ideas into your composition notebook. Some of them may just end up inspiring you to develop them further, at which point you can start changing around pitches and placing your melodies into a harmonic context.
I want to finish explaining this exercise with how I started, discussing the particular melodic cell I used as an example. You can come up with your own cells, but I find it helpful to borrow cells from great melodies. Here’s the original context of the melodic cell.

Some of you might recognize this as a fragment from Billy Strayhorn’s composition Take the A Train. The point, of course, isn’t to copy someone else’s music, but to become more conscious of what makes a great melody so strong. Try grabbing just a few notes from one of your favorite melodies and use that cell as a basis for this exercise. You already know a great melody can come from that simple collection of pitches. Your goal is to find one or two more.

Thanks for the post! I am practicing and thinking about melodic cells today. Dig the article!
thanks for taking the time to share this! looking forward to practicing it
Wow, this is incredibly helpful! I’ve been struggling to learn a better way to build vocabulary to build melodic lines in my solos. Are there any books (etudes or others) to work from? Thanks again.
Michael, try looking at the Charlie Parker transcriptions (Omnibook) or Bach fugues and inventions. Study their melodic lines. Look at what traditional music theory suggests is “correct” for melodic construction and then analyze those great melodies from Bird and Bach. See where they deviate from what’s considered correct and where they remain true to traditional form. Then explore those ideas in your own improvisations and compositions.
If you don’t really consider yourself a composer, per se, but are interested in improvisation I recommend that you practice by composing solos that sound improvised.