Skip to content

Melody, Motifs & Hooks

If the progression is the backend and harmony is the styling, the melody is the user-facing surface — the part people actually remember and sing back. This chapter covers how a single-note line stays consonant with the chords beneath it, how small reusable cells (motifs) build memorability, and how MidiSketch dials repetition up into an outright hook.

Melody

A melody is a single sequence of notes heard as the "tune" of a song — the line you hum. Unlike a chord, only one melody note sounds at a time, and the listener follows its contour (the up-and-down shape) over time. A good melody balances stable notes that agree with the harmony against moving notes that create forward motion.

Chord tones: the safe notes

The relationship between a melody note and the chord under it determines whether it sounds resolved or tense. The safest notes are the ones already in the chord.

Chord tone vs non-chord tone

A chord tone is a melody note that belongs to the chord sounding underneath it — over a C chord, the notes C, E, and G are chord tones and can never clash. A non-chord tone (NCT) is any melody note outside that chord; it introduces tension against the harmony. Landing on chord tones feels stable and arrived; the trick to good melody is how you use the notes in between.

Chord tonesA melody made of chord tones only
When the harmony is a C chord, the notes C, E, and G are "safe" — they belong to the chord and can never clash with it. MidiSketch's piano-roll safety API colors exactly these notes green.
chord toneEvery melody note belongs to the underlying C chord — guaranteed consonance.

Chord tones guarantee consonance, which is why MidiSketch's piano-roll safety API colors them green. A line built only from chord tones is safe but can sound stiff — which is where non-chord tones come in.

Passing tones: connecting tissue

A melody made purely of chord tones leaps between safe notes. Filling the gaps with brief outside notes is what makes a line flow.

Passing tone

A passing tone is a non-chord tone used to step smoothly between two chord tones — for example, sliding C → D → E, where D is the passing tone bridging the two chord tones. Passing tones work because they appear briefly, on weak beats, while the music is in motion. They add melodic motion and singability without destabilizing the harmony, since the ear hears them as "on the way" rather than "arrived".

Passing tonesNon-chord tones as connecting tissue
Melodies that use only chord tones sound stiff. Notes outside the chord (here D and F) add motion — as long as they pass between stable notes on weak beats. Tension on the way, arrival on chord tones.
passing toneNCTD and F are not in the C chord, but passing between chord tones makes them musical.

The pattern is tension on the way, arrival on chord tones. This is also how the safety API distinguishes a tasteful passing note (a fleeting yellow tension) from a genuine clash (red dissonance) on a strong beat.

Motifs and sequences: memorability through reuse

Melodies are not random note streams; they are built from small recognizable cells that the song restates and transforms.

Motif

A motif is a short melodic cell — typically 2 to 8 notes — that a song reuses and varies throughout. It is the smallest memorable unit of melody, the "hook in miniature". Because the listener recognizes a motif on its return, restating it (in the same or altered form) is the primary tool for making a tune feel coherent and catchy rather than meandering.

Sequence (melodic)

A sequence is the simplest motif transformation: repeat the same melodic shape starting on a different scale degree. If a four-note motif is restated one step higher with its contour intact, that restatement is a sequence. Sequences let a song develop forward momentum while keeping the listener oriented, because the shape stays familiar even as the pitches climb or fall.

MotifA motif and its sequence
A motif is a short melodic cell (often 2-8 notes) that a song reuses and transforms. The simplest transformation is the sequence: repeat the shape starting on a different degree. MidiSketch generates motif tracks and can lock them across regenerations with keepMotif.
motifkeepMotifThe same four-note shape repeats one scale step higher — instantly memorable.

MidiSketch generates motif tracks and exposes several controls over their shape — motifLength, motifNoteCount, motifMotion, motifRhythmDensity — plus motifRepeatScope (0 = FullSong, 1 = Section) to decide how widely a motif recurs. In the RhythmSync paradigm, keepMotif locks the existing motif as the rhythmic axis so you can regenerate the vocal around a fixed groove.

Phrases, hooks, and the chorus payoff

Zoom out from the motif and you get the phrase — the melodic "sentence" — and, in the chorus, its most concentrated form, the hook.

Phrase

A phrase is a complete melodic thought, the musical equivalent of a sentence — usually a few bars long and ending with a sense of pause or breath. Phrases are built from motifs and typically span 2 to 8 bars. A song's verse and chorus are stitched together from these phrase-sized units.

Hook

A hook is the phrase listeners can hum after a single play: compact in range, punchy in rhythm, and heavy on repetition. It is engineered for stickiness, usually living in the chorus. The hook concentrates everything memorable about a melody into a few bars that the song hammers home.

HookA chorus hook over two chords
A hook is the phrase listeners hum after one listen: compact range, punchy rhythm, lots of repetition. MidiSketch's hookIntensity (0-4) controls how aggressively the chorus repeats its hook material.
hookIntensityShort, rhythmic, repeated notes around one peak — the anatomy of a hook.

MidiSketch's hookIntensity (0 = Off, 1 = Light, 2 = Normal, 3 = Strong, 4 = Maximum) controls how aggressively the chorus repeats its hook material; the default is 2 (Normal). The BehavioralLoop blueprint / addictiveMode pushes this toward Maximum automatically.

Call and response: phrases in dialogue

Phrases often pair up into a question-and-answer structure, a device that powers everything from blues to idol-music crowd chants.

Call and response

Call and response is a phrase structure where a first phrase (the call, often rising and open-ended) is answered by a second (the response, often falling and conclusive). The pair feels like a question and its reply. It creates a built-in sense of dialogue and resolution, and underpins audience participation in many pop and idol styles.

Call & responseA call phrase and its answer
Phrases often pair up: a call (rising, open-ended) and a response (falling, conclusive). The same idea powers idol-music crowd calls — MidiSketch's call system (callSetting) inserts response shouts, and the CallResponse melody template builds duet-style phrasing.
callSettingCallResponseThe rising "question" is answered by a falling phrase that lands at home.

MidiSketch's call system is governed by callSetting (0 = Auto, 1 = Enabled, 2 = Disabled), which inserts response shouts; the CallResponse melody template (id 6, of melodyTemplate 0 = Auto, 1-7) builds duet-style call-and-answer phrasing directly.

Repetition as a dial

Finally, remember that repetition itself is a continuous parameter, not a yes/no switch. The same harmony can carry a free-flowing line or an obsessively tight loop.

Hook intensitySparse melody versus maximum repetition
The same harmony can carry a long, lyrical line (hookIntensity 0) or a tight loop that repeats almost to the point of obsession (hookIntensity 4, used by the BehavioralLoop blueprint). Repetition is a dial, not a yes/no.
hookIntensityhookIntensity 0 flows freely; 4 (Maximum) hammers one cell relentlessly.

At hookIntensity 0 the line flows freely; at 4 (Maximum) it hammers a single cell relentlessly. Alongside this, finer melody controls let you shape the line directly: melodyMaxLeap (0 = preset, 1-12 semitones) caps how far the melody jumps, melodyPhraseLength (0 = preset, 1-8 bars) sets phrase length, and melodyHookRepetition (0 = preset, 1 = off, 2 = on) toggles hook repetition explicitly.

Common pitfall — motifLength is in bars, and only 0/1/2/4

motifLength is measured in bars, not beats or notes, and accepts only 0 (auto), 1, 2, or 4. A value like 3 is not "three beats" — it is out of range and validateConfig rejects it. Use motifNoteCount (38) to control how many notes the cell has.

MidiSketch mapping

ConceptMidiSketch controlValues
Hook repetition strengthhookIntensity0 = Off, 1 = Light, 2 = Normal (default), 3 = Strong, 4 = Maximum
Melodic shaping templatemelodyTemplate0 = Auto, 1-7 (id 6 = CallResponse)
Lock motif as rhythmic axiskeepMotifRhythmSync paradigm only
Motif shapemotifLength / motifNoteCountlength 0 = auto / 1/2/4 bars; count 0 = auto / 3-8
Maximum melodic leapmelodyMaxLeap0 = preset, 1-12 semitones
Call & responsecallSetting0 = Auto, 1 = Enabled, 2 = Disabled

Engine reference: Melody Evaluation and Track Generators