Free from Aphelion

Lilt

A machine that writes melodies knowing nothing whatsoever about melody, and eight conventions to hold the results against. Generate a line, listen to it, read what the rules make of it, and take the MIDI.

seed 1 · Run Stop · Double Head · Approach · …

C4 to C5 · 35 notes · Major

6/10

This is a conformity score, not a quality score. It counts how closely this line follows eight conventions that most Western melodies happen to follow. Plenty of melodies you love break several at once. Nothing here knows whether a tune is any good - you do, and the number is only worth having if it makes you argue with it.

  • 40% steps - leap-heavy; this will read as a figure rather than a tune.

  • 7 degrees, a comfortable span.

  • The top note returns 2 times - the shape has no single summit.

  • 6 of 8 leaps turn back afterwards.

  • 9% of the line restates a figure heard elsewhere.

  • Ends on the second, approached by step.

  • 17 resting points across 4 bars.

  • 3 distinct note lengths.

Where the notes come from

The generator is the Scrapbook, one of the melodic engines in Phonon, ported here unchanged. It is the plainest thing in that rack and the entire algorithm fits in a sentence: it keeps a library of 198 melodic fragments, draws one, puts it down, draws another, and stops when the four bars are full. The fragments come in ten families - heads, tails, arpeggios, runs, turns, leaps, holds, stabs, lines, ostinatos - and the library is the whole product. There is no logic on top of it.

Two details do most of the work. No fragment is a whole bar - they run from one to seven eighths, never eight - so every bar you hear is a combination rather than something a person wrote. And the tiling runs straight through all four bars instead of restarting each one, so fragments straddle barlines and the phrasing stops agreeing with the grid almost immediately.

What matters here is what it does not contain. There is no rule about steps or leaps, no sense of a high point, no idea that a melody ends. It has never heard of a single convention below. That is exactly why it is worth scoring: the number is a measurement rather than a machine marking its own homework.

The conventions

These are conventions, not laws. Each is a description of what most melodies in the Western tonal tradition happen to do, arrived at by looking at a lot of them. Every one has a body of well-loved music that ignores it, which is why each says below when it is broken on purpose.

  1. Mostly steps

    Melodies move mostly by step. Leaps are the exception, and a line built from them stops sounding like a tune and starts sounding like an arpeggiator.

    Why A step is the smallest move that still changes the note, so it is the easiest thing to sing, to hear, and to predict. Predictability is not a flaw in a melody - it is what makes the surprises land.

    Measured as Of every move between consecutive notes, the share that travels exactly one scale degree. Repeated notes are counted separately and belong to neither side.

    Broken when Fanfares, bugle calls and a great deal of jazz sit far below this band on purpose.

  2. A singable range

    Melodies tend to stay inside an octave, and rarely exceed a tenth. Wider than that and most people cannot sing it; narrower than a fifth and there is not much shape to hear.

    Why The convention predates instruments. A tune had to fit an untrained voice or it did not survive being passed on, and the habit stuck long after the constraint stopped applying.

    Measured as The distance in scale degrees from the lowest note to the highest. Seven degrees is an octave.

    Broken when Instrumental writing routinely ignores this. So does anything built to show off.

  3. One high point, arriving late

    A melody usually has a single highest note, and it usually arrives in the second half. The shape most often described is an arch.

    Why A high point is the loudest structural signal a melody has. Spend it once and it organises everything around it; spend it four times and it stops meaning anything.

    Measured as How many notes tie for the highest degree, and where in the line the first of them falls.

    Broken when Ostinatos and riffs repeat their peak by design, and are not trying to be arches.

  4. Leaps get filled in

    After a leap, melodies tend to turn round and come back by step. The bigger the leap, the stronger the pull.

    Why A leap leaves an audible hole between the two notes, and the ear expects it to be filled. This is old enough to have a name in counterpoint teaching - gap fill - and it survives into pop songwriting essentially unchanged.

    Measured as Of every leap of a fourth or more, the share followed by a move in the opposite direction.

    Broken when Consecutive leaps outlining a chord are a different device, and do not owe anything back.

  5. Something comes back

    Melodies repeat themselves. A figure heard once is an event; heard again it becomes the subject of the tune.

    Why Repetition is the only way a listener can tell that a shape was meant rather than incidental. It is also the cheapest memorability there is, which is why almost every melody anyone can hum uses it heavily.

    Measured as Every run of three consecutive moves is compared with every other, matched on both interval and rhythm. The number is the share that occur more than once.

    Broken when Through-composed writing avoids this deliberately, and pays for it in memorability.

  6. It lands somewhere

    Melodies end on a stable note - the tonic most often, the third or fifth when something is meant to stay open - and usually arrive there by step.

    Why Ending is the one moment a melody cannot leave ambiguous. A line that simply stops is heard as interrupted rather than finished, however good everything before it was.

    Measured as The final note's degree within the scale, and whether the last move into it was a step.

    Broken when Fade-outs, loops and vamps are designed not to land. So is an antecedent phrase: Ode to Joy's first four bars end on the second and are answered later, which this row scores as an unresolved ending because in four bars of isolation that is all it can see.

  7. It breathes

    Melodies leave gaps. Rests and held notes divide a line into phrases, and a line with none is exhausting to hear.

    Why Singers have to breathe, so vocal melody was built around the pause, and instrumental melody inherited the shape. The silence is also where a listener catches up.

    Measured as Places where a note is held a beat or longer, or a gap of at least half a beat opens, counted per bar.

    Broken when Perpetual-motion writing is a real style, and does this on purpose.

  8. A small rhythmic vocabulary

    Melodies reuse a few note lengths rather than drawing on all of them. Two to four is typical across a whole tune.

    Why Rhythm is what makes a figure recognisable when the pitches change. That only works if there is a rhythm to recognise, which needs the vocabulary to be small enough to learn in a few bars.

    Measured as How many distinct note lengths appear, counted to the nearest sixteenth.

    Broken when Rubato and free playing dissolve this measure entirely.

What the score is not

It is not a judgement of the melody. It counts how closely a line follows eight habits, and habits are not merit. A tune scoring three may be the best thing you write this year, and one scoring ten can be furniture.

The total is a flat average of whatever applies, which is a decision rather than a fact: it says landing an ending matters exactly as much as keeping a small rhythmic vocabulary. That is defensible and not obviously true, and it is stated here rather than hidden because you should be able to disagree with it.

There is also a limit the rubric cannot get past. Four bars is not long enough to tell an unfinished phrase from a phrase that ends openly on purpose. The first four bars of Ode to Joy end on the second degree, waiting to be answered, and Lilt marks them down for not landing - correctly, by its own measure, and wrongly by any musical one.

Things worth trying

  • Turn Repeat up and watch “Something comes back” climb. It is the only dial that moves a convention directly, because repetition is the one habit the generator accidentally has.
  • Watch “It lands somewhere” refuse to move whatever you do. The engine has no concept of an ending, so it arrives wherever the last fragment happened to stop. This is the clearest thing on the page: it is precisely the gap between assembling material and writing a melody.
  • Press New melody a dozen times and notice how often “Mostly steps” scores badly. The library is built from arpeggios, leaps and stabs, so it makes figures more readily than it makes singing lines.
  • Then take a line you like into a DAW, fix the ending by hand, and see what one edit does to the score.