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

[POC] Down beat range #3036

Draft
wants to merge 56 commits into
base: main
Choose a base branch
from
Draft

[POC] Down beat range #3036

wants to merge 56 commits into from

Conversation

daschuer
Copy link
Member

This is just a POC branch that tries to improve various issues, discoverer during testing the new Rhythm detector.

This implements the following:

  • Does not use the novelty curve which is IMHO too expensive and to coarse.
  • Uses the complex SD to create the tempogram.
  • Uses a Normalized Auto-Correlation that als matches two equal small values.
  • Removed the linear rising curve from the Auto-Correlation
  • Add an Attempt to detect the Phase of the regions from the AutoCorrelation
    (It is too sensitive and works only Sometimes)
  • Uses a 1/x curve for the Auto-Correlation to find reasonable sized sections.
  • Only If a longer section has a bigger equality, it is considered as a section.

This branch uses the possible Section changes as beats. In the current state it is not very helpful thoug.

This Branch also prints a LOT to the console. It can be copied into a csv file and imported to LibreOffice which can show Diagrams usefull fro debugging.

crisclacerda and others added 30 commits June 23, 2020 21:27
Most of the implementation is copied and slighly cleaned for consistency from beatutils.
The rest comes from mixxxdj#2847
Change needed to do multi feature detection without redoing the STFTs
The change in qm-dsp broke queen mary beats
@daschuer
Copy link
Member Author

daschuer commented Aug 21, 2020

grafik

This is for example the complex SD of a track with two visible section/phrase changes. The idea is that the down-beat must be at such a change. We "just" need to find these places as anchor for all other down beats.

You see, that the section change is not at the peak beats. That's why searching for peaks fails.

@daschuer
Copy link
Member Author

This is a typical result from the AutoCorrelation

Debug [AnalyzerThread 0 #2]: measurelength 211 (21, 43, 64, 85, 149, 170, 340, 679)
Debug [AnalyzerThread 0 #2]: measurelength 212 (21, 43, 64, 85, 149, 170, 340, 509, 679)
Debug [AnalyzerThread 0 #2]: measurelength 213 (22, 42, 64, 85, 149, 170, 340, 509, 679)
Debug [AnalyzerThread 0 #2]: measurelength 214 (21, 42, 64, 85, 149, 170, 340, 679)
Debug [AnalyzerThread 0 #2]: measurelength 215 (21, 42, 64, 85, 149, 170, 340, 679, 849)
Debug [AnalyzerThread 0 #2]: measurelength 216 (21, 42, 64, 85, 149, 170, 340, 679, 849)
Debug [AnalyzerThread 0 #2]: measurelength 217 (22, 42, 64, 85, 127, 149, 170, 340, 509, 594, 679)
Debug [AnalyzerThread 0 #2]: measurelength 218 (22, 42, 64, 85, 127, 149, 170, 340, 509, 679)
Debug [AnalyzerThread 0 #2]: measurelength 219 (22, 42, 64, 85, 127, 170, 255, 340, 509, 679)
Debug [AnalyzerThread 0 #2]: measurelength 220 (22, 42, 64, 85, 127, 170, 255, 340, 679)
Debug [AnalyzerThread 0 #2]: measurelength 221 (22, 42, 64, 85, 127, 149, 170, 340)

Currently MIxxx will pick 170 as measure length which is 1,93 s.
The smallest metronome is 21 which are the eights with 0,238 s
The Track has 126 BPM (the number 42)

The part which is hard to decide if this is a 4/4 or a 7/8 Track, because the 149 is also detected.
If you look at the longer regions you also find strong doubles of these values.

@daschuer
Copy link
Member Author

90943114-bed1f400-e418-11ea-978f-81747c6ee970

These are downbeats where the music changes significantly.
You see how using the most significant peaks will fail here.

@JoergAtGithub
Copy link
Member

JoergAtGithub commented Aug 22, 2020

You see how using the most significant peaks will fail here.

You could try to apply a FIR filter on the SD output. The filter should consider the beats of two bars. Than you get a smooth curve. If you calculate the first derivative of this curve, I would expect clear peaks at the first and the last musical change.

@Holzhaus Holzhaus marked this pull request as draft September 1, 2020 16:40
@Be-ing Be-ing changed the base branch from master to main October 23, 2020 23:11
@github-actions
Copy link

This PR is marked as stale because it has been open 90 days with no activity.

@github-actions github-actions bot added the stale Stale issues that haven't been updated for a long time. label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues that haven't been updated for a long time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants