D = scipy.signal.lfilter([1.0, -1.0], [1.0, -0.99], D)
////// Normalize by the maximum onset strength
return D / numpy.max(D)
def _recursive_beat_decomposition(onset, t_min=16, sigma=16):
n = len(onset)
After Change
Z = scipy.signal.lfilter([1.0, -1.0], [1.0, -0.99], Z)
////// Threshold at zero
Z = numpy.maximum(0.0, Z)
////// Normalize by the maximum onset strength
Znorm = numpy.max(Z)
if Znorm == 0:
Znorm = 1.0
pass
return (Z / Znorm, D)
def _recursive_beat_decomposition(onset, t_min=16, sigma=16):
n = len(onset)