x_corr = core.autocorrelate(onset_envelope[mincol:maxcol], ac_window)
// re-weight the autocorrelation by log-normal prior
bpms = 60.0 * fft_res / (np.arange(1, ac_window+1))
// Smooth the autocorrelation by a log-normal distribution
x_corr = x_corr * np.exp(-0.5 * ((np.log2(bpms / start_bpm)) / std_bpm)**2)
// Get the local maximum of weighted correlation
x_peaks = util.localmax(x_corr)
After Change
bpms = core.tempo_frequencies(ac_window, hop_length=hop_length, sr=sr)[1:]
// Weight the autocorrelation by a log-normal distribution centered start_bpm
x_corr *= np.exp(-0.5 * ((np.log2(bpms) - np.log2(start_bpm)) / std_bpm)**2)
// Get the local maximum of weighted correlation
x_peaks = util.localmax(x_corr)