Home › Audio & Video › Melody Generator

Melody Generator

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

  1. Choose a key and scale, for example A natural minor or G major pentatonic.
  2. Set the shape: time signature, number of bars, rhythm density, contour and range.
  3. Pick a chord progression. The list updates with the right chords for your key, and the melody leans on their chord tones.
  4. Click Generate melody and press Play. Click a bar number under the score to rewrite just that bar.
  5. 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

ScaleNotes in CCharacterTypical chords (in C)
MajorC D E F G A BBright, happy, settledC, F, G, Am
Natural minorC D E♭ F G A♭ B♭Dark, sad, seriousCm, A♭, E♭, B♭
Harmonic minorC D E♭ F G A♭ BDramatic, classical, exoticCm, Fm, G, A♭
Major pentatonicC D E G AOpen, folk, country, pop hooksC, F, G, Am
Minor pentatonicC E♭ F G B♭Rock and blues riffsCm, A♭, B♭
BluesC E♭ F G♭ G B♭Gritty, bluesy "blue note"Cm, Fm, B♭
DorianC D E♭ F G A B♭Minor but hopeful, funk, jazzCm, F, Gm, B♭
MixolydianC D E F G A B♭Major with a rock or Celtic edgeC, 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.

Related tools

Chord Progression GeneratorGenerate chord progressions by key, mode and mood, hear them on piano or guitar and export MIDI.MIDI to Sheet MusicTurn a MIDI file into readable sheet music and download it as PDF, PNG or MusicXML.Scale FinderSee any music scale on piano and guitar fretboard, with notes, formula, chords and playback.Sheet Music MakerWrite sheet music by clicking notes or typing ABC; add lyrics and chords, play it, save PDF, MIDI or MusicXML.Guitar TunerTune your guitar with your microphone, in standard or alternate tunings.Chromatic TunerTune any instrument or voice: detects every note from C0 to C8.Ukulele TunerTune a ukulele to GCEA, low G, baritone DGBE or D tuning by microphone.Online MetronomeKeep time with BPM control and tap tempo.Violin TunerTune your violin with the microphone: G D A E with a cents meter and reference tones.Bass TunerTune 4, 5 and 6-string bass guitars with your microphone, reference tones and drop D.Online PianoPlay a virtual piano with your mouse, touch or computer keyboard and record a WAV.Drum MachineMake beats with a 16-step drum sequencer, synthesized kits, swing and WAV export.Chord FinderGuitar chord charts and piano chords for every key, with notes, formulas and sound.Chord TransposerPaste a chord sheet and transpose every chord to a new key, with capo tips and aligned output.BPM FinderFind the tempo of any song: analyze an audio file for its BPM or tap along to the beat.BPM to MS CalculatorNote lengths in milliseconds and Hz for any tempo: straight, dotted and triplet delay times.Note Frequency CalculatorConvert notes to Hz and Hz to the nearest note with cents, MIDI number and adjustable A4.Banjo TunerTune a 5-string banjo with your microphone in Open G, Double C, Open D and more.Interactive Circle of FifthsClickable circle of fifths with key signatures, relative minors, diatonic chords and playback.Ear TrainingInterval, chord and scale recognition drills with levels, scoring, streaks and weak-spot stats.Guitar Chord Diagram MakerDraw guitar chord box diagrams with fingers, barres and muted strings; export PNG or SVG.Guitar Fretboard TrainerLearn every note on the guitar neck: quizzes, scale and arpeggio overlays, alternate tunings, sound.Note Reading TrainerSight-reading drills for treble and bass clef: name notes with buttons, piano or MIDI, timed scores.Online GuitarPlay a virtual guitar: strum chords with your keyboard or mouse, pick notes on a real fretboard.Online SynthesizerPolyphonic browser synth with 2 oscillators, ADSR, filter, LFO, presets, MIDI and WAV recording.Song Key FinderFind the key, scale, Camelot code and BPM of any song from an audio file, privately.Tanpura DroneEndless tanpura or shruti drone in any key with Pa, Ma or Ni tuning, tempo and jawari for riyaz.Virtual Drum KitPlay a drum set with your keyboard or touch pads, then record a beat, play it back and save it.Vocal Range TestSing your lowest and highest notes to find your vocal range and closest voice type.432 Hz ConverterRetune any song from A=440 Hz to 432 Hz (or 444, 528…) with a precise pitch shift; save MP3 or WAV.Capo CalculatorSee the real chords your capo shapes make, or find the best capo fret and shapes for a key.Guitar Tab MakerWrite guitar tabs by clicking a fretboard or typing text, hear them played back, save TXT or PDF.Music Streaming Royalty CalculatorEstimate streaming royalties by platform after distributor fees and splits, or streams needed.Online DJ MixerTwo-deck DJ mixer for your own audio files: BPM sync, EQ, crossfader, loops, cues and mix recording.Online LaunchpadPlay an 8x8 beat pad with drum, synth and vocal kits, loops, your own samples and WAV recording.Piano Chord ChartEvery piano chord on a keyboard diagram with notes, fingering, inversions and sound.Singing Pitch TrainerSing into your mic and see your pitch on a piano roll against target notes, with cents and a score.Ukulele Chord ChartUkulele chord diagrams with finger numbers, several shapes, strum sound and printable charts.Guitar Amp SimulatorPlay your guitar through amp models, cabinet, delay, reverb and noise gate right in your browser.Music Interval CalculatorName the interval between two notes, or find the note a given interval above or below.Piano Letter Notes PlayerPaste piano letter notes or virtual piano sheets and hear them played with key highlighting.LRC Lyrics MakerMake synced .lrc lyrics: play a song, tap to timestamp each line or word, preview and download.Music Theory QuizQuiz yourself on note names, key signatures, intervals, chords and scales with staff and keyboard.Polyrhythm MetronomePractise 3:2, 4:3, 5:4, 7:4 and other polyrhythms with distinct sounds and a circular visualizer.Song Chord DetectorUpload a song to detect its chords over time, follow them during playback and save a chord chart.Song Practice PlayerSlow down songs without changing pitch, transpose, A-B loop and speed up gradually as you learn.Tempo Change CalculatorConvert a BPM change to percent speed, semitone and cents pitch shift and new song length.Transposing Instrument CalculatorConvert notes and keys between concert pitch and B♭, E♭, F and A instruments, both ways.CPR Metronome110 BPM CPR compression metronome with 30:2 cycle counter, breath pauses and voice prompts.Calming Music for DogsEndless slow, soothing music for anxious dogs and cats, with sleep timer and gentle fade-out.Mindfulness BellGentle bell chimes at fixed or random intervals through the day, with quiet hours and prompts.Audio to Sheet MusicTranscribe a melody or simple piano recording into sheet music; save as PDF, MIDI or MusicXML.Backing Track GeneratorMake jam tracks from any chord progression: drums, bass and chords in any key and tempo.Camelot WheelInteractive Camelot wheel: click a key to see harmonic mixes, convert keys to Camelot and Open Key.Chord Chart MakerTurn lyrics with chords into clean printable chord sheets; transpose, add chord diagrams, export PDF.
See all 56 Music Theory & Instruments →