Skip to content
Jason Garcia
← All projects

Ballroom style finder

Shipped

Tell which ballroom dance a song fits, to find new music to dance to.

Problem

Ballroom dancers need music in the right style and tempo, but streaming apps don't tag songs by dance. This model listens to a 30-second clip and reports its three most likely ballroom styles, so a dancer can scan an album or playlist for new practice music.

What I built

  • A classifier for 10 styles (cha-cha, foxtrot, jive, paso doble, quickstep, rumba, samba, tango, Viennese waltz, waltz), trained on the 4,180 clips of the Extended Ballroom dataset.
  • A command-line tagger that takes a list of titles and artists, fetches 30-second previews, and returns each song's top three styles with probabilities. It also tags local audio files.
  • Five baselines on the same split, from zero-shot CLAP to tempo-only and hand-built rhythm features, so the gain from the foundation model is measured rather than assumed.

Approach

Frozen music foundation model

No usable pre-trained ballroom classifier exists, so each clip is embedded by MERT-v1-95M, a self-supervised music model, kept frozen. A small MLP probe learns a weighted mix of MERT's layers and predicts the style. Training takes minutes on a laptop.

A split that can't leak

Ballroom datasets repeat songs: 4,110 clips fall into 3,608 duplicate groups, by title and artist, the dataset's own duplicate links, and near-identical audio. The 70/15/15 split keeps every group on one side, so the test set never contains a copy of a training song.

Where the rhythm lives

The learned layer weights peak at MERT's middle layers (3 and 7). Single-layer probes peak at layer 4 and fall off at the top layer, so dance style is a rhythm feature that the model's final layers partly discard.

How it fits together

  1. 30-second preview or local file
  2. MERT-v1-95M embeddings (frozen)
  3. Layer-mixing MLP probe
  4. Top three styles with probabilities

Results

Accuracy
95.6%
MERT + probe on 618 held-out test clips (top-2 98.5%). Published reference: 93.9% (Pavlin et al. 2020), on a different split.
Macro-F1
0.947
Same test clips. Weakest classes: rumba 0.90 (often called waltz) and paso doble 0.84, which has only 8 test clips.
Best baseline
88.8%
Tempogram + MFCC features with logistic regression on the same split. Tempo alone from the dataset's BPM: 87.4%.
Zero-shot CLAP
14.9%
Text prompts with no training. CLAP knows genres but not ballroom dance names.

Limitations

  • Extended Ballroom is competition ballroom music. The pop songs dancers actually look for are out of domain, so a small hand-labelled set of real songs is still needed to test the discovery use case.
  • Many songs fit several dances (a 120 BPM song in 4/4 can be a foxtrot or a cha-cha), which is why it reports three styles, not one.
  • It reads 30-second previews, not whole songs.

What's next

  • Hand-label a set of popular songs dancers use and measure accuracy on them.
  • Pose estimation on ballroom dance video, as a follow-on project.

Credits

Extended Ballroom dataset (Marchand & Peeters, 2016). MERT-v1-95M (m-a-p). Audio is never stored in the repo.