mixxxdj / mixxx

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

Add heuristic BPM fix depending on song genre #13447

Open spotlesscoder opened 2 months ago

spotlesscoder commented 2 months ago

Feature Description

Sometimes, when I add new trance tracks with 140 bpm to my library and analyze them, they are detected as 93.3 BPM I want mixxx to show me a dialog after analyzing when tracks are below 122 BPM and either the genre in the Audio Info fields of the files contains "Trance" or the crate I added them too contains the word trance. I want to select these tracks from a list and have some buttons with very common tempos on buttons to re-assign the tempo for the selected songs E.g. 124 BPM, 136 BPM, 138BPM, 140BPM This way I can bulk-fix wrongly detected tempos

This could be done for other genres where such errors which follow a certain pattern are often occurring

daschuer commented 2 months ago

I think we can do it already. Just use the search field to filter you library for: "genre:Trance bpm:80-120" Than you can Ctrl+A and right click to apply a BPM multiplayer. After that you may lock the BPM to indicate verification.

Does that solve this issue for you?

spotlesscoder commented 2 months ago

yeah it think that could solve it. However it would be great to have a very prominent indicator for what is likely to be the correct multiplier for "common missdetections" - for example I added some psytrance to my library and there some tracks were detected with 98.7 BPM and I am still struggling to find out what BPM is actually correct

daschuer commented 2 months ago

Not sure if this is possible.

Can you provide a GUI mock up/edited screen shot for it and the set of rules you have in mind?

spotlesscoder commented 2 months ago

So I realized that 3/2 BPM is usually the correct fix for the misdetections. Maybe it would be enough to highlight that menu entry with an accent color?

daschuer commented 2 months ago

When exactly should it be highlighted?

spotlesscoder commented 2 months ago

The menu entry "3/2 BPM" when I right click the track and go to the "Adjust BPM" menu

Swiftb0y commented 2 months ago

Fyi, the most common misdetection I have are DnB tracks, where the typical rhythm gets detected as 116Bpm (3/2 fixes that) and misalignment by exactly half a bar on house tracks where the grid gets placed on the offbeat hihats instead of the kicks.

spotlesscoder commented 2 months ago

Yes, same for me for Trance, Psytrance, Hardstyle etc. It's usually 3/2 BPM

daschuer commented 2 months ago

When exactly should it be highlighted?

Let me rephrase: To highlight a specific multiplier, Mixxx needs to guess the most likely one. For that we need a set of if -onditions. They should works for most tracks in a reasonable way. What could be the set? Please propose a pseudo code we can use to start with.

spotlesscoder commented 1 month ago

Mixxx could look into the track metadata for the genre or the file path (e.g. when the folder the file is from is called Trance Hits 20xx)

Swiftb0y commented 1 month ago

Most dance music usually has integer BPM, so mixxx could consider doubling BPMs like 87.5 (175 BPM DnB track detected at half speed) or maybe 116 as I pointed out previously...

ronso0 commented 1 month ago

So if the detected (constant) BPM have a remainder of .5 (or .6666), Mixxx should try to double it (or multiply with 3/2) and check if the result is in a reasonable range?

Swiftb0y commented 1 month ago

Thats a possibility yes, though I'm not sure if I would let mixxx do these automatically. This was more about just highlighting suggested actions.

daschuer commented 1 month ago

This sounds like a consideration the beat detector should do. I will have a look. We already have a priority on integer bpms and a certain BPM range. Maybe it possible to shift it a bit.

@spotlesscoder in terms of a general purpose rule, we have not one that we can turn into code. Can you give some explicit examples?

spotlesscoder commented 1 month ago

pseudocode:

if genre.toLowerCase().contains("trance") && bpm < 100; then multiply bpm with 3/2; fi