mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.25k stars 1.24k forks source link

Please add a FILE line to the Cue Sheet #13321

Open presentformyfriends opened 3 weeks ago

presentformyfriends commented 3 weeks ago

Feature Description

I was discussing in Zulip chat why the Mixxx-generated Cue Sheets differs from the Cue Sheets generated by Rekodbox. I'm not sure if the FILE line was left out in Mixxx for a specific reason (it does expose directory structure) but I would like it added if it's not too difficult, and I can work on it myself (although I'm a beginner at C/C++).

My use case: I used to use Rekordbox and their generated Cue Sheets for mixes had incorrect timestamps and would repeat track titles over and over on the Cue Sheet (a result of a DJ blending tracks together) so I wrote a Python script to reorganize the Cue Sheet and also grab the genres of each track from the FILE line. Example with genre in bold:

FILE "/Volumes/share/DJ/electro/The Chainsmokers - Roses.mp3" WAVE

With this setup I was able to automate uploading my recorded mixes to different platforms (MixCloud, etc) with all the track information already organized and included the genre of each track.

To illustrate, the Cue Sheets generated by Rekordbox (MacOS Big Sur) look like this:

REM DATE 2024-06-01 01:04 AM
REM RECORDED_BY "rekordbox-dj"
TITLE "REC-2024-06-01-Electro-Mix"
PERFORMER "DJ Harmeyer"
FILE "01 REC-2024-04-24-Electro-Mix.wav" WAVE
    TRACK 01 AUDIO
        TITLE "Hideaway"
        PERFORMER "Kiesza"
        FILE "/Volumes/share/DJ/electro/Kiesza - Hideaway.mp3" WAVE
        INDEX 01 00:00:03
    TRACK 02 AUDIO
        TITLE "Boom"
        PERFORMER "Kubi & Hubba"
        FILE "/Volumes/share/DJ/electro/Kubi & Hubba - Boom.mp3" WAVE
        INDEX 01 00:03:26

The Cue Sheets generated by Mixxx (Linux Mint 21.3) look like this:

FILE "2024-06-01_01h04m12s.flac" WAVE
  TRACK 01 AUDIO
    TITLE "r u ok?"
    PERFORMER "In Explosions"
    INDEX 01 00:03:46
  TRACK 02 AUDIO
    TITLE "I Kissed a Girl (Receptor remix)"
    PERFORMER "Katy Perry"
    INDEX 01 02:37:42

So I would like to include the FILE lines for each track in the Mixxx-generated Cue Sheets if possible. I was advised by a member of the Core Team in Zulip chat that the code for writing the cue sheets is here and I have always wanted to contribute to Mixxx even though I'm a beginner to C/C++ so please if the feature is accepted, assign it to me and I will try my best. Thanks so much!

acolombier commented 3 weeks ago

Hi @presentformyfriends, as you rightfully pointed out, the CUE file format supports the FILE annotation, so I don't think there is any reasons to reject such a feature request.

I was advised by a member of the Core Team in Zulip chat that the code for writing the cue sheets is here

That's correct, this should be as straight forward as adding another write instruction by the look of it. Feel free to submit a PR and reference this issue in there, as we don't often use assignation in Github, so this will be a way to know that you are working on this.

presentformyfriends commented 3 weeks ago

Will do! Thanks

fwcd commented 2 weeks ago

Interesting, Wikipedia says that FILE directives within track sections are a non-standard extension. I think it would be cool to have them, but would probably keep them disabled by default for a few reasons:

presentformyfriends commented 2 weeks ago

@fwcd I agree on keeping them disabled by default, since not everyone has a use case and for the reasons you listed.

presentformyfriends commented 2 weeks ago

I submitted the PR!

FYI it builds fine, commits fine, but I had to SKIP the qmllint hook in the pre-commits in order to push. It would fail on git push and threw qmllint: could not exec '/usr/lib/qt5/bin/qmllint': No such file or directory

This seems to be because I have qt6 installed. Anyway, here's hoping I did this correctly. This PR just adds the FILE line. If you would like me to work on having it disabled by default, I can try to work on that as well.