feat: StepDetector update FPS, more FPS fixes
This commit is contained in:
@@ -86,6 +86,7 @@ SsfStepDetector::SsfStepDetector(double fps) :
|
||||
{
|
||||
assert (LEN_INIT >= LEN_TH_WIN && "LEN_INIT < LEN_TH_WIN, check normalization of initial ssf_threshold");
|
||||
}
|
||||
SsfStepDetector::~SsfStepDetector() {}
|
||||
double SsfStepDetector::filter(double ssf) {
|
||||
double ssf_mean = f_ssf_mean.filter(ssf) / ((double) LEN_TH_WIN);
|
||||
double rv = 0.0;
|
||||
@@ -154,8 +155,13 @@ void RunningQuality::replaceTemplate(std::vector<double>& x) {
|
||||
void RunningQuality::dispatchLocked() { /* implement me, add Listener etc. */ }
|
||||
void RunningQuality::dispatchBeat(int idx, bool good, double posCorr) { /* implement me, add Listener etc. */ }
|
||||
|
||||
RunningQuality::RunningQuality(): beatCorrThr2(BEAT_CORR_THR_2), justLocked(false), idx(0), disableSsf(false) {}
|
||||
RunningQuality::RunningQuality(bool disableSsf): beatCorrThr2(BEAT_CORR_THR_2), justLocked(false), idx(0), disableSsf(disableSsf) {}
|
||||
static int get_beat_len(double fps) {
|
||||
/* 2*FPS for 30 bpm lower end */
|
||||
return 2.0 * fps;
|
||||
}
|
||||
|
||||
RunningQuality::RunningQuality(double fps): BEAT_LEN(get_beat_len(fps)), beatCorrThr2(BEAT_CORR_THR_2), justLocked(false), idx(0), disableSsf(false) {}
|
||||
RunningQuality::RunningQuality(double fps, bool disableSsf): BEAT_LEN(get_beat_len(fps)), beatCorrThr2(BEAT_CORR_THR_2), justLocked(false), idx(0), disableSsf(disableSsf) {}
|
||||
RunningQuality::~RunningQuality() {}
|
||||
|
||||
// note: arg should be an iterator really, but can do later
|
||||
@@ -221,7 +227,8 @@ bool RunningQuality::append(std::vector<double> &rawBeat, std::vector<double> &r
|
||||
}
|
||||
|
||||
|
||||
RunningQualityFilter::RunningQualityFilter(double fps) : sqi(0.0) {}
|
||||
RunningQualityFilter::RunningQualityFilter(double fps) : f_sqi(fps), sqi(0.0) {}
|
||||
RunningQualityFilter::~RunningQualityFilter() {}
|
||||
|
||||
double RunningQualityFilter::filter(double y, double ssf, double step) {
|
||||
if (step == 1.0) {
|
||||
|
||||
Reference in New Issue
Block a user