scripts/dj-loop-analyzer.js — 6-loop crate: DTW similarity, tempo, key, Camelot

Six loops with known recipes: A1/A2/A3 (120.19 BPM — 43 hops/beat on the tempo lag grid — A-minor chord tones over a four-on-the-floor kick, small pattern variations) and B1/B2/B3 (147.66 BPM, E♭-major 16th-note arps with off-beat hats). Ground truth is built into the recipes. DJLoopAnalyzer analyzes all six; badges assert the similarity ranking, the block structure of the DTW similarity matrix, exact tempo recovery, Krumhansl-Schmuckler key detection with NORMALIZED confidence (post-repair), measured timbral proxies (post-repair — the old code returned constants), Camelot key compatibility, and index-based DTW k-means clustering (post-repair — the old code TypeError'd and silently fell back to tempo bins). All numbers node-verified. Click a matrix cell to audition that pair back-to-back.

DTW similarity matrix (bright = similar) — click a cell to play the pair
loopbpmkeykey confenergybrightnesswarmth
synthesizing crate…