-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Ironing beats #3626
Ironing beats #3626
Conversation
Co-authored-by: Cristiano Lacerda <cristiano.lacerda@usp.br>
… during an offset shift that happens when the beat instrument changes.
A small Offset Correction in the range of +-25 ms is always applied. The Analyzer always returns the best Tempo near 120 BPM. This may fail by an interger fraction. Applying an additional adjustment into a range will make the issue worse.
+336 −711 Nice, this removes more code than it introduces. |
@daschuer Thanks you for working on this. You said this is continued the changing tempos PR (#2930) but there are no commits from @crisclacerda in this branch. Did you reimplement this from scratch? |
The code in the first commit is from @crisclacerda |
I tested this with my test track "The Learning Process" by T. Williams & James Jacob. Non-constFor non-const beatgrids this gives still incorrect results, but they are a bit closer to the truth (120.04 vs 120.19 BPM, correct would be 120 BPM) and the beatgrid looks better aligned in this branch. The BPM detection for the part without audible beats is still wrong, but that's expected I think. ConstUnfortunately, this has regressed considerably, at least for this track. BPM is correctly detected in both branches, but the beatgrid is shifted in this branch (by ~0.68 beats). |
I analyzed 4200 tracks and compared the results. Unfortunatelly the csv export seems to crop bpm values so it is hard to compare, but some manual tests showed that tracks detected as 2/3 become the correct, round value after correcting. I think, if a segment is detected in a bpm in which bpm*3/2 is very close to a integer, we should take this bpm for this segment. |
@poelzi what about beatgrid alignment? Is it worse, better or roughly equal? Did you use const beatgrid? |
Of case we can do it, however I am afraid there is no unambiguous rule? There is also a problem that we likely mess up the phase. Because only every third beat matched the detected beats. What we can do is make the rounding of 1/12 BPM to a full integrer a preferences option. |
@daschuer do you have an idea why the phase is off for const beatgrids? The non-cost phrase is detected properly. |
@daschuer do you have an idea why the phase is off for const beatgrids? The non-cost phrase is detected properly. This is caused by the different offset correction strategy. The detector detects phase shifts in the track due to the missing base drum in some passages. In this areas it gets hooked on the high heads. This is of cause wrong, but it is a known issue that the QM detector valuates the high heads more, because they have a wider spectrum. Instead of using the first beat as phase giving indicator which turns out to be wrong on the majority of tracks in my collection, we use now the phase of the longest constant region. It seems that such a high head region is the longest region that is used set the phase for the whole track. In my case the phase is aligned perfectly to the high heads in during the whole track. I cannot confirm the issue from the screen-shot. Maybe I have different recording? |
I have now tested a different version which has the correct offset. |
@Holzhaus: Notes are addressed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test rigorously, but I did not experience any regressions so far.
@Holzhaus Merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you. A lot less unnecessary fluctuations in beatmap tracks!
Are you sure, this fix is done everywhere. It looks if mass analyze multiple tracks, the grid/wave are out of sync in some tracks. I have tested this, doing single analze without dropping left side analyze magic wand icon, multile tracks. Windows 10. It can be, the fixed working method/function is not replaced, where mixxx do multiple track analyzes, and its using old not working procedures. |
If you use the recent 2.3 beta, this PR is included in all cases. By default Mixxx keeps the old analysis data. In the "Beat Detection" preferences you can select "Re-Analyze beats when settings change or beat detection data is outdated" to detect the beats again. Or reset the beat grid before analysis the be entirely sure it is new. Do you use const or non const analyzer setting? I would be happy to receive test results and get to know tracks that are still failing? |
My current mixxx is 8126. So if mass analyze is using methods what you have fixed, then this is little bit odd, i will study this more. while checking a new tracks. |
The old method is no longer in the code. It can be an issue though that you see the old analysis, done with a previous version. |
I just listen and preparing a new tracks, what i mass analyzed yesterday. |
the behaviour is the grid and waveform are fine first part of tracks, but about 1/2 - 2/3 of a track , shift happends. |
Which track is it? Does #3794 fix the issue? |
Allmost every track. |
I probably have no understand the the issue. Please test this:
This is the case here using the latest Mixxx 2.3. Can you confirm that? |
Yes If I drag drop multiple tracks to the analyz icons, i get grid/waveform placements wrong or they start shift. I have done most of the steps what you wrote. after clear waveform and bpm and and after loading a single track, both hotcues are correct place. |
I havent use "analyze functions" if clicking the icon. I just let deck load the track and do the analyze, after clearing a waveform/bpm. |
I have just tested the drag and drop analysis with a new duplicated track and cannot confirm the issue. There is an extra checkbox in the Preferences to discard their beat grid when importing in Mixxx. |
No I dont use serato or rekordbox. I try to load some public track, so i can make link and images, you will see it better. |
Clearing BPM and Grid wont help, need to clear waveform. I dont know if this helps. |
Thank you Daniel checking this thing. I downloaded ektoplazm two albums, but offcourse, there was no probelm at all. Which is offcourse a great thing. I was mass analysing over +200 tracks, where i saw this behaviour. I am not going to download +20 albums from ektoplazm, they server has slow speed .... etc. Next week I have plan to buy similar ammount of tracks, and will do mass analysing, so if I can reproduce this. What you mean latest Mixxx version,the version which is public available or latest build from server ? |
I mean the latest beta version form the download page on www.mixxx.org. For testing you can start with a new database an you current tracks. In order to this you can copy the start icon to the desktop and add –settingsPath PATH |
This continues #2930 and aims to solve the issues discussed in #3012 with ideas from #2668.
These are the raw beats of the input of "Isometric - Mood Swings" input of BeatUtils::calculateBpm

It is a const BPM track with 148 BPM, which shown perfectly how our current detector is broken for such EDM tracks.
The very first part at is an intro without good onsets. The result is floating. Than it hooks to the correct 148 BPM. However due to the resolution of the detector it needs shorter adjustment beats. They are floating, until an easy to detect beat starts. Here the adjustment beats are in an equal distance. In the rest of the track the detector get hocked to the 2/3 BPM value and floats around 98,66.
Currently I have implemented four stages to get a constant beat. This deals with the assumption that many tracks are at a full integer or integer fraction of 1/12 BPM.
Result: many track are at a full BPM and some at 1/2 fraction most hand made tracks are not rounded. Unfortunately according to these rules the Isometric track is still at the "wrong" 98,66 BPM because this region was the longest. For this track it would be easy to fix it aromatically. But I am afraid that this likely messes the track up, so I have not included this here.
With these steps we do not loose the phase information so there is no longer need for the offest adjustment preferences option.
The QM currently prefers tempos near 120 BPM. I guess this is the reason that the Isometric track is with 98,66 closer to 120 compared to 148 BMP. The additional BPM limits from the preferences just interferes with that assumption and was messing up good results, or good enough results that can be fixed by a manual click on the BPM multiplier buttons.
So I have removed them as well.
If it turns out that such a feature is required, we can pass the preferred BPM value into the detector.
I have done this on top of 2.3 because i consider the current rounding as buggy. However I did not expect such a size of a PR which should better go to 2.4. Since I am not an EDM DJ I do not suffer from the decimal places.
@poelzi Does this solve at lest some of your problems? Do you have tracks where this still fails?