Skip to content

Commit

Permalink
Merge pull request #140 from CPJKU/add_refs_for_downbeats
Browse files Browse the repository at this point in the history
Add references for ISMIR 2016 RNN/DBN downbeat paper
  • Loading branch information
Sebastian Böck committed Jun 8, 2016
2 parents 7f69a87 + df2eae7 commit 6b34ba9
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 8 deletions.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ References
*An Efficient State Space Model for Joint Tempo and Meter Tracking*,
Proceedings of the 16th International Society for Music Information
Retrieval Conference (ISMIR), 2015.
.. [14] Sebastian Böck, Florian Krebs and Gerhard Widmer,
*Joint Beat and Downbeat Tracking with Recurrent Neural Networks*,
Proceedings of the 17th International Society for Music Information
Retrieval Conference (ISMIR), 2016.
Acknowledgements
Expand Down
5 changes: 4 additions & 1 deletion bin/DBNDownBeatTracker
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def main():
The DBNDownBeatTracker program detects all beats and downbeats in an audio
file according to the method described in:
TODO: add reference
"Joint Beat and Downbeat Tracking with Recurrent Neural Networks"
Sebastian Böck, Florian Krebs and Gerhard Widmer.
Proceedings of the 17th International Society for Music Information
Retrieval Conference (ISMIR), 2016.
This program can be run in 'single' file mode to process a single audio
file and write the detected beats to STDOUT or the given output file.
Expand Down
2 changes: 1 addition & 1 deletion madmom/features/beats.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ class DBNDownBeatTrackingProcessor(Processor):

MIN_BPM = 55.
MAX_BPM = 215.
NUM_TEMPI = None
NUM_TEMPI = 60
TRANSITION_LAMBDA = 100
OBSERVATION_LAMBDA = 16
THRESHOLD = 0.05
Expand Down
7 changes: 7 additions & 0 deletions madmom/features/beats_hmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,13 @@ class RNNDownBeatTrackingObservationModel(ObservationModel):
first representing (down-)beat states and the remaining non-beat
states.
References
----------
.. [1] Sebastian Böck, Florian Krebs and Gerhard Widmer,
"Joint Beat and Downbeat Tracking with Recurrent Neural Networks"
Proceedings of the 17th International Society for Music Information
Retrieval Conference (ISMIR), 2016.
"""

def __init__(self, state_space, observation_lambda):
Expand Down
Binary file modified tests/data/activations/sample.downbeats_blstm_2016.npz
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/data/detections/sample.dbn_downbeat_tracker.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
0.090 1
0.440 2
0.450 2
0.790 3
1.120 4
1.470 1
Expand Down
8 changes: 4 additions & 4 deletions tests/test_features_beats.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ def test_values(self):
# we have to test each bar length individually
path, prob = self.processor.hmms[0].viterbi(sample_downbeat_act)
self.assertTrue(np.allclose(path[:13],
[11478, 11479, 11480, 11481, 11482, 11483,
11484, 11485, 217, 218, 219, 220, 221]))
self.assertTrue(np.allclose(prob, -766.314167769))
[7682, 7683, 7684, 7685, 7686, 7687, 7688,
7689, 217, 218, 219, 220, 221]))
self.assertTrue(np.allclose(prob, -764.586595603))
tm = self.processor.hmms[0].transition_model
positions = tm.state_space.state_positions[path]
self.assertTrue(np.allclose(positions[:10],
Expand All @@ -149,7 +149,7 @@ def test_values(self):

def test_process(self):
downbeats = self.processor(sample_downbeat_act)
self.assertTrue(np.allclose(downbeats, [[0.09, 1], [0.44, 2],
self.assertTrue(np.allclose(downbeats, [[0.09, 1], [0.45, 2],
[0.79, 3], [1.12, 4],
[1.47, 1], [1.8, 2],
[2.14, 3], [2.49, 4]]))
Expand Down

0 comments on commit 6b34ba9

Please sign in to comment.