Melody from Chords

Generate a chord progression or enter your own, then generate a melody that follows the harmony.
1. Key and chords
Add chords by hand
Chords of the current key (tap to add)
2. Melody
Result
Press "Generate melody".
Chord generator: follows functional harmony (tonic, pre-dominant, dominant), avoids repeating the same chord, puts a half cadence at the end of every 4-bar phrase and a full cadence (pre-dominant, V, then I) at the very end. "Sevenths" uses diatonic seventh chords. "Jazz" adds secondary dominants (like D7 before G) and an occasional borrowed minor iv. "Repeat phrases" reuses the middle of earlier phrases so it sounds like a song, not a random walk. The Roman numerals above the chord box show the harmony. Melody: the rhythm repeats in 4-bar phrases, strong beats land on chord tones, the melody moves mostly by step and echoes its shape in the second bar of each phrase, and every phrase ends on the chord root. Syncopation: notes are attacked on the off-beats and accented. Ties: a short note at the end of a bar can anticipate the next chord and be held across the barline. In the result, ~ after a note means it is tied to the next one, and ~ before a note means it continues the previous note without a new attack. Chords always play as piano; pick the melody sound from the list.