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

IndexError in self.correct branch of DBNDownBeatTrackingProcessor process function. #488

Open
omareldeeb opened this issue Nov 30, 2021 · 1 comment · May be fixed by #490 or #498
Open

IndexError in self.correct branch of DBNDownBeatTrackingProcessor process function. #488

omareldeeb opened this issue Nov 30, 2021 · 1 comment · May be fixed by #490 or #498

Comments

@omareldeeb
Copy link

omareldeeb commented Nov 30, 2021

Expected behaviour

If no valid path could be decoded using the Viterbi algorithm, an empty array should be returned.

Actual behaviour

If self.correct == True, an IndexError is thrown in line 301 of downbeats.py, due to beat_range being empty.

Steps needed to reproduce the behaviour

import madmom
import numpy as np
import scipy

beat_tracker = madmom.features.downbeats.DBNDownBeatTrackingProcessor(fps=100.0, correct=True, beats_per_bar=4)
beat_activation = np.random.uniform(0, 1, 100)
downbeat_activation = np.random.uniform(0, 1, 100)

beat_decoder.process(np.dstack((beat_activation, downbeat_activation))[0])

Information about installed software

Please provide some information about installed software.

madmom.version == '0.16.1'
np.version == '1.19.5'
scipy.version == '1.7.2'

@omareldeeb omareldeeb changed the title IndexError in self.correct branch in DBNDownBeatTrackingProcessor process function. IndexError in self.correct branch of DBNDownBeatTrackingProcessor process function. Nov 30, 2021
@omareldeeb omareldeeb linked a pull request Nov 30, 2021 that will close this issue
@superbock
Copy link
Collaborator

Thanks for pointing this out, will release a fix soon. I can't merge yours, since it actually has undesired side-effects.

@superbock superbock linked a pull request Jan 6, 2022 that will close this issue
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 a pull request may close this issue.

2 participants