Music and a flower

The Role of Melody in Music

What is a melody? How does it work? You’ve probably used and heard the word for most of your life, I’ve had a surprisingly large number of students admit confusion at the true definition of the term.

In this article I’ll discuss the basics of melody, as well as what composers have done with melody throughout history, including musical examples. Enjoy!

What Is A Melody

At its most basic level, a melody is a set of pitches and rhythms that create a line of music. You could also say that a melody is built up of a combination of musical intervals. One note by itself is not really a melody, but once there are two notes, even if it’s two of the same note, a melody starts to form.

The Oxford Dictionary defines it as, “a sequence of single notes that is musically satisfying,” but to me that’s too limiting. I’m not convinced that every melody has to be musically satisfying! also initially defines melody as having to be “agreeable”. Lower in its secondary definition is one that sounds more right to me: “A rhythmical succession of single tones producing a distinct musical phrase or idea.”

Now that’s all rather technical. A more simplistic way to talk about melody is that it’s the part you sing, which in many cases is true. In just about any song you hear on pop radio the main melody is whatever the singer is singing.

When the music is instrumental, this gets a little bit more complicated. Often this melody is singable, but not always.

In Penderecki’s Capriccio for Violin and Orchestra the violin comes in at around 0:22 playing what I would call a “melody”. However, I definitely can’t sing it!

The above example is a very busy, complicated melody. More often a melody is quite simple. There are plenty of pop songs, especially modern ones, where the melody consists of one or two notes repeated over and over again.

However, pop didn’t invent the idea of super-simple melodies. Beethoven did the same thing in the first movement of his Moonlight Sonata, arguably one of his most famous pieces ever!

Hear that beautifully simple one-note melody come in at around 0:38.

There are plenty of other examples in classical music where the melody is primarily just one note. Two piano pieces that come to mind are Schubert’s Impromptu Op. 90, No. 3 in G flat Major and Liszt’s Liebestraum No. 3.

Notice that all three of these piano examples of very simple melodies have pretty prominent accompaniments. This of course doesn’t always have to be the case, but to me it’s an interesting thing to note. Some people even think the accompaniment part in Moonlight Sonata (that ascending right-hand broken chord) is the melody.

As a pianist it’s so important to always know the difference between melody and accompaniment because if you don’t, the piece you’re playing will not sound right!

The History of Melody and Texture

In music when we talk about texture, we’re discussing the way in which the different parts of the music combine and interact. Melody is just one part of the texture. The above piano pieces with their textures of melody and accompaniment all have the most common type of texture in Western music, which we call homophonic texture.

Some of the earliest music we know about is Gregorian chant, which developed during the 9th and 10th centuries. This type of music was usually pure melody with little, if any, accompaniment. This type of texture is known as monophonic texture, which literally translates to “one sound”.

These melodies tended to be long, meandering lines that moved up and down, mainly by steps. There was very little rhythmic variation as the notes flowed fairly steadily with periodic pauses, possibly because this made it easier for many voices to sing it together in a group.

Here’s a beautiful example of a chant-like piece by Hildegard von Bingen:

Notice how the melody meanders up and down, mostly in steps, with very little rhythmic variation.

Composing in the 12th century, Hildegard expanded the general parameters of music of the time. Even so, the above piece very much fits the above description of Gregorian chant with one important exception: In this recording there is a second line of music–a string instrument holding just one note, called a pedal tone.

The presence of this pedal tone turns the texture of the piece from monophonic to biphonic, meaning that there are two distinct lines of music, but still only one is a melody.

Fun Fact: Modern composer Christopher Theofanidis composed a piece for orchestra called Rainbow Body which is based on the above melody by Hildegard von Bingen. At about 1:27 in the linked video the melody is heard loud and clear in the strings. However, he took the idea of the pedal tone to a new level, making multiple pedal tones echo off of the melody as it meanders, creating note combinations that turn into truly gorgeous harmonies. It’s a beautiful and thrilling piece!

The Rise of Polyphony

Over time as biphonic textures became more popular, those pedal tones eventually began to develop into independent melodies of their own. This type of texture is called polyphonic.

The 13th century gave rise to what some call the polyphonic era, culminating in the work of Giovanni Pierluigi da Palestrina in the 16th century. His music showcases some very beautiful examples of polyphonic music in the renaissance.

This is a super long video, great for putting on in the background for a relaxing evening!


Another word often used when discussing polyphonic music is counterpoint. Counterpoint is the way the various independent melodies relate to each other. As polyphony was developing there were very strict rules of counterpoint that had to be adhered to.

Even now most composers, while not always following them, often keep the rules of counterpoint in mind as they compose. Do you hear how smoothly the voices move around each other in the above Palestrina video? That’s thanks to the rules of counterpoint. Looking for a less smooth, more jarring sound? Try breaking some counterpoint rules!

A simple example of a polyphonic, contrapuntal type of music is called a canon. Most of us sang canons as children and didn’t even know we were performing counterpoint!

A canon is where one voice starts the piece and another joins in partway through so the two melodies are heard independently of each other, creating various harmonies as they interweave. Also known as singing “in a round”, this is often done with children’s songs such as “Row, Row, Row Your Boat” and “Frère Jacques”.

The Fugue

Perhaps the epitome of contrapuntal composition is the fugue. A fugue is a musical form consisting of multiple independent lines of music following specific rules.

Traditionally a fugue starts out monophonically, with just one line, called a voice whether it’s a human voice or instrument. This starting voice introduces the main melody, called the subject. At some point a second line joins in starting the same melody over from the beginning, similar to how a canon works. However, in a fugue the second line is traditionally in a new key.

The two lines interweave for awhile, sometimes playing an interlude together known as an episode before the subject is heard again, in a new voice if there are more voices or repeated by the first two voices. The form continues rotating between episodes and repetitions of the subject, also called entries.

A fugue can have as little as two voices and as many voices as a composer cares to include, though four or five is usually the maximum.

Johann Sebastian Bach wrote many fugues, including one in each key in his Well-Tempered Clavier, BWV 846–893. Each fugue accompanied a prelude, which I mentioned in Preludes for Piano.

Below is a video of a late, unfinished piece by Bach known as The Art of the Fugue, BWV 1080. It’s a truly amazing contrapuntal feat!

The Rise of Harmony

Through the 16th century, musical focus was primarily on melody and how they interacted, but not specifically the harmony they created. The term harmonic triad, was coined in 1612 by Johannes Lippius in his Synopsis musicae novae (1612).

With the development of harmony, music started to move away from polyphony and into homophony. However, the polyphonic forms that remained became highly intricate, such as the fugue form described above which Bach showcased masterfully in the 18th century.

As harmony became more and more important in music, polyphony became simply one of many choices, rather than the only choice as it had been in the past. Beethoven was a huge fan of fugues and polyphonic textures, but his works always had plenty of homophony involved as well.

Counterpoint was still used, but not to the same extremes. More and more music went back to having a main melody with accompaniment, though often there would be secondary melodies here and there.

Brahms was great at creating pieces that seem simple to the ear but actually have hidden contrapuntal melodies weaving around each other. They fit so naturally together that you might not even notice they were there if you didn’t study the piece.

One of my favorite pieces by Brahms, his Intermezzo Op. 118, No. 2 in A Major

I hope you’ve enjoyed this exploration on the role of melody in music. It’s a fascinating subject about which there’s much more to say, but we’ll have to save that for another time.

Make Practice Time Easier By Planning Ahead!

Hands playing piano keys with a metronome and pencil nearby

Learn how to plan exactly what you need to do each day to accomplish your goals. Then all you have to do at practice time is sit down and play!

The Piecewise Practice Planner will help you make meaningful progress every time you practice, even with as little as 5 minutes per practice session.

Best of all, it’s completely FREE–to opt in, click the button below!

Heidi has been involved in music in one way or another for most of her life. She studied music composition in college, has taught piano, voice, composition, ear training, and guitar, and has worked as a piano tuner and technician. Before the pandemic she loved playing concerts at retirement communities, bringing the joy of music to those populations. She is currently working on learning more about the connection between music and healing.

Related Articles:

Intervals in Music: An Introduction
Preludes for Piano: From 1722 to 1910

Leave a Comment

Your email address will not be published. Required fields are marked *