Creators · Guides
How to find the key and scale of a hummed melody, so the notes fit a song.
Work out the key and scale of a melody you hummed: major vs minor, relative keys, finding the tonic by ear and snapping to a scale.
Key takeaways
- A key is the home note and scale that a melody belongs to. Knowing it lets you fix wrong notes and build chords.
- A major key and its relative minor share the same notes, so telling A minor from C major takes listening for the home note.
- Count which notes appear, and find the one the melody rests on.
- Snapping to a scale cleans a rough hum, but only if the key is right.
Why the key matters
Once you know the key, you know which notes sound "right" together. A hummed melody often contains a few wobbly notes that are slightly off. If you know the scale, you can nudge those to the nearest correct note and the melody sounds intentional.
Scales in one minute
A major scale follows a pattern of whole and half steps: whole, whole, half, whole, whole, whole, half. Starting on C, that gives C D E F G A B, the white keys of a piano.
A natural minor scale uses the pattern: whole, half, whole, whole, half, whole, whole. Starting on A, it gives A B C D E F G, also the white keys.
So C major and A minor use the same notes. They are relative keys. The difference is which note feels like home.
Step 1: collect the notes
Sing or play the melody, and write down the notes that appear. In a piano roll, look at the lowest and highest, and the ones that repeat. A MIDI conversion from your voice gives you this list quickly. See turning humming into MIDI.
Step 2: find candidate keys
Match the set of notes against scales. If a melody uses only the notes C D E F G A B, it fits C major or A minor. If it includes an F sharp, it no longer fits C major and might be G major or E minor.
Step 3: find the tonic
The tonic is the note that feels like the end. Hum the melody and notice where it feels finished. Often it is the last note, or the note the melody returns to most. Test by playing that note under the tune: does it sound at rest?
- If the home note is C and the third above is E, think major.
- If the home note is A and the third above is C, think minor.
Major tends to sound brighter, and minor darker or sadder, although this is a tendency, not a rule.
Step 4: use a helper
Many DAWs and tools can detect or suggest a key from notes. FL Studio has scale highlighting and a Piano Roll helper. Standalone tools can analyse the notes. Treat their answer as a hypothesis and confirm by ear.
Step 5: snap to the scale
With the key set, quantise pitch to scale notes. Notes that land outside the scale move to the nearest valid note. If the key was wrong, this will damage the melody, so listen after snapping.
Common mistakes
- Choosing the relative major when the melody is minor, or the reverse.
- Forgetting accidentals from modes or borrowed notes, which are valid but outside the scale.
- Trusting automatic detection on only a few notes.
- Snapping before fixing octave errors.
- Assuming the first note is the tonic.
Tools and limits
A short or ambiguous melody can fit several keys. Pitch detection also makes errors on a wobbly hum, which affects the note list. See how pitch detection works. PitchPen suggests a key from the notes it hears, but it is a personal project and a suggestion, not a verdict.
Frequently asked questions
What if my melody uses notes from two keys?
That is common in real music, through modulation or borrowed chords. Choose the key that fits most of it and treat the rest as accidentals.
Do I need music theory?
Basic ideas help, but your ear is the final judge.
Does the key change the tempo?
No. Key and tempo are independent.
PitchPen suggests a key from the notes you hum.
See PitchPen