Fieldwork · Analysis lab

X-Ray

Drop in a track you love. X-Ray measures it the way a producer would: tempo to the hundredth, key, the arrangement in bars, the groove down to the millisecond, the chords, the kick's note, the loudness and the tonal balance. Then it hands all of that to Ableton as MIDI.

Drop a reference track here

Or choose a file. MP3 is fine: most references come as MP3, and everything here works on them.

MP3WAVFLACAAC / M4AOGG / OpusAIFF (Safari)

Nothing is uploaded. The file is decoded and measured inside this page, on your computer, and works offline.

01

The numbers

Everything you'd otherwise hunt for with a tap button and three plug-ins. Every figure is measured; where the page is guessing, it says so.

What stands out

02

The map

The whole track in bars. Click to jump to a bar, drag across bars to loop them, drag a section edge to move it. The lanes show where each element plays, measured, not guessed from the spectrogram.

Zoom
#SectionTypeBarsLengthLoudnessElementsHarmony

What changes, and where click to jump there

03

The grid

Everything else hangs off this: the tempo and where bar 1 starts. Turn on Click in the transport and listen. If the click is off, fix it here and every other number updates.

Tempo & bar 1

Bar 1

How well the grid holds each dot is a kick, in ms from the grid

04

The groove

The drum pattern of a section, as a heat map of onsets in three bands, plus the swing and push/drag that make it move. Numbers in the cells are the average timing in ms against the straight grid. Read more in Groove.

Dots mark the hits the page is confident about. It's a heat map of onsets, not a note-perfect transcription.
Drums use Live's Drum Rack notes: C1 kick, D♯1 clap, F♯1 hat.
05

Harmony

The key from the whole track, the pitch classes that back it up, and a best-guess chord per bar with the bass note under it. Chords in dense drops are the least certain thing on this page: check them with the drone and your ears. See In Key and Voicing.

Key

Pitch classes red: tonic · blue: in the key

Chords and bass, bar by bar click a bar to hear it

Two tracks: a triad per bar and the bass root per beat (an octave up, so it's easy to audition).
06

Low end

What the kick is tuned to, how far it rises over the bass, and whether the sub stays mono. See Low End and Rumble. Solo the sub with Listen → Sub in the transport.

07

Tonal balance

The average spectrum in 1/6-octave bands, normalised to the track's loudness so curves from different tracks line up. Pick a section: drops and breaks rarely share a balance.

BandRangeLevelStereoYour mixDifference
08

Compare with your mix

Load your own bounce as B. The page lines both up bar for bar, matches their loudness so the louder one can't win by being louder, and tells you what to change first.

Drop your mix here (any format), or

09

Take it to Ableton

The analysis as files you can drag into Live. The skeleton is the reference's arrangement as MIDI at its exact tempo, ready to write your own track over.

Skeleton MIDI

Five tracks: tempo with section markers, one block per section, the detected drums, bass roots and chords. Starts at bar 1.

Report

Everything on this page as Markdown or JSON. Keep it with the project, or paste it into your notes.

Crate

Save the measurements (not the audio) to this browser's crate so you can compare against it later without the file.

Lining it up in Live

    10

    Your reference crate

    Saved analyses live in this browser only. The crate's average tonal balance can be drawn as a target curve in section 07.

    TrackBPMKeyLUFSBarsArrangementSaved
    ?

    How it works, and where it can be wrong

    Every method below runs in this page in plain JavaScript. The analysis is tested against a synthesized demo track whose tempo, key, sections, swing and kick note are known exactly.

    Tempo and grid

    Onsets in three drum bands (low, clap, hats) at 2 ms resolution. An autocorrelation with a tempo prior picks the rough tempo; then a straight line is fitted through every strong kick's time against its beat number. The slope is the tempo, usually to within 0.01 BPM, and the scatter is the "grid holds" figure.

    Bar 1 is where chords and whole bands change most often. Octave errors (half or double time) are possible: use ½× / 2×.

    Key and chords

    A pitch-class profile from a 4096-point spectrum (bass and treble separately, whitened so noise and hats don't count), correlated against the Krumhansl–Kessler and Temperley key profiles. Chords are triads matched per bar, with the bass note as a tie-breaker. Relative major/minor mix-ups are the classic error; the alternatives are listed.

    Loudness

    ITU-R BS.1770-4 / EBU R128: K-weighting, 400 ms blocks, absolute and relative gates for integrated loudness; 3 s windows for short-term and LRA. True peak uses 4× oversampling. A mono file is measured as dual mono, the way it plays in a stereo mix.

    Sections and lanes

    Per bar: kick onsets on the beat, low end between kicks, hat activity, mids, air, loudness and chroma. A novelty curve over a bar-by-bar similarity matrix finds the changes, biased toward 4- and 8-bar phrases. Labels (intro, break, build, drop…) follow simple, visible rules, and you can rename or move any of them.

    Groove

    For each 16th step the page averages the onset strength and its timing across every bar of the section. Swing is measured the MPC way: where the second 16th of each pair lands, as a % of the 8th (50 = straight, 66 = triplet). Push/drag is the clap's median offset from beats 2 and 4.

    Limits

    • Constant tempo is assumed. Live-played or unquantised tracks show as a loose grid.
    • Low hits include bass notes that start with a punch; the clap row can pick up snares and rimshots.
    • Above ~9 kHz only level and width are measured, not onsets.
    • Lossy files: fine for everything here, but true peak can read a little high and the top octave may be missing (the page detects the cutoff).

    Questions

    Can I use MP3s?

    Yes. Your browser decodes MP3, AAC/M4A, OGG Vorbis, Opus, FLAC and WAV (AIFF only in Safari), and X-Ray reads the bitrate and sample rate from the file itself. Tempo, key, arrangement, groove, chords and loudness come out essentially the same from a 320 kbps MP3 as from the WAV. Two things change: lossy encoders often cut everything above 16–20 kHz (the page detects that cutoff and tells you to ignore the air band), and true peak can read up to about 0.5 dB higher than the master had.

    Does anything leave my computer?

    No. There's no server. The file is read with the File API and decoded by your browser. The crate stores numbers (never audio) in this browser's localStorage.

    The BPM is half or double what I expected

    Tempo octave errors happen with half-time drums and with 170+ BPM tracks. Press ½× or 2× in section 03; the grid, groove and sections all follow.

    The sections are slightly off

    Drag a section edge on the map, use the table to merge, split, rename or relabel, or fix the grid first. The skeleton MIDI, report and crate all use your edited sections.

    Why is the kick shown as a note?

    A kick's tail is a pitched sine. If it clashes with the key, the low end fights itself. X-Ray measures the tail from 90 ms after each hit, removes the bass by subtracting the offbeats, and names the nearest note with the cents offset.