Sync and other machines¶
forro sync¶
forro sync --target main # dry run: counts and a preview CSV
forro sync --target main --apply
forro sync --target main --fields rhythm --apply
Matches the library's files to catalog tracks by their SPOTIFY_URI and ISRC tags (Ogg Vorbis and
Opus), else by their audio digest, which is computed only for files with neither tag. As in
mixxx-tags, a catalog track with the same ISRC counts unless its Spotify ID is tagged on another file.
Then it writes, through the same guarded path as the other commands (refuses while Mixxx runs, backup,
one transaction, change log for mixxx-undo):
energy,valence:forro_track_features, created when missing; tracks without a value keep theirs.playlist: the tags are added to the Comment, asmixxx-tagsdoes; nothing is removed.grid: the grid columns. A grid locked here that forro-beats did not write is kept (unless--include-locked), and a forro-beats grid edited in Mixxx since it was written is never replaced. When this library's file has another sample rate or decoder offset than the one the grid was measured on, the beats are moved through seconds; otherwise the stored blob is written byte for byte.rating: only where the track has no rating (0 stars) in Mixxx. The value is the track's rating fact when it has one (of any kind). Otherwise it comes from itsplays: the library's tracks with at least one play are sorted by play count, the counts at positions n/5, 2n/5, 3n/5 and 4n/5 (rounded down) are the cut-offs, and a track gets 1 star plus one per cut-off its count exceeds, so each star holds about a fifth of the played tracks. The population includes tracks that already have a rating. The preview prints the play-count range of each star. Plays are matched by Spotify ID only: a file without aSPOTIFY_URItag, or tagged with another Spotify ID of the same song (another album), gets no stars from plays.rhythm(only with--fields): the Genre, with a trailing?when the winning fact is a guess.
theme and theme_secondary are kept in the catalog but not written to Mixxx; plays only through
rating. --fields
replaces the default list ([sync] fields in the config file, else energy, valence, playlist, grid and
rating).
First run on another machine¶
forro-beats has been used and tested on Linux (Debian 13) only; these steps are untested on Windows and macOS (see Install).
Build and update the catalog where the analysis runs (run the importers, or let other tools write
facts CSVs and import them, then forro catalog-status to check). Then, on the machine with the Mixxx
library:
- Install the core package, without
[beats]: sync needs no PyTorch.uv tool install --python 3.13 /path/to/forro_beats-0.1.0-py3-none-any.whl forro doctor: it should find Mixxx and the library, and say whether it may write to it.- Copy
catalog.sqliteover (a USB stick will do; it holds no paths). Its default place is~/.local/share/forro/catalog.sqlite(on Windows, untested:%LOCALAPPDATA%\forro\catalog.sqlite); put it there, or anywhere and pass--catalog. - Preview, Mixxx may stay open:
forro sync --catalog /media/stick/catalog.sqlite. It finds the library asdoctordoes;--db PATHor--target NAMEpicks another. Read the counts and the preview CSV. - Close Mixxx and run the same command with
--apply. It prints the backup and the change log;forro mixxx-undo LOGreverts it.
Music folders can differ between the machines: files are found by their tags or audio, not their path. Two systems on one computer (a dual boot) that cannot read each other's disks would be two machines: copy the catalog across by hand, on a stick or through a cloud folder, after each update. The copy is a snapshot; importing on one side does not change the other, so import in one place only. A dual boot with Windows on the other side is untested, like everything on Windows.