Data formats & splits ===================== Every dataset — whether fetched via mirdata or recorded by hand — is read through one on-disk format: ``../musicality_db//tracks/`` (audio) and ``../musicality_db//annotations/`` (``.beats`` + ``.meta.json``), a plain directory layout centralized in ``musicality.dataformats`` (``musicality/dataformats/dataformat.yaml``, ``data_dir`` currently ``../musicality_db`` — a sibling git+dvc repo, cloned by ``tools/setup_remote.sh``). ``TempoDataset``/``BeatDataset``, the desktop annotator, and the mobile companion all read exclusively through this format via ``musicality.dataformats.track_io`` — none of them import mirdata. mirdata is acquisition-only: ``tools/download_dataset.py`` fetches a dataset (ballroom, brid, hainsworth, rwc_classical, rwc_jazz, rwc_popular, groove_midi, guitarset, ...) into its own raw layout. A migration tool then bridges it into this project's format before anything else touches it: - ``tools/migrate_mirdata_dataset.py`` — for mirdata datasets. Writes ``annotations/*.beats``/``*.meta.json`` from mirdata's own beat annotations, and moves (not copies) each track's audio into ``tracks/`` — mirdata is never read again for a migrated track. Handles datasets whose on-disk audio layout doesn't match mirdata's own index (see ``tools/mirdata_audio.py``). - ``tools/migrate_rwc_genre.py`` — for CSV-annotated datasets (e.g. hand-corrected RWC annotations) that already have audio under ``tracks/``. - ``tools/migrate_gtzan.py`` — for GTZAN. Its audio is downloaded separately, via the data dir's own ``dl_gtzan.py`` (HuggingFace's marsyas/gtzan mirror — mirdata's ``gtzan_genre`` audio host is a dead link), and its beat annotations come from CPJKU's beat_this_annotations project, already dropped in as this project's own ``.beats`` format. The two sources number tracks with a one-off mismatch; this tool resolves that offset, then moves audio into ``tracks/`` same as the other tools. A dataset with no ``tracks/`` folder is treated as not-yet-migrated: the annotator won't list it, and ``tools.annotator.data`` raises an error naming the migration command to run, rather than silently falling back to mirdata. Data format ----------- ``.beats`` files are ``