forro-beats: Beat Grids for Forró in Mixxx
I keep my forró library in Mixxx, the open-source DJ software. Mixxx analyses every track and lays a beat grid over it, and on forró that grid is often wrong. Its beat detection tends to follow the triangle or the loud, syncopated open hit of the zabumba, so the grid comes out at double tempo or off the beat. Sync, loops and the BPM display then all inherit the mistake.
forro-beats is the tool I wrote to fix that, and it grew from there into a small toolkit for analysing forró recordings and writing the results into Mixxx.
Beat grids first
For the grids, forro-beats uses Beat This!, a neural beat tracker from the Institute of Computational Perception at JKU Linz, and adds rules of its own for forró, baião and xote. Xote, for example, is written at half the tempo the tracker reports, because that is the pulse people dance to. In a 10-track pilot, its grids put the beats on the right steps of the bar on all 10 tracks. Mixxx 2.5 managed none.
Besides grids, it can:
- separate a track into stems with Demucs, as a
Song.stem.mp4that Mixxx 2.6 plays as drums, bass, vocals and the rest - keep a catalog of facts per track, keyed by Spotify ID: playlists, energy and valence from Essentia, and star ratings derived from Spotify play counts
- check the machine and its Mixxx libraries with
forro doctorbefore anything is written
Every write into Mixxx goes through one path. It refuses while Mixxx has the library open, backs up the database, shows a preview first and can undo. A DJ library holds hand-placed cue points and playlists, and I didn’t want a script that could quietly lose them.
The forro-ft1 model
With Beat This! the grids were already far better than Mixxx’s, but on 4 of my 19 test tracks the base model still counted at the wrong level. So I fine-tuned it. forro-ft1 is the Beat This! final0 checkpoint, trained further on 75 forró, baião and xote recordings whose beats I labelled by ear, either by tapping along or by listening to the tracker’s beats and confirming them.
On the 19 held-out test tracks:
| Model | Beat F-measure | Tempo level right |
|---|---|---|
Beat This! final0 | 0.912 | 15 of 19 |
forro-ft1 | 0.945 | 19 of 19 |
The tempo level is the column that matters on a dance floor: whether the model counts at the pulse people dance to, or at double or half of it. With the tracks slowed to 70 % speed, the base model gets the level right on 3 of 19 and forro-ft1 on 15, so the fine-tuned model counts tracks from about 60 to 135 BPM at the slow, danced level.
The checkpoint is on Zenodo, with a DOI: 10.5281/zenodo.24629152. It is 81 MB and MIT licensed, like Beat This! itself. The training recordings are commercial releases, so they are not distributed.
Known limits
- It is used and tested only on Linux (Debian 13), with Mixxx 2.5 and 2.6. The code has branches for Windows and macOS, but nothing has been run on either.
- On my library of 963 forró tracks, the model still switches counting level for 4 seconds or more in 297 of them, usually doubling for a few bars. The grid builder repairs most of these when it writes the grids, but not all.
- In xote, the first beat of the bar was ambiguous even to me while labelling, so xote downbeats are not reliable.
- The test set is small, 19 tracks, and all from one person’s library.
In Portuguese too
Like Zabumbando, it is bilingual: the README and the main pages of the documentation are also in Brazilian Portuguese.
It is version 0.1.0, under the MIT licence, and still changing.
