← Note by Note RU
No MIDI keyboard connected
Computer keyboard: C4–F5
?

A S D F G H J K L are white keys from C, W E T Y U O P are black. Z and X move an octave down and up, C and V play softer and harder. Space is a tap in rhythm exercises. Any keyboard layout works.

Chapter 18 of 21 Writing music ≈ 45 min 10 exercises

Motif and phrase

How to write a tune: a workshop with rules. Only three notes, repeat and change one thing, end on the tonic. The widget plays what you made straight away, and by the end of the chapter an eight-bar tune of your own is in the Notebook.

In this chapter

  • invent a motif of three or four notes and develop it by repetition, sequence and inversion
  • build a two-bar and a four-bar phrase from a motif
  • write a question and an answer so that the answer closes on the tonic
  • put the peak of a tune where it works and hear the contour
  • save an eight-bar tune of your own to the Notebook

In chapter 17 you worked out other people's tunes: clue by clue, note by note. Now it goes the other way. In front of you is an empty piano roll, a keyboard and complete freedom: press whatever you like. And usually nothing happens. Your fingers wander over the keys, out comes a handful of notes, and there is no tune.

Anyone who has tried to write music knows this. Freedom is frightening: when anything goes, there is nothing to hold on to. So this chapter is a workshop with limits. Each task is a rule: only three notes, repeat and change one thing, end on the tonic. A rule narrows the choice to a size the hand and the ear can manage, and the widget plays the result at once and tells you whether you kept the rule. Limits do not get in the way of composing. They are where it starts.

Four notes that grew into a symphony

Start with the most famous example of all. Press "The whole phrase": you will hear four notes, three short and one long, G, G, G, E♭. Then press "Sequence ↓". The same four notes come again one scale degree lower: F, F, F, D. This is the opening of Beethoven's Fifth Symphony, exactly as he wrote it.

A short cell like this, one you recognise and that music is built from, is called a motif. A motif has two layers: the pitch shape (down a third after three repeated notes) and the rhythm (three short, one long). Try the other buttons in the generator. Almost every change leaves the motif recognisable, because one of the two layers stays put.

Play the motif yourself, first as Beethoven has it, then shifted a degree lower. In the orchestra the eighths fly past, but here the tempo is yours: the exercise waits for every note.

A tune is not written note by note. It is grown from a motif: you invent a short cell, then repeat it and change it.

Rule one: three notes

The strictest limit is just three notes. It seems nothing can come of them, but try it. Choose three notes in the widget below or press them on the keyboard, then choose a rhythm. The widget turns them into a one-bar motif and develops it straight away into a four-bar phrase: bars 2 and 3 change the motif, and bar 4 leads home to C. The "Another development" button tries other ways.

Listen to several versions in a row. Each one sounds like a tune, though there were only three notes. Two decisions did the work: repeat the motif rather than invent something new at every step, and end on the tonic (chapter 14).

What Schoenberg wrote about the motif

Arnold Schoenberg (1874–1951) taught composition for about forty years, in Vienna, in Berlin and then in Los Angeles. His textbook Fundamentals of Musical Composition came out in 1967, after his death; it was edited by Gerald Strang with the collaboration of Leonard Stein. There the basic motive, as he spells it, is "often considered the 'germ' of the idea": almost everything heard later is derived from it. The section on what makes a motive opens like this: "Any rhythmicized succession of notes can be used as a basic motive, but there should not be too many different features." Among his examples is that same Fifth of Beethoven's, whose motives, Schoenberg notes, "consist primarily of note-repetitions". Three notes with a simple rhythm are exactly this kind of motif. Later the book looks closely at the two forms you will meet below: the phrase made of a repeated and developed motif, and the period made of two phrases.

Now write your own. From here on you work in a small piano roll, as in a DAW, using step input: choose a note value, press a key, and the note lands at the cursor, which steps forward. You do not have to play in time. The "Rest" button leaves an empty space, "Undo" removes the last note, and in the piano roll itself you can drag a note or double-click to delete it.

Write two bars from exactly three different notes. You can repeat them as often as you like, and you need at least five notes in all. When the bars are full, the tune plays and the widget checks the rule.

Step input is in almost every DAW (Logic, Cubase, Ableton Live) and in many hardware sequencers. It is good for composing because it separates "what to play" from "how evenly to play it": you can think about the notes, not the tempo.

Rule two: repeat and change one thing

A motif heard once is not remembered. A motif repeated without change gets boring by the third time round. A tune lives between the two: the motif comes back, and each time something about it is different. The ways of changing it have names, and they are all buttons on the generator at the top of the chapter.

Repetition is the same thing again. It is the simplest technique and the most underrated: repetition is what turns random notes into a motif.

A sequence is the same motif from a different note, one or more degrees higher or lower. The shape and the rhythm stay the same, and everything moves together. That is how the Fifth begins: G–G–G–E♭, then F–F–F–D. The generator moves by degrees of the scale, so the steps can change slightly: a whole tone may become a semitone. The tune stays in the key.

A variation is a repeat with one thing or a few things changed: the rhythm, one note, the ending. The clearest kinds of variation have names of their own.

  • Inversion: each step up becomes a step down, and the other way round. Under the generator button you can see the steps in scale degrees before and after: the Fifth had 0, 0, −2, and now has 0, 0, +2.
  • Retrograde: the motif backwards. It is the hardest one for the ear to recognise, but it makes a good continuation. In "Ode to Joy" bar 2 is almost the retrograde of bar 1: E–E–F–G, then G–F–E–D. Compare them in the generator by choosing the "Ode".
  • Augmentation: the same notes twice as long. The opposite is diminution: twice as short. The motif slows down or hurries, and the shape stays the same.

Press the buttons in different orders: each press applies to the last piece of the phrase. A sequence after a sequence makes a staircase. An inversion after a sequence turns it round. Four bars fill up quickly, and almost any chain sounds connected, because everything grew from one cell.

The motif C–D–E (two quarters and a half) is repeated as D–E–F in the same rhythm. What is that?

The rhythm is the same, the shape is the same, two steps up, and everything has moved up one degree. That is a sequence. An inversion would have been D–C–B: steps down instead of steps up. With augmentation the notes would have stayed C–D–E, only twice as long.

The rule of the task: bar 1 is your motif, bar 2 is the same motif with one thing changed. The widget works out what you did: a sequence, an inversion, a variation of the rhythm or of one note. If bar 2 is the same as bar 1, or changes so much that the motif is lost, the rule does not count.

Bar 1: a motif of three to five notes. Bar 2: the same motif with one change. Shift it, turn it upside down or change the rhythm.

It pays to be able to play a sequence at once, without thinking: composers and improvisers use it all the time. The exercise plays a short motif, and you repeat it one degree higher from the marked key. All the notes are white keys, in C major.

The phrase: two bars and four

A motif and its repeat together are no longer a cell but a stretch of tune with a beginning and an end of its own. Musicians call such a stretch a phrase: it sounds like one thought and ends with a stop, the way a sentence ends with a full stop or a comma. In songs and dance music phrases most often last two or four bars.

Listen to the first phrase of "Ode to Joy". It lasts four bars. The first two hold the motif and its continuation: E–E–F–G, G–F–E–D. Bars 3 and 4 move just as evenly, in quarters, and at the very end the rhythm breaks: a long E, a short D and a held D. A long note at the end is the signal to stop.

The phrase in the "Three notes" widget above is put together the same way: motif, change, another change, stop. This is the most common plan for a four-bar phrase. You can check by ear that the phrase works: after the last note you want silence, as after a full stop.

If the phrase will not stop, lengthen the last note and put it on a strong beat. A rest after it helps too: the ear needs a moment of silence to know the thought is finished.

Build your own phrase. Bar 1 is the motif, bar 2 grows out of it, bar 3 carries on however you like, and bar 4 stops on a long note.

Four bars. Bar 1: a motif. Bar 2: its repeat, a sequence or a variation. The last note is a half note or longer, on a strong beat: the first or the third.

Question and answer

Put two phrases side by side and they start to talk. If the second begins like the first and ends differently, you get a pair: a question and an answer. The first phrase stops on an unstable note and seems to ask something. The second repeats its opening and comes home, to the tonic. Such a pair is called a period. It is one of the oldest and sturdiest forms in music, from eighteenth-century minuets to pop songs.

In the widget the question plays in grey and the answer in colour. The first bar of the answer repeats the first bar of the question, and you choose the last bar: an ending on degree I, III, V or VII. Switch between them and listen for where the tune has finished and where it has only paused.

An ending on the tonic sounds like a full stop. An ending on degree V sounds like a comma, and that is often how a question ends. On degree VII the phrase breaks off and the ear waits for one more note: you hear the pull of the leading note (chapter 14) at once. Now tick "End the question on the tonic too": the full stop lands in the middle, and the second phrase sounds like a needless repeat. A question needs to be unfinished, or there is nothing to answer.

Now the question is yours: switch the widget to "Play your own question" and enter two bars. The widget builds the answer from your first bar and the ending you chose.

A period is a question and an answer. The answer begins like the question and ends on the tonic; the question ends away from home, most often on degree V.

You have written two phrases, and both end on the tonic. What do you do to turn them into a question and an answer?

A question sounds like a question when it ends away from home. End the first phrase on degree V (or II) and it will need a continuation, and the second phrase, which arrives at the tonic, becomes the answer. Similar openings help rather than hurt: the ear hears that the second phrase is answering the first one in particular.

Now you write the answer. The question is already in the first two bars, and it ends on G, degree V. Start the answer with the same two notes and bring it to C.

Bars 1–2 are the question, and it plays by itself. Write bars 3–4: start with the same two notes, E and G, and end on a long C on a strong beat.

The peak and the contour

Every tune has a contour: the shape you get if you join the notes with a line. In chapter 17 you drew a contour with your finger and listened to what came out. Now look at the contours of some well-known tunes. The red dot marks the highest note. It is called the climax: the peak the tune climbs towards and comes down from.

Look at where the peak sits. In "Ah, vous dirai-je, maman" it comes early: the tune leaps from C to G, rises to A and from then on only steps down. In "Vo pole beryoza", the Russian folk tune from chapter 14, played here on the keys, the peak is G5 in the second phrase: the first phrase does not touch it, and the second reaches it once. In Beethoven's Fifth the peak is the very first note, and the motif goes down. In "Frère Jacques" each piece starts a little higher than the one before, and the peak comes at the end.

The "Turn upside down" box inverts the whole tune: rises become falls. The tune is still a tune, but its mood changes: the "Ode" upside down no longer strives upwards but settles. If your own tune is in the Notebook, it is on the map too: look at its peak.

These maps lead to an old rule of tune-writers. There is one peak: take the highest note three times and it stops being an event. And it usually comes in the second half: the tune gathers height, reaches the top and comes down towards the end. A great many songs work this way, from folk songs to pop hits.

Four bars, at least eight notes. The highest note appears once, in bar 3 or 4 (but not as the last note). End on C, below the peak.

One theme, twelve developments

You already know this tune: C–C–G–G–A–A–G. The French song "Ah, vous dirai-je, maman" was first printed in 1761, and in English-speaking countries the tune is known as "Twinkle, Twinkle, Little Star". Mozart wrote twelve variations on it for piano. The theme has three sections of eight bars each: the opening, a middle and the opening again. Each variation takes the theme and changes something of its own.

The widget holds the first eight bars of the theme and of three variations, with the notes from the 1961 edition (trills and grace notes left out). Listen and watch what has changed. A green frame marks the notes of the variation that match the theme's notes on the beats: this is the frame the recognition hangs on.

Variation I breaks each quarter of the theme into four sixteenths: the theme's note stays inside the figure, and neighbouring notes circle round it, sometimes chromatic ones, F♯ and G♯. That is why there are few green frames here: on the beats themselves Mozart more often puts the neighbouring note. This is subdivision, a relative of the generator's diminution, except that Mozart also fills in the gaps. Variation V leaves the theme's notes almost in place and changes the rhythm: the notes skip beats, and the hands answer each other across rests. Variation VIII moves the theme into C minor (as in chapter 14), and the left hand comes in later and repeats the right hand's opening a fifth lower. Tick "Theme on top": a bell plays the theme above the variation, and you can hear that it has not gone anywhere.

The last variation, the twelfth, even changes the time signature: 3/4 instead of 2/4, three beats in a bar instead of two. And the eleventh is a slow Adagio. Twelve variations are twelve answers to the question "what else can you do with these notes?"

Now write your own variation on this theme. The frame of the theme is shown in grey: C, G, A, G on the first and third beats. Leave those notes where they are, and write your own between them, more than the theme has.

Two bars. On the first and third beats of each bar are the theme's notes: C, G, A, G (shown in grey). Everything else is yours: passing notes and neighbouring notes, a different rhythm. You need more notes than the theme has.

What a song that gets stuck is made of

What is a song that gets stuck in your head made of?

A tune that goes round in your head by itself, without being asked, is called an earworm. You have already found the first half of the answer to the course's sixth question with your own hands: such tunes are made of a motif and repetition. A short cell that is easy to remember comes back again and again, a little different each time. The brain has something to hold on to: it recognises the motif and predicts what comes next.

There is research on this too. The psychologists Kelly Jakubowski, Sebastian Finkel, Lauren Stewart and Daniel Müllensiefen at Goldsmiths, University of London, asked about 3,000 people which songs got stuck in their heads most often. They compared the hundred most frequent earworms with a hundred songs that were just as popular and in the same style but never got stuck. The paper appeared in 2017 in the journal Psychology of Aesthetics, Creativity, and the Arts. On average the earworms were faster, and the overall shape of their tunes was the more familiar one: the most common shape in pop, rising in the first phrase and falling in the second, as in "Twinkle, Twinkle, Little Star". Yet their intervals held something unusual: in the authors' words, "unexpected leaps or more repeated notes than the average pop song".

That makes a recipe in two parts. A familiar form, a repeated motif, a clear phrase, a peak and a descent, gives the ear something to stand on. One unusual detail keeps the tune from dissolving among a thousand like it. The second half of the answer, how a song becomes a track with a sound, a bass and a beat, comes in chapter 21.

Try the recipe in two bars: a motif and its repeat, in which one note unexpectedly leaps aside.

Bar 1: a motif of three to five notes. Bar 2: the same motif in the same rhythm, but one note leaps away, at least a third from where it was. Listen to how that leap catches the ear.

The tune you remember has plenty of repetition and one surprise: the motif comes back, the contour is familiar, and one leap or one rhythm is its own.

Eight bars for the Notebook

Put it all together. Below is an eight-bar piano roll that pages through four bars at a time. The task is a period: the question in bars 1–4, the answer in bars 5–8. Work in this order.

  1. Invent a motif one or two bars long. You can take a motif from the tasks above.
  2. Develop it into a four-bar question: a repeat, a sequence or a variation, and a stop that is not on the tonic, on G, for example.
  3. Press "Bars 1–2 → 5–6": the answer will begin like the question.
  4. Write bars 7–8 and bring the tune home to the tonic with a long note.
  5. Check the peak: there is one, and it is better in the second half.

The list under the piano roll checks the rules as you go. When everything is green, save the tune to the Notebook. If you would rather not start from scratch, press "Sample" and change something in it to make it yours. If there is already a tune in the Notebook from earlier chapters, you can take it and rework it.

It pays to be able to play your own tune from memory. The exercise below plays your tune, the one in the Notebook, a bar at a time and asks you to play each bar back. If you have not saved anything yet, it takes the sample. You can also practise playing tunes back by ear in the "Playing back" trainer.

What next

Now you compose not at random but by rules that work: you invent a motif, develop it by repetition, sequence, inversion and variation, build a two-bar and a four-bar phrase, write a question and an answer so that the answer closes on the tonic, and put the peak where it sounds like a peak. Your eight-bar tune is in the Notebook.

The next wall is under the tune. Play it on its own and it sounds empty, as if it has no floor to stand on. Which chords go under each bar, and where does the bass go? That is chapter 19.

The Notebook now holds your eight-bar tune: a question and an answer. You can fix it in the piano roll, copy the question into the second half or pull the ending to the tonic. In chapter 19 chords and a bass will appear under it, with hints taken from the notes of the tune.

Chapters

  1. 00 What your ear knows
  2. 01 String and octave
  3. 02 The synth
  4. 03 MIDI
  5. 04 Keyboard
  6. 05 Note names
  7. 06 The pulse
  8. 07 Note values
  9. 08 Meters
  10. 09 Groove
  11. 10 The staff
  12. 11 Sharps and flats
  13. 12 Bass clef
  14. 13 Intervals
  15. 14 Major and minor
  16. 15 Chords
  17. 16 Sight-reading
  18. 17 Playing by ear
  19. 18 Motif and phrase
    1. Four notes that grew into a symphony
    2. Rule one: three notes
    3. Rule two: repeat and change one thing
    4. The phrase: two bars and four
    5. Question and answer
    6. The peak and the contour
    7. One theme, twelve developments
    8. What a song that gets stuck is made of
    9. Eight bars for the Notebook
    10. What next
  20. 19 Harmony and bass
  21. 20 Arrangement
  22. 21 Your own track
  23. 🎯Trainers
  24. 📓Notebook
  25. 📖Glossary