How to write a melody

Updated: Apr 3

6 techniques for songwriting and instrumental composition

Melody composer and music maker


The melody is by far the most ubiquitous form of musical structure that any listener, regardless of the style and period of music, is exposed to daily.

Our memory bank of maybe thousands of melodies stored in our collection of memories is deeply rooted in the emotional part of our brains.

It is the challenge of the composer to engage that particular part of the mind -the emotions-.

Music allows us, musicians, to reach the depths of our audience´s soul, and it is exactly this what we should aim to do every time we write a melody.

The power of a balanced melody can influence the perception of the listener, tapping into their unconscious, recalling past experiences which lead to the emotions invariably connected with them; from the soothing rocking feeling of a Lullaby to the grand opening of Beethoven's Fifth Symphony.

Therefore, the "6 techniques for songwriting and instrumental composition" is the first step we will go through in this article.


It is highly improbable to cover the entire study of the possible melodic combinations in one article.

The aim of this article is to raise the awareness of the reader, regardless if he or she is a student of composition, an amateur composer or a piano student who wants to broaden his or her knowledge about the inner complexity of a melody.

This article will define what a melody is, what are its components, and how to organize the flow within it to reach a successful outcome.

We will focus on the melodies of Western Tonal Classical music and modern examples of popular songs.

Both of these styles will help the exemplification of how and why melodies composed in the distant past with a different background can still serve as perfect examples for balanced and appealing melodic lines nowadays.


Starting a song or a piece is without a doubt, the most decisive moment for a composer, this is the spark that will ignite the whole composition process; the seed that will give life to it.

Teaching how to do that is the most challenging thing for a composition teacher as well.

Wilson, D. in his "Guidelines for coaching student composers. Music Educators Journal", 88, 28-28 (*1), published in 2001, offers an enlightening opening for this topic.

Wilson said:

"The composer's encounter is to offer the listener into a stimulating world of sound, creating arrangements that deliver direction and unity, and periodically send the material in unexpected directions so that the listener's interest is sustained". Wilson (2001) also said, "As for the notes themselves, it is important to remember that composition is a meaningful balance between unity created through repetition (allowing predictability) and variety created through change (providing interest). The more interesting the material, the more it should be repeated so that the listener can fully absorb it."

This statement helps us see the main objective when writing a melody: it should be perceived as a journey, in which the composer gets the attention of the listener by offering variety into unity.


We should set some vocabulary before we plunge into the main topic.

This article is intended for musicians with some previous knowledge in notation and harmony, to ensure that.

Some definitions:


"It is a linear succession of musical tones that the listener perceives as a single entity. In its most literal sense, a melody is a combination of pitch and rhythm." (*2)

Melodic motion 

"It is the quality of movement of a melody, including nearness or farness of successive pitches or notes in a melody; this may be described as conjunct or disjunct, stepwise, skip-wise or no movement, respectively". (*3)

The topic of the melody cannot be discussed without Harmony.

Some basic concepts are explored on the following links:

Triads in Major mode:
Triads in Minor mode:

Finally, there is an introduction to the foundation of the melodic writing called "Rules of Melody" (*4) that can enrich these techniques.



Within any scale, some notes are more stable than others.

The second ones will tend to resolve in the stable ones.

In the case of the Major scale, we observe that the first, third and fifth degrees are the most stable ones.

These degrees belong to the tonic triad.

The remaining degrees, 2nd, 4th, sixth and seventh have a compelling/active tendency to go or "resolve" in the tonic triad notes.

Let us see how this work on a C Major scale example:

In the case of a Minor scale, the seventh degree is raised to imitate the function of the leading tone in a Major Scale:

On a melody, this will be translated into the active steps being usually shorter and tending to resolve into triad notes.

The latter are commonly proportionally longer than the active-steps.


We will discuss the relative importance of the notes within a melody.

Kent Kennan says in his book Counterpoint - 4th Edition

"In most tonal melodies, certain notes are heard as more important than others." This may occur when those notes are:

1.- The highest or the lowest in a phrase or a longer segment

2.- The first and/or the last

3.- Longer in value

4.- Repeated, either immediately or later

5.- In a strong metric position

6.- Accented dynamically

7.- Harmonic as opposed as non-harmonic

8.- In a step progression

Let us analyse each of the cases:

1.- Highest or lowest notes are the peaks of any melodic contour, commonly, the highest is the climax and the lowest the anticlimax, both belong to what in music is referred as ceiling-notes and floor-notes, respectively.

2.- Either the first or last notes of a melody should be considered critical.

All the attention of the listener is concentrated in the first note due to the expectation of what it may come afterwards, and the last note is attractive simply because the last note it is heard.

The last note might be easier to retain in our memory.

3.- Long notes allow us to absorb the information better - as opposed to short values-.

Long notes are usually the best way a composer has to conclusively say to the listener "this note is relevant for the musical discourse, we will stay longer here!"

Bach aria on a G string

Longer values are also used for punctuation marks within a phrase; this clarifies the segmentation of the music.

4.- Repetition is a way of insisting upon an idea, and repetition is one of the most used and efficient ways to do it.

Here an excerpt from the great composer Pietro Mascagni in the Intermezzo from the opera "Cavalleria Rusticana" shows how repetition can accomplish a melodic climax effectively:

5.- Strong metric positions are given as the first beats in a bar.

We perceive pattern above all, and rhythmically, the first beat is the return to a new cycle in the continuum (the pulse or beat) anything that occurs in it will be automatically perceived as distinctive and opposed to the rest of the beats.

6.- Accented notes:

This is the easiest to use.

Louder noises are perceived unconsciously as a kind of threat, thus catching more attention. We should not overuse it.

7.- Harmonic notes, or notes that belong to a particular chord, will be identified as more stable, therefore, structural for our melodic line.

Notes that do not belong to a chord tend to be shorter, and consequently, less decisive in the musical discourse.

Pavana - Faure

8.- This last point is the least self-evident as it takes a longer time to unfold.

The step progression is usually a series of non-adjacent notes in a melody that forms a step-wise progression; the strong melodic relationship of an interval of a second causes those notes to be heard as a line even though other notes intervene in the process.

Here we can see a clear example in J.S. Bach's Gavotte from the English Suite No. 3 in G Minor BWV 808:

BWV 808: English Suite No.3 in G Minor- Gavotte


A) The ascending climax is the most common archetype, in which the line ascends to the highest point and then descends. The placement of the climatic note on the second half of the line is the most usual arrangement and most effective.

B) Pivotal patterns: Some melodies involve a pivot note, in which the line centres around a particular note.

C) Descending anticlimax: Here, a clear sense of climax can be achieved by basic downward motion to a low pitch, the reverse of the most frequent procedure.

D) By Step progression: This device offers a clear sense of direction to the melodic line, this can outline the overall skeletal structure the line.

E) Compound lines: This type is often seen in works of unaccompanied solo instruments where the double-layered melodic line achieves the sense of harmonic completeness.


When composing a melody, we should have a double vision upon our scheme of work.

The composer should "zoom in" and "zoom-out" from the musical piece; this brings both a broader view and better attention to detail.

There are three contributing factors that we should take into account when composing a melody:

1. Melodic contour:

The variables that can distinguish one melody from another are:

-Shape: the overall pattern of the contour

-Direction change: changes in an upward or downward direction and the frequency of these changes.

-Range: Also called "melodic excursion".

It is considered the distance between the highest and lowest points, the rate of pitch change. It accounts for any variation in this rate of change, distribution of low, middle, and high notes.

2. Continuity:

"Continuity is the general flow of effects built up by melodic intervals, rhythm values, articulation, and the duration and connection of ideas (figures)"

The variables participating in this flow include:

-Intervals: relative size

-Activity: relative slowness or quickness of rhythms

-Articulation: the mixture of sounds and silences, or the degree to which sounds and figures are separated by silences (rests).

-Duration: the relative length of ideas, how these lengths are sequenced.

3. Skeleton:

Melodies have identifiable frameworks called melodic skeleton, outline, or structural melody.

This structure is not perceived consciously, but as it unfolds in time, the shape created by the structural notes is heard as part of a melodic framework as it has qualities that attract the listener's attention; thus the structural notes support the skeleton upon which the linearity of the melody progresses.

A renowned music theorist, Heinrich Schenker (*5), developed the "Schenkerian Analysis" (*6) in which he demonstrated through his theory the underlying melodic structure in a melody or piece.

There are various stages in the Schenkerian Analysis. The method calls "Ursatz (usually translated as "fundamental structure") the underlying structure in its purest form from which the work as a whole originates".

Here is an example from Bars 29 to 31 of J.S.Bach Prelude in G Major BWV 1007 from Unaccompanied Cello Suites.

This graph was taken from a Thesis presented by Daniel E. Prindle University of Massachusetts Amherst (2011) (*7) on page 20 of this Thesis; we can see how the structural notes lead perfectly from one harmony to another (see the beamed notes in the graph):


A melody is the combination of pitch, rhythm and Harmony.

These concepts are part of the Five contributing elements in a musical composition. For practical purposes, we will cover the first three in this article, but in a previous article, there is more information on the matter:

We will start with an example of Bach passacaglia and Fugue BWV 582 (*8).

This melodic example is what in music is called "ostinato" or "drone": this is a short melody, commonly set on the bass line, that repeats itself throughout the piece and in this case, serves as fugue's main subject. The fugue comes after the Passacaglia.

This composition is the perfect beginning to see how an apparent simple melody contains much more than the naked eye can see at first glance.

For a balanced melody to exist, all the contributing elements should be combined in perfect harmony.

Let us start with the rhythm, which is the skeleton and first organiser factor: in this case, a simple upbeat allows this drone on the bass line to be the engine that dynamises all the piece.

Notice that the upbeat ends on the Dominant note, G; this efficient but straightforward resource allows the melody to reach a stopping point, announcing the ending of it by leading to the cadence.

The main melody is built up by 13 notes, with the last 3 constituting the cadential material - the latter gives an effective ending to the melody-.

Also, the pitch remains within the range of a minor sixth in which the melodic contour unfolds.

The melodic climax reaches the A flat note quite quickly but is compensated by the smooth melodic decay towards the C note on bar six.

The most remarkable features of this melody are:

1. The divergent melodic climax and

2. The divergent harmonic climax.

The first one, the divergent melodic climax, was already mentioned as occurring on the A flat note.

Conversely, on the gentle descent in pitch, we can notice the harmonic rhythm accelerating, increasing the harmonic density which contributes by keeping the attention in the musical discourse -this time via varying the harmonic element of music rather than the melody-.

On a final note, the most prolonged notes in value (see "relative importance of the notes") up to the A flat, extend to a minor third in an ascending motion from the F note (see notes in red in the graphic), conversely, the minims or half-notes after it belong solely to the tonic triad C-Eb-G (see notes in blue) in a melodic descent.

Bear in mind, that the tonic triad notes are always more stable than the active-steps, this attitude brings stability to the skeleton of the melodic contour after it reaches the climax ingeniously.

The second example is the famous "Amazing Grace".

This song is a Christian hymn published in 1779, with words written in 1772 by the English poet and Anglican clergyman John Newton (1725–1807).

In 1835, the American composer William Walker set it to the tune known as "New Britain" in a shape-note format" (*9).

It survived time and is still valid today.

A closer analysis will give us a perfect example of how a modest tune can hide its secret qualities.

The song was composed on a Major pentatonic scale; this particular scale does not have two of the notes of the Major scale, the fourth and seventh-degree.

The latter contributes to the arousal of an unstable interval: the tritone.

Many songs have been composed using this same scale, having this placid and tranquil quality.

The first two bars mark the nature of what the rest of the melody will be.

An upbeat from the fifth degree of the scale, C, to the tonic note, F.

We observe a melodic line composed by a broken chord on the tonic triad, F Major (F-A-C) followed by the response in steps towards the dominant note again allowing the balance from skips presented before.

The way to continue the first motive is crucial to any melody.

There are always four ways of continuation in music:

  • Recurrence

  • Development

  • Response

  • Contrast.

To know more about this topic, please refer to a previous article in the link below:

Notice the combination between the melodic and the harmonic layer in these first four bars that conform the first complete idea: the skips and leaps (considered more active melodically) rest upon a single chord in the tonic triad.

At the same time, the steps in descending motion (which bring a balance slow-decay and comforting feeling to the listener) lay upon a denser chord change. Both factors contribute to a harmonious balance between melody and harmony.

For more information about Harmonic Rhythm, there is a previous article "Harmonic Rhythm - An Introduction."

The first complete idea contains all the notes from the Tonic triad of F Major, providing a very stable characteristic to the song.

The second part gravitates on the Dominant note through longer value and repetition, two of the primary means a composer has to give more importance to a note (bars 7-9), this note becomes the climax of the melody to then go down to the same note, C an octave lower.


As we could see in the article, the structural notes are the skeleton upon which the melody is built.

This idea supports this method:

1.-Building a two-bar motive on a single Harmony

Start with a broken chord of the preferred key (I recommend C Major as the easiest to write at the beginning)

2.- Apply different rhythms

Consider that a balanced rhythmic layer will provide comprehensibility, do not use many different values and repeat them to provide unity

3.-Addition of embellishments

Passing notes, neighbouring notes, appoggiatura, escape tones, suspensions or retardations.

More information can be found in this link:

Here are some examples in C Major and C Minor modes:

The same method for building a melody can be applied to two harmonies and even three harmonies.


We have seen an overall panorama of the complexity that a single melodic line can possess.

The study of how to write a melody is a vast ground to undertake considering historical, aesthetic and technical considerations.

In this article, the objective was to raise the awareness of the composition student, to recognise and identify patterns that underly beyond style and period and see through the shallow surface of the apparent simplicity of a melody, to have the necessary guidance and the knowledge which provides balance and organisation to achieve level of a higher art.

As Arnold Schonberg says in his book Fundamentals of Musical Composition (Page 102):

"Every succession of tones produces unrest, conflict, problems. One single tone is not problematic because the ear defines it as a tonic, a point of repose. Every added tone makes this determination questionable. Every musical form can be considered as an attempt to treat this unrest either by halting or limiting it or by solving the problem. A melody re-establishes repose through balance. (...) The melody also tends to achieve balance in the most direct way. It avoids intensifying the unrest; it supports comprehensibility by limitation and facilitates lucidity through subdivision; it extends itself rather by continuation than by elaboration or development, and it remains within closer harmonic relationships."











1,258 views0 comments

Recent Posts

See All
Markson's Pianos

Juan Rezzuto and/or WKMT is a member of


Since 2010 we prepare students for exams at



40 Kensington Hall Gardens,

Beaumont Avenue,

London W14 9LT

Tel: 02071014479


79 Brisbane Street,

London SE5 7NJ

242 Lucey way,

London SE16 3UG


Rua Bispo Fernandez de Castro No. 11

Mondoñedo, Lugo, 27740

  • Wix Facebook page
  • Instagram
  • YouTube
  • LinkedIn App Icon
  • Blogger
  • Wix Twitter page

© 2012 by Juan J. Rezzuto. All the tracks, scores and articles you can find in here are copyright.