Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to change the audio file of a track (e.g. higher quality flac over existing mp3) #12362

Open
CaMeLCaseError opened this issue Nov 26, 2023 · 5 comments

Comments

@CaMeLCaseError
Copy link

Feature Description

I'd like to keep database information of a track and change only the associated audio file. So I want to keep crates, hotcues, bpm and so on for a track. Is there already a proper way of doing this?

This seems trivial for changing a l"ow quality mp3" to "high quality mp3" with identical file names by overwriting the low quality file with the high quality file. however this apparently also causes problems with caching: #10791

it might also be useful if you want to simply rename a file in a folder using external software and then update that change in mixx.

@ronso0
Copy link
Member

ronso0 commented Nov 27, 2023

Related request (for tracks marked 'missing'): #9424

@FrankwaP
Copy link
Contributor

FrankwaP commented Nov 30, 2023

I've shared a Python tools that does it: #12330

@ronso0
Copy link
Member

ronso0 commented Nov 30, 2023

IIUC fix_track_paths.sh in https://github.com/FrankwaP/mixxx-utils/tree/main/python_tools/fix_track_paths uses an external library (Clementine db) to to create an intermediate 'source of truth' database, then uses that to 'fix' the mixxx database.

The feature requested here and in #9424 is about 1) doing the replacement in Mixxx and 2) solely with the Mixxx db.
IMO it should cover both moved/renamed tracks and replacement tracks (other format, other version) where the old track may or may not exist anymore.
This requires some sort of GUI (interactive) because I'm pretty sure not all replacement scenarios can be detected and handled automatically. That could also cover missing tracks the library scanner didn't find successors for (it tries to find matches based on file name and track duration in TrackDAO::detectMovedTracks.

IMO this boils down to some sort of track view (either in the library or some popup dialog) where you can select a new track and pick a predecessor / the new track location.
In case of replacing a track with another version, we probably need some options how to deal with metadata in both tracks (merge/drop comments, rating, cover art, crates/playlist affiliation).

Post-replacement actions may also be required (or at least some manual checks) since the audio stream may differ significantly and cues may need to be shifted/re-set.
Mixxx should make it easy to find the modified tracks after leaving the Replace dialog, e.g. add modified tracks to a special crate (child of Tracks maybe?).

So, IINM the first step is simply ™️ create a GUI for the data that's already available: 1) pick a successor, 2) adopt the existing metadata, 3) have a way to delete the predecessor in case it still exists.

  1. and 2) is what the scanner already does (update the track location) if it found a successor.

@FrankwaP
Copy link
Contributor

FrankwaP commented Nov 30, 2023

YUC, that's how my tool works :-)
Note that it starts by looking for exact "artist/album/title" matches, then does a loose/closest match (with a Levenshtein distance) on the remaining tracks and asks the user to select one from the 5 closest matches.

I think that both requests are not very strict about a 100% Mixxx solution, especially since it's not an common operation one does when using Mixxx (it's just once in a while). So my tool might suit them.

Anyway that was just in case it could be useful to someone... I do not want to discourage you from developing this on Mixxx :-)

@mxmilkiib
Copy link
Contributor

Also related to #9434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants