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

Downbeats: allow weighting of beats per bar #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

declension
Copy link
Contributor

@declension declension commented Jan 10, 2019

Changes proposed in this pull request

  • In the DBNDownBeatTrackingProcessor, add an optional weighting array parameter, implicitly defaulting to ones
  • Clean up the handling of lengths into the constructor, it was getting verbose
  • Check weights don't sum to zero, to avoid divide-by-zero pain.
  • Weight the HMM results in log space by normalised weight values, as suggested by @superbock
  • Add new test to prove that (sufficient, but arbitrary) weighting to 3-time (over 4-time)
    does indeed return 3-time beats results.

This fixes #402.

 * Optional parameter, implicitly defaults to ones for the array
 * Clean up the handling of lengths into the constructor, it was getting verbose
 * Check weights don't sum to zero, to avoid divide-by-zero pain.
 * Weight the HMM results in log space by normalised weight values, as suggested by @superbock
 * Add new test to prove that (sufficient, but arbitrary) weighting to 3-time (over 4-time)
   does indeed return 3-time beats results.

This fixes CPJKU#402.
@declension
Copy link
Contributor Author

Hi @superbock any thoughts on this PR?

@superbock
Copy link
Collaborator

Sorry, still had no time to review this yet. At a first glance it looks good! I don't like beats_per_bar_weights too much, but this is basically what it is ;) I'll look into it more thoroughly soon.

@declension
Copy link
Contributor Author

Cool, thanks!

I don't like beats_per_bar_weights too much, but this is basically what it is ;)

Agreed, I tried for ages to think of something better, but nothing came up... 🤔

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

Successfully merging this pull request may close these issues.

Downbeat tracking: support weighting for time signatures
2 participants