# Audio Key Detector

Detect the musical key of a track

> Canonical page: https://elysiatools.com/en/tools/audio-key-detector

- **Category:** Media

- **Keywords:** audio, key, tonality, analysis, music

## Overview

Analyzes pitch-class energy over time and matches it to major/minor key profiles.

## Inputs

- **Audio File** (file): Select an audio file
- **Analysis Seconds** (text): e.g., 90

## When to use

- When preparing tracks for harmonic mixing in DJ sets.
- When analyzing audio samples to ensure they match a project's key.
- When studying music theory to identify the tonality of recordings.

## How it works

- Upload an audio file in a supported format like MP3 or WAV.
- The tool analyzes pitch-class energy distribution over time.
- It matches the energy profile to major and minor key templates.
- Outputs the detected key in JSON format for easy integration.

## Use cases

- Harmonic mixing for DJs to create seamless transitions between tracks.
- Music production to align samples and loops in the same key.
- Educational analysis for students to identify keys in musical pieces.

## Frequently asked questions

### What audio formats are supported?

Common audio formats such as MP3, WAV, and others under the audio/* type.

### How accurate is the key detection?

It uses pitch-class energy analysis for reliable matching to major and minor keys.

### Can I analyze only a portion of the audio?

Yes, use the analysisSeconds option to specify the duration to analyze, defaulting to 90 seconds.

### What does the output look like?

A JSON object with the detected key, e.g., {"key": "C major"}.

### Is there a file size limit?

Yes, audio files must be under 200 MB.

## Related tools

- [Audio BPM Detector](https://elysiatools.com/en/tools/audio-bpm-detector): Detect the beats per minute (BPM) of a music track
- [Audio Dropout Detector](https://elysiatools.com/en/tools/audio-dropout-detector): Detect brief signal dropouts and silent gaps in audio
- [Audio Dynamic Range Report](https://elysiatools.com/en/tools/audio-dynamic-range-report): Analyze and report on the dynamic range of an audio file
- [Audio Loudness Report (LUFS)](https://elysiatools.com/en/tools/audio-loudness-report): Generate a report on the loudness (LUFS) and dynamic range
- [Audio Peak Detector](https://elysiatools.com/en/tools/audio-peak-detector): Find the peak volume level in an audio file
- [Audio Silence Report](https://elysiatools.com/en/tools/audio-silence-report): Generate a report of silent sections in an audio file
- [Audio Chord Progression Detector](https://elysiatools.com/en/tools/audio-chord-progression-detector): Estimate an audio file's chord sequence locally and download CSV, JSON, SVG, and method notes in one ZIP.
- [Audio Voice Cleanup Assistant](https://elysiatools.com/en/tools/audio-voice-cleanup-assistant): Analyze voice issues and suggest a processing chain, with a before/after preview of the cleaned audio.

## Samples

- [Copyright-Free FLAC Audio Samples](https://elysiatools.com/en/samples/flac-samples): Lossless FLAC audio samples for testing and development, mirrored from MP3 set with nature sounds and meditation music
- [Copyright-Free MP3 Audio Samples](https://elysiatools.com/en/samples/mp3-samples): Collection of royalty-free audio samples for testing and development purposes including nature sounds, meditation music, and ambient audio
- [Copyright-Free WAV Audio Samples](https://elysiatools.com/en/samples/wav-samples): Uncompressed PCM WAV audio samples for testing and development, mirrored from MP3 set with nature sounds and meditation music
- [Copyright-Free Raw PCM Audio Samples](https://elysiatools.com/en/samples/pcm-samples): Raw PCM s16le audio samples featuring nature ambience and relaxing music for waveform, playback, and conversion workflows

## Related content

- [Audio Measurement and Inspection](https://elysiatools.com/en/hubs/audio-analyze): Measure loudness, peaks, dynamics, musical descriptors, spectrum, and metadata before mastering, publishing, or archiving audio.
