Music Theory

What is Melody in Music? Learn How to Make a Melody on Piano

By Rebecca Carlson
Learn about melody in music with Hoffman Academy.

To understand what is melody in music, think about some music you’re familiar with. If you were asked to hum it, what would that sound like? The part of the music that you’d hum is the melody. It’s the main thread of sound that your brain tracks and holds onto when you’re listening to music.

In vocal music, the melody is sung by the lead vocalist. Other singers can provide harmony and instruments can add accompaniment, but the melody is the star of the show. 

What are the characteristics of melody? How do you describe a melody?

A melody needs to have two things. The first is a sequence of notes, also known as pitches, which are musical tones that can range from high to low. The second is rhythm, which is the timing and duration of each note.

These two simple elements can create an incredible variety of combinations. Even though a melody only consists of one note at a time, it can convey so much energy and emotion. Melodies can be fast and sparkly, like “The Flight of the Bumblebee.” They can be slow and majestic, like “Finlandia.” They can be sweeping and graceful, like a Strauss waltz. They can be fun and exciting, like your favorite pop tunes that you love to sing along with. 

Melodies often tell you a lot about where a piece of music comes from. It’s easy to recognize and identify melodies from different folk traditions such as the Japanese folk song “Sakura” or the Irish tune “Star of the County Down.” 

Learn how to play your favorite melodies on piano, and more! Sign up now.

What is melody in music? Examples for you

Here is the famous melody for the song “Lean on Me” written out on a staff. Notice the way that the notes move up, down, and then repeat. 

Lean on me melody on treble staff

A melody all by itself is great, but music can be even more fun when there’s an accompaniment.  Here are a few bars of “Lean on Me” with the accompaniment written out. As you listen to this song, notice how the accompaniment has a very similar rhythm and movement to the melody. Then there’s that one note in the bass line that comes along every measure with its own rhythm, which adds some extra energy and movement to the song.

Lean on me with melody and accompaniment

What makes a good melody?

When you create a melody, there are three ways that the notes can progress.

  • Repeat (same note)
  • Step (up or down)
  • Skip (up or down)

Stepping and repeating are the most common ways for notes to progress. Most melodies that we think are beautiful will use a lot of stepping and repeating. Beethoven’s “Ode to Joy,” which is one of the most famous melodies of all time, is mostly stepping and repeating notes.

Melody for Ode to Joy

Skips are generally used sparingly in melodies, but when thoughtfully placed they can have a powerful emotional impact.

Great melodies also incorporate patterns that blend unity, repetition, and contrast. Our ears love patterns, but they also love novelty and growth. A good melody incorporates all of these elements. For example, listen to John William’s “Princess Leia Theme.” Can you hear the repeated pattern in the melody that gradually moves higher as the theme progresses? Now listen to the way the melody changes and develops into something that fits with what came before but sounds new at the same time. This is some great melodic writing!

Can melody exist without rhythm?

There is no way for a melody to exist without rhythm. If your melody only has one note, that note has a duration, and that’s the rhythm. If your melody has two notes, how long those notes last and how much time passes between hearing them is a rhythm. 

A melody can often be recognized even when it is performed with a different rhythms. So, the rhythm of a melody may be somewhat flexible, but whether you play the melody with its original rhythm or change the rhythm to something else, the melody you’re playing still has a rhythm.

How to make a melody for a song on piano

Making your own melody on the piano can seem a little intimidating, but it can also be a lot of fun! There are so many different things to try that will help you discover a melody all your own. Here are a few ideas.

  • Get some inspiration from the world around you. What can you hear right now? A clock ticking? A bird song? A car passing by your house? See if you can find some notes on the piano that imitate the sounds you hear.
  • Think of a feeling you’d like to put into a melody. What are some ways you could make a string of notes sound happy, or sad, or angry, or maybe just thoughtful.
  • Choose a line from a poem you like, or write your own. Read it out loud and put some feeling into it. Did your voice rise and fall in pitch as you were reading? Now go to the piano, start on any note you like, and try to imitate what happened when you read. Go up when your voice naturally went up, go down when your voice naturally went down. How did that sound? Now you have the perfect melody to go with those words.
  • Too many keys on the piano? Try creating a melody using only the black notes. The black notes on the piano form what’s called a pentatonic scale. It’s used in a lot of folk music traditions around the world and can be a great place to start if you want to create your own melodies.

Remember, when you create your melody, keep it simple. Use repeated notes and steps, but add a few skips to keep things interesting. See if you can use the same patterns of notes and rhythms to give the melody unity, but also change those patterns to give it variety. There is no right or wrong way to create your own music. Keep trying combinations of notes and rhythms until you find something that you like.

How many bars are in a melody? How many notes are in a melody?

A melody can be as long or as short as it needs to be. When a composer writes a song or a piece of music, the melody generally goes on for as long as the music is playing. While there may be recognizable themes or phrases that repeat within the melody, the melody itself lasts from the beginning of the song all the way to the end.

There are certain types of music that tend to have a certain number of bars. If you’re writing a pop song, a verse will usually have between eight and sixteen bars, and each verse will generally have the same melody as the other verses, with a few variations. 

The number of notes in a melody can also vary widely. A melody needs at least one note, though a melody with just one note might not be very interesting. A long and complex melody can have hundreds or even thousands of notes.

What is a counter melody in music? How many melodies should a song have?

A counter melody is a melody that interacts with the primary melody as an independent but supportive voice. A great example of this is the song “We Don’t Talk about Bruno.” Each character sings their own melody during the piece, but these melodies all combine at the end as counter melodies.

The difference between a counter melody and regular harmony is that harmony usually follows a similar rhythmic pattern to the melody and steps or skips to notes in the chord that is supporting the melody. A counter melody will move more independently, and will often sound “melodic” when sung or played all by itself.  

A melodic song should have one main melody. This is the part that the lead voice sings. It’s usually in the spotlight, and will be the most memorable part of the music. Anything else is either harmony, counter melody, or accompaniment.

Does all music have to have a melody?

A piece of music doesn’t have to have a melody. There are many different kinds of music without melody. For example, a lot of music played on percussion instruments won’t have a melody. Listen to this example of Tahitian drumming. This is some great music, exciting and fun to listen to, but you’d have a hard time humming it. It’s music, but it doesn’t have a melody. 

Rap music is another style of music where there doesn’t have to be a melody. In rap, words are chanted rather than sung. The performer will raise and lower the pitch of their voice for emphasis, but it’s the rhythm of the words that creates most of the music.

Even music that has notes or pitches can be without a melody, at least in some sections. Listen to the opening chords of “Duel of the Fates.” There seems to be a little bit of melody in those chords, maybe, but it certainly isn’t as strong as the melody that comes in once the instruments start playing.

In some pieces, there are multiple melodic lines but there is no one main melody. When music is made up of equally important counter melodies, it’s called polyphony or counterpoint. Baroque composer J. S. Bach used a lot of counterpoint in his compositions, such as this fugue. It starts with a single melody line, but then another line of counter melody is added, and then more and more until several melody lines are playing together. It’s fun to listen to, but once all of the counter melodies are playing together it would be really hard to decide which part to hum along with.

You’ll also hear a lot of polyphony and counterpoint in jazz music, in which the different instruments are all playing together and improvising their own melodies that combine to create a rich, thick texture of sound.

Enjoy a world of magnificent melodies!

Whether you’re humming your favorite tune, or creating a new song all your own, melody is a memorable, shareable part of music. Enrich your music experience by being aware of, listening for, and enjoying the melodies all around you.


Read Next