Song Key Finder: Detect Major or Minor Keys

Major and minor key analyzer

Song Key Finder

Select the notes you hear or analyze a live microphone signal to estimate the most likely musical key.

Microphone audio stays on this device

Select notes manually

Choose every pitch class that appears clearly in the melody, bass line, or chord progression.

0/12

Analyze microphone input

Play a clear section with melody or harmony. Longer, varied passages usually provide stronger evidence.

Ready

Your browser will request microphone permission. Audio is analyzed locally and is not uploaded or recorded.

Medium
Raise it when background noise adds unwanted notes.
Waiting for a clear pitch

Most likely key

Ready
0%Confidence
Tonic
Mode
Relative key

Scale profile

Notes in the estimated major or natural minor scale.

Run an analysis to view the scale.

Pitch-class distribution

Relative weight of each observed pitch class.

C
0%
C♯
0%
D
0%
D♯
0%
E
0%
F
0%
F♯
0%
G
0%
G♯
0%
A
0%
A♯
0%
B
0%

Alternative candidates

Other keys with similar pitch-class profiles.

No candidates yet.

Analysis summary

Evidence collected for the current result.

Notes observed0
Strongest note
Duration0s
Ambiguity

Recent analyses

Stored only in this browser tab.

Completed analyses will appear here.

Song Key Finder

Use this song key finder to estimate a piece of music’s most likely major or minor key. You can either select the notes you hear or analyze live sound through your microphone.

The result includes the estimated key, tonic, mode, relative key, confidence score, scale notes, pitch-class distribution, and four alternative candidates. Unlike many online key detectors that require an uploaded audio file and focus on BPM or Camelot codes, this tool is designed for manual note entry and live microphone analysis.

How to Use the Song Key Finder

Find a key by selecting notes

  1. Listen for notes in the melody, bass line, or chord progression.
  2. Select the corresponding note buttons from C through B.
  3. Choose at least three different notes.
  4. Select Analyze selected notes.
  5. Review the most likely key and alternative candidates.

The buttons represent pitch classes, so octave does not matter. A low C, middle C, and high C all count as C.

Each manually selected note receives equal weight. Selecting C, E, and G, for example, tells the analyzer that all three pitch classes are present; it does not tell the tool which note lasted longest or appeared most often.

Find a key with your microphone

  1. Set the noise gate to suit your room.
  2. Select Start microphone and grant browser permission.
  3. Play a section containing several notes from the melody or harmony.
  4. Let the analysis continue long enough to collect varied tonal evidence.
  5. Select Stop analysis to finalize and save the result in the current tab.

Microphone mode accepts detected fundamentals from approximately 45 to 2500 Hz. It converts each accepted note to one of the 12 pitch classes and gives repeatedly observed notes more weight.

A full phrase or chord progression is usually more informative than one note or one chord. Automated key estimation can be uncertain because musical key depends on tonal relationships and context, not merely on the presence of individual notes.

Manual Notes vs Microphone Analysis

MethodBest forHow notes are weighted
Manual selectionMelodies or progressions you have already worked outEvery selected pitch class has equal weight
MicrophoneLive singing, instruments, or music played near the deviceRepeated observations accumulate more weight

Manual mode requires at least three pitch classes. Microphone mode also needs at least three clearly detected pitch classes before it can finalize a useful estimate.

The plugin does not upload audio files or analyze links. It listens only through the live microphone when you start that mode.

How the Key Estimate Is Calculated

The analyzer evaluates all 24 major and minor possibilities: 12 possible tonics multiplied by two modes.

1. Detecting microphone notes

Microphone mode measures the incoming waveform and ignores signals below the selected noise-gate threshold. It then searches for repeating waveform patterns to estimate the fundamental frequency.

The frequency is converted to a MIDI-style note number using a fixed reference of A4 = 440 Hz:

MIDI note = round(69 + 12 × log₂(frequency ÷ 440))

The note number is then reduced to a pitch class from 0 to 11, representing C through B. Octave information is intentionally discarded because musical-key analysis compares note classes rather than specific registers.

Repeated observations add weight to the distribution. Successive detected notes within two semitones of one another receive a small continuity multiplier of 1.15.

2. Building a pitch-class profile

The 12 note weights are mean-centered and normalized. This prevents overall volume or observation count from dominating the comparison and emphasizes the shape of the pitch distribution.

The analyzer compares that distribution with established major and minor tonal profiles associated with research into perceived tonal hierarchy. Krumhansl’s work examines how listeners organize pitches according to their functions within musical keys.

The major and minor profiles are rotated through every possible tonic. Their similarity scores are ranked, and the highest-scoring candidate becomes the displayed Most likely key.

How to Read the Results

ResultMeaning
Most likely keyThe highest-ranked tonic and mode
TonicThe estimated tonal center
ModeMajor or minor
Relative keyThe related minor or major key using the same seven scale notes
ConfidenceAn internal measure of score strength, separation, and available evidence
Scale profileSeven notes in the estimated major or natural minor scale
Alternative candidatesThe next four highest-ranked keys

Confidence and ambiguity

Confidence considers three factors:

  • The leading candidate’s profile score
  • The gap between the first and second candidates
  • The amount and variety of note evidence

The displayed confidence is constrained to 8%–96%. It is not a scientifically calibrated probability that the answer is correct.

The tool marks a result as ambiguous when confidence is below 58% or when the score gap between the two leading candidates is below 0.045. It provides a separate message when the relative major or minor candidate is especially close.

Alternative “fit” percentages are profile-similarity indicators. They should not be interpreted as probabilities that add up to 100%.

Scale profile

The scale profile displays seven notes from the estimated major or natural minor scale, with the tonic highlighted.

This is the expected scale for the candidate key, not a claim that every note in the song must belong to it. Real music can contain chromatic passing notes, borrowed chords, altered tones, and temporary tonicizations.

Pitch-class distribution

The distribution bars show each observed note’s weight relative to the strongest pitch class. The strongest note is displayed as 100%, and the other bars are scaled against it.

These are relative strengths, not percentages of the total song. The strongest observed note is also not automatically the tonic: a melody or arrangement may emphasize another scale degree more often.

Why Relative Keys Can Be Hard to Distinguish

Relative major and minor keys contain the same seven pitch classes. C major and A minor, for example, both use the white notes of the piano, but they organize those notes around different tonal centers.

A pitch-class distribution may therefore fit both keys closely. The stronger clue is usually musical function: where phrases resolve, which note appears in the bass at important moments, and which chords create a sense of departure and return.

When the result is ambiguous:

  • Compare the leading key with its relative key.
  • Listen for the note that sounds most settled or final.
  • Analyze a section containing the ending of a phrase.
  • Include more of the bass and harmony.
  • Avoid relying only on an intro, solo, or transitional passage.

Improving the Key Estimate

Use a passage with enough musical variety to reveal a tonal center. A sustained note cannot establish a key, and one chord may belong to several keys.

For microphone analysis:

  • Reduce background speech and unrelated music.
  • Use a lower noise gate for quiet sources.
  • Raise the noise gate if room noise adds unwanted notes.
  • Play melody and harmony clearly rather than a dense, distorted mix.
  • Continue until several distinct pitch classes appear.
  • Compare the alternatives instead of relying only on the first result.

For manual analysis, select notes that clearly belong to the recurring melody, bass line, or progression. Avoid adding every brief ornament unless it is structurally important.

Analysis Summary and History

The summary displays:

  • Notes observed: Number of distinct pitch classes with evidence
  • Strongest note: Pitch class with the highest weight
  • Duration: Length of microphone analysis; manual analyses show 0 seconds
  • Ambiguity: Whether competing candidates fit closely

Selecting Stop analysis saves the completed microphone result. Manual results are saved when you analyze the selected notes.

Recent history stores the key, confidence, input source, and analysis time. It retains up to eight results in sessionStorage, so the records are limited to the current browser tab rather than a permanent account.

What This Tool Does Not Detect

This song key detector estimates major and minor tonal centers. It does not:

  • Detect individual chords
  • Calculate BPM or tempo
  • Produce Camelot codes
  • Identify a song title or artist
  • Analyze uploaded audio files
  • Read streaming-service links
  • Detect modes such as Dorian or Mixolydian
  • Transpose or modify audio
  • Record or play back microphone sound
  • Track separate key changes throughout a song

Songs that modulate may produce a mixed distribution or a result favoring whichever key dominates the analyzed passage. Analyze separate sections when you suspect a key change.

Privacy and Browser Requirements

Live analysis requires microphone permission. Audio is processed locally in the browser and is not uploaded or recorded.

The tool requires JavaScript, the Web Audio API, and an available microphone. Browser permission settings, a missing input device, or another application using the microphone can prevent analysis.

Frequently Asked Questions

How do I find the key of a song from its notes?

Select at least three pitch classes that occur in the melody, bass, or harmony, then run the manual analysis. The tool compares that note set with all 12 major and 12 minor key profiles.

Can one note tell me the key of a song?

No. One note can belong to many major and minor keys, so it does not provide enough tonal context. The plugin requires at least three distinct notes, although more meaningful musical evidence usually produces a stronger estimate.

Can one chord reveal a song’s key?

Usually not with certainty. A major or minor chord can function in several different keys, so surrounding melody, bass movement, and chord progression are needed to identify the tonal center.

What is the tonic?

The tonic is the note treated as the tonal center or point of resolution. It names the key, so C is the tonic of C major and C minor.

Why does the tool show a relative key?

Relative major and minor keys share the same seven scale notes but have different tonics. Because their pitch-class profiles can be similar, the relative key is important when interpreting an ambiguous result.

What does the confidence score mean?

It summarizes the leading profile score, its separation from the runner-up, and the amount of evidence collected. It is an internal ranking indicator, not a guaranteed accuracy percentage.

Is the strongest detected note always the key?

No. The strongest note is simply the pitch class with the greatest observation weight. A song may repeat another scale degree more often than its tonic.

Can the key finder detect a song that changes key?

It does not label separate modulations. The result represents the strongest overall major or minor profile in the analyzed passage, so analyze different sections separately when a song changes tonal center.

Does the microphone audio leave my device?

No. The plugin analyzes live microphone input locally and does not upload or record it. Only small result summaries are stored temporarily in the current browser tab.

Scroll to Top