# Key Matcher

Detect a sample or loop key (Krumhansl-Schmuckler chroma) and transpose it to your project key — with the output key re-verified after shifting.

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

- **Category:** Media

- **Keywords:** key matcher, transpose sample, key detection, chroma, krumhansl, camelot, pitch shift, sample to key, loop transposition, 采样移调

## Overview

Key detection runs Krumhansl-Schmuckler profiles over chroma from a single FFT pass (Camelot code included for DJ use). The transposition distance is the smallest semitone shift that moves the detected root onto your target root, always within plus or minus six semitones, so loops are never lugged an octave away. Shifting prefers the rubberband filter with formant preservation (vocals keep their timbre); when the FFmpeg build has no rubberband it falls back to the asetrate resample chain, which shifts formants along — fine for samples, audible on vocals. The result is re-analyzed after shifting and the detected key of the output is reported next to the target, so the match is verified end to end. Note that transposition moves pitch but cannot change modality: matching a minor loop to a major key aligns the tonics and warns instead of pretending.

## Inputs

- **Sample or loop** (file)
- **Target key** (select)
- **Target mode** (select)
- **Preserve formants (rubberband)** (checkbox)
- **Output Format** (select)

## When to use

- Aligning melodic loops or vocal samples to match the root key of an ongoing music project.
- Preparing audio tracks and samples for harmonic DJ mixing using detected Camelot key codes.
- Pitch-shifting audio clips while preserving natural vocal formants and verifying the resulting key.

## How it works

- Upload your audio file to run an FFT pass and extract the chroma profile using Krumhansl-Schmuckler key detection.
- Select your target root key, mode (major or minor), formant preservation preference, and desired output format.
- The tool calculates the minimal semitone shift (within ±6 semitones) and applies rubberband or resampling filters.
- The exported audio is re-analyzed to verify that the final root pitch matches your requested target key.

## Use cases

- Music producers transposing downloaded sample packs to match their session root note.
- DJs harmonic mixing by analyzing Camelot codes and adjusting loop keys for transitions.
- Remixers tuning vocal hooks to fit new backing tracks while preserving vocal timbre.

## Frequently asked questions

### Can this tool change a minor loop into a major chord progression?

No. Pitch transposition shifts the root note up or down but cannot alter musical intervals or change the scale modality.

### How does the tool ensure loops are not transposed too far?

Transposition calculations always select the shortest interval within a plus or minus six semitone window to avoid unnecessary octave jumps.

### What is the benefit of enabling formant preservation?

Formant preservation uses rubberband filtering to keep vocal and instrumental timbre natural instead of sounding chipmunked or unnaturally deep.

### What audio export formats are supported?

You can export the transposed audio as WAV, MP3, FLAC, M4A, or OGG Vorbis.

### How is the transposed output verified?

The processed audio file undergoes a secondary chroma analysis, reporting the final detected key alongside your initial target key.

## Related tools

- [Audio Add Silence](https://elysiatools.com/en/tools/audio-add-silence): Add a specified duration of silence to the start or end of an audio file
- [Air Band Enhancer](https://elysiatools.com/en/tools/audio-air-band-enhancer): Brighten dull vocals or masters with a high air shelf plus an exciter that synthesizes new top-end harmonics — the Aphex Aural Exciter architecture built from FFmpeg.
- [Album Loudness Matcher](https://elysiatools.com/en/tools/audio-album-loudness-matcher): Match a batch of tracks to one target loudness the way album gain works: one gain for the whole record keeps intentional inter-track dynamics, hybrid mode only tames outliers, per-track mode flattens everything.
- [Audio Ambience Loop Generator](https://elysiatools.com/en/tools/audio-ambience-loop-generator): Extract the background ambience/room tone from a fragment and generate a seamless loop of any target length.
- [Audio Automatic Fade Designer](https://elysiatools.com/en/tools/audio-automatic-fade-designer): Design and render musical fade-ins and fade-outs: bar-based lengths at your BPM or lengths auto-derived from detected silence, fades placed against the real music span, logarithmic curves, optional silence trimming.
- [Batch Audio Normalize](https://elysiatools.com/en/tools/audio-batch-normalize): Normalize multiple audio files to a target peak level with consistent volume across the batch
- [Audio Breath Control Editor](https://elysiatools.com/en/tools/audio-breath-control-editor): Detect breaths in speech and naturally crossfade to reduce, remove, or keep them.
- [Audio Caption Timing Shifter](https://elysiatools.com/en/tools/audio-caption-timing-shifter): Shift SRT or WebVTT captions to a likely speech onset or by a manual offset.

## 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
