CPJKU / madmom

Python audio and music signal processing library
https://madmom.readthedocs.io
Other
1.35k stars 206 forks source link

DBNBarTrackingProcessor doesn't accept a single beats_per_bar #393

Closed radkoff closed 5 years ago

radkoff commented 5 years ago

Expected behaviour

According to the docs, DBNBarTrackingProcessor "can be either a single number or a list with bar lengths".

Actual behaviour

If I pass a single integer, I get TypeError: 'int' object is not iterable on line 1097 of downbeats.py If I pass [4] I get ZeroDivisionError: float division by zero on line 467 of beats_hmm.py I can get it working by passing a second funky number like [4, 17], but this is very hacky

Reproducing code

act = madmom.features.downbeats.RNNBarProcessor()((path, beats))
proc = madmom.features.downbeats.DBNBarTrackingProcessor(fps=100, beats_per_bar=4)
downbeats = proc(act)

or

act = madmom.features.downbeats.RNNBarProcessor()((path, beats))
proc = madmom.features.downbeats.DBNBarTrackingProcessor(fps=100, beats_per_bar=[4])
downbeats = proc(act)

Information about installed software

I'm using version 0.17.dev0

superbock commented 5 years ago

Thanks for reporting #394 should fix it.