Stuck for a tune? Pick a key, scale, time signature and how busy the rhythm should be, and get a fresh melody written out as sheet music and played over a chord progression. Regenerate single bars you don't like, then download the melody as a MIDI file for your DAW.
Last updated:
Regenerate one bar:
Notes (letter names)
Advertisement
Advertisement
How to use the Melody Generator
Choose a key and scale, for example A natural minor or G major pentatonic.
Set the shape: time signature, number of bars, rhythm density, contour and range.
Pick a chord progression. The list updates with the right chords for your key, and the melody leans on their chord tones.
Click Generate melody and press Play. Click a bar number under the score to rewrite just that bar.
Download MIDI to drag the melody into a DAW, or MusicXML to open it in notation software.
What makes a melody sound good?
There is no formula for a great tune, but most memorable melodies share a few habits, and this generator builds them in so that even a random melody sounds musical:
Mostly steps, a few leaps. Moving to the next scale note up or down is the most common motion in almost every musical style. Leaps add energy, and after a big leap melodies usually step back in the opposite direction ("gap fill").
Chord tones on strong beats. The first beat of a bar (and beat 3 in 4/4) is where the ear checks the harmony. Landing on the root, third or fifth of the chord there sounds stable; passing notes between them sound fine on weak beats.
A clear shape. An arch that climbs to a single high point and comes back down is the classic melodic contour. Rising lines build tension, falling lines relax it.
Phrases and cadences. In 8 and 16-bar melodies every fourth bar ends on a longer chord tone, like a comma, and the final bar ends on the tonic, like a full stop.
Limited repetition. Repeating a note once can be catchy; repeating it many times in a row usually is not, so repeated notes are made less likely each time.
Scales and the chords that go with them
Scale
Notes in C
Character
Typical chords (in C)
Major
C D E F G A B
Bright, happy, settled
C, F, G, Am
Natural minor
C D E♭ F G A♭ B♭
Dark, sad, serious
Cm, A♭, E♭, B♭
Harmonic minor
C D E♭ F G A♭ B
Dramatic, classical, exotic
Cm, Fm, G, A♭
Major pentatonic
C D E G A
Open, folk, country, pop hooks
C, F, G, Am
Minor pentatonic
C E♭ F G B♭
Rock and blues riffs
Cm, A♭, B♭
Blues
C E♭ F G♭ G B♭
Gritty, bluesy "blue note"
Cm, Fm, B♭
Dorian
C D E♭ F G A B♭
Minor but hopeful, funk, jazz
Cm, F, Gm, B♭
Mixolydian
C D E F G A B♭
Major with a rock or Celtic edge
C, B♭, F, Gm
Tips for turning a generated melody into a song
Generate several 4-bar ideas, keep the one you like best, then regenerate only bars 3 and 4 to get a "question and answer" pair.
Use Sparse density for a vocal chorus (singers need long notes) and Busy for an instrumental riff.
Copy the letter names to write lyrics under the notes, or download MIDI and change the rhythm in your DAW so it fits the words.
Try the same melody over a different progression: the notes stay, but the chord symbols and accompaniment change its mood.
Frequently asked questions
How does the melody generator decide which notes to use?
Every note comes from the scale you choose. For each new note it weighs the possibilities: small steps are more likely than leaps, a large leap tends to be followed by a step back the other way, notes on strong beats prefer the tones of the current chord, the overall height follows the contour you picked, and the last note lands on the tonic so the melody sounds finished.
Can I use the generated melodies in my own songs?
Yes. The melodies are created randomly in your browser from simple musical rules, not copied from existing songs, so you are free to use, edit and release them. Short scale-based phrases can of course resemble other tunes by coincidence, so treat the output as a starting idea and make it your own.
What is the difference between the scales?
Major sounds bright and settled. Natural minor is darker; harmonic minor raises the 7th for a stronger pull home and a slightly exotic sound. The pentatonic scales leave out the two notes that cause the most tension, which makes them almost impossible to sound wrong. Blues adds the flat 5th 'blue note' to minor pentatonic. Dorian is minor with a brighter 6th, and Mixolydian is major with a flat 7th, common in rock and folk.
How do I import the melody into a DAW like GarageBand, FL Studio or Ableton?
Click Download MIDI and drag the .mid file into your project. It contains a melody track and, unless accompaniment is off, a chord track, plus the tempo, time signature and key signature. You can then assign any virtual instrument to each track.
What does rhythm density change?
It changes which rhythm patterns are likely. Sparse favours half and quarter notes, Medium mixes quarters, eighths and dotted rhythms, and Busy adds many eighths and 16th notes. Rests are slightly more common in sparse melodies to leave room to breathe.
Why does the tempo in 6/8 feel faster?
In 6/8 the beat is a dotted quarter note (three eighth notes), so the BPM counts dotted quarters. 100 BPM in 6/8 means 100 groups of three eighths per minute, which is how 6/8 is normally counted.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.