fix: fix mixed up f1, f2
This commit is contained in:
3
beat.py
3
beat.py
@@ -169,11 +169,12 @@ class RegularBeatFinder:
|
||||
def find_beat(self, fs, ssf_zxings, f_hint=None, debug_fe=False, debug_i=None):
|
||||
"""Find the optimal beat frequency."""
|
||||
act_ibis = np.diff(ssf_zxings)
|
||||
# nice-to: may be interesting to also use as score: the ssf amplitude info at the beats to which we aligned
|
||||
# evaluate mean absolute errors for all frequencies
|
||||
freqs, freq_errs = self._get_opt_ibi_freq_2(fs, act_ibis, debug_i)
|
||||
# bias with f_hint - once we know the beat freq, make it more likely for it to be found everywhere
|
||||
if f_hint is not None:
|
||||
nf, f1, f2 = RegularBeatFinder.num_freqs, RegularBeatFinder.range_f2, RegularBeatFinder.range_f1
|
||||
nf, f1, f2 = RegularBeatFinder.num_freqs, RegularBeatFinder.range_f1, RegularBeatFinder.range_f2
|
||||
bias = gauss(
|
||||
nf,
|
||||
(f_hint - f1) / (f2 - f1) * nf,
|
||||
|
||||
Reference in New Issue
Block a user