From 63d97aa575eca8f422286c68300fc5edc6136161 Mon Sep 17 00:00:00 2001 From: pal1001p Date: Tue, 1 Jul 2025 10:21:36 -0400 Subject: [PATCH] updated len() to .size len(activations) returns TypeError when activations is set with a num_frames of 1, which is needed for online mode for a lot of the processors --- madmom/features/onsets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/madmom/features/onsets.py b/madmom/features/onsets.py index 68924525..49d777ad 100644 --- a/madmom/features/onsets.py +++ b/madmom/features/onsets.py @@ -1150,7 +1150,7 @@ def process_online(self, activations, reset=True, **kwargs): # convert to onset timings onsets = (self.counter + peaks) / float(self.fps) # increase counter - self.counter += len(activations) + self.counter += activations.size # shift if necessary if self.delay: raise ValueError('delay not supported yet in online mode')