Can beets fix tracks which are wrongly named?

#1

I have a few albums where the track titles are randomly swapped around.

Let’s say an album has track 1 (2:56 minutes long) and track 2 (5:12 minutes long), but my tags are messed up, and I have the track 2 tagged with the title “track 1”, and vice versa.

Will the autotagger fix this when importing, based on track lengths? Or will it assume, since the titles are actually correct titles from the album, that track 1 is indeed track 1, and track 2 is indeed track 2?

EDIT: it seems that beets fetches track length information but doesn’t use it to fix the names, e.g.

Correcting tags from:
    Drive: original motion picture soundtrack
To:
    Cliff Martinez - Drive: Original Motion Picture Soundtrack
URL:
    https://musicbrainz.org/release/a8f51e2a-67a9-472c-95d4-d10efc69edd8
(Similarity: 21.3%) (missing tracks, artist, tracks) (Digital Media, 2011, MX, Lakeshore Records)
 * tick of the clock (#0) (1:35)  -> Tick of the Clock (#5) (4:48) (length)
 * he had a good time (#0) (4:48) -> He Had a Good Time (#8) (1:37) (length)

At this point I can only apply or skip, when what I would like to do is say “the tracks are swapped, figure this out using the lengths”. Is there a way to accomplish this?

0 Likes

#2

It does actually use the lengths! But it also uses the titles, and it balances the two signals against each other. You might try using the chroma plugin for circumstances like this, where you can get a good signal from the audio itself.

0 Likes

#3

Thanks for replying! Besides using chroma, is there a way I can configure the distance function to prioritize lengths?

0 Likes

#4

There is! It’s actually undocumented for now, but there is a match.distance_weights config mapping that lets you specify how important each factor in a match is. The track length is one such factor:

Increasing that number in your configuration will increase its relative importance for matching.

1 Like

#5
Tagging:
    Cliff Martinez - Drive: Original Motion Picture Soundtrack
URL:
    https://musicbrainz.org/release/a8f51e2a-67a9-472c-95d4-d10efc69edd8
(Similarity: 51.0%) (missing tracks, tracks) (Digital Media, 2011, MX, Lakeshore Records)
 * He Had a Good Time (#8) -> Tick of the Clock (#5) (id, index)
 * Tick of the Clock (#5)  -> He Had a Good Time (#8) (id, index)

Thank you!

1 Like

#6

An interesting exchange. I never thought of beets as a tool fore cleaning up messy tags. Mostly because I use it to import proper orderly rips.

0 Likes