From 30a43faab9856d8d13471a8e4c071cb564feab8e Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 27 Feb 2024 15:26:28 +0000 Subject: [PATCH] fix the init of the debounce counter in the 3 slicers that had it --- include/algorithms/public/EnvelopeSegmentation.hpp | 4 ++-- include/algorithms/public/NoveltySegmentation.hpp | 4 ++-- include/algorithms/public/OnsetSegmentation.hpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/algorithms/public/EnvelopeSegmentation.hpp b/include/algorithms/public/EnvelopeSegmentation.hpp index a9f31e4b4..958ff100f 100644 --- a/include/algorithms/public/EnvelopeSegmentation.hpp +++ b/include/algorithms/public/EnvelopeSegmentation.hpp @@ -28,7 +28,7 @@ class EnvelopeSegmentation void init(double floor, double hiPassFreq) { mEnvelope.init(floor,hiPassFreq); - mDebounceCount = 1; + mDebounceCount = 0; mPrevValue = 0; mState = false; } @@ -63,7 +63,7 @@ class EnvelopeSegmentation private: Envelope mEnvelope; - index mDebounceCount{1}; + index mDebounceCount{0}; double mPrevValue{0}; bool mState{false}; }; diff --git a/include/algorithms/public/NoveltySegmentation.hpp b/include/algorithms/public/NoveltySegmentation.hpp index d17f2b647..854471f4e 100644 --- a/include/algorithms/public/NoveltySegmentation.hpp +++ b/include/algorithms/public/NoveltySegmentation.hpp @@ -36,7 +36,7 @@ class NoveltySegmentation Allocator& alloc = FluidDefaultAllocator()) { mNovelty.init(kernelSize, filterSize, nDims, alloc); - mDebounceCount = 1; + mDebounceCount = 0; mPeakBuffer.setZero(); } @@ -64,7 +64,7 @@ class NoveltySegmentation private: NoveltyFeature mNovelty; ScopedEigenMap mPeakBuffer; - index mDebounceCount{1}; + index mDebounceCount{0}; }; } // namespace algorithm } // namespace fluid diff --git a/include/algorithms/public/OnsetSegmentation.hpp b/include/algorithms/public/OnsetSegmentation.hpp index 5cf9ab1c9..3e3c11a3d 100644 --- a/include/algorithms/public/OnsetSegmentation.hpp +++ b/include/algorithms/public/OnsetSegmentation.hpp @@ -38,7 +38,7 @@ class OnsetSegmentation void init(index windowSize, index fftSize, index filterSize) { mODF.init(windowSize, fftSize, filterSize); - mDebounceCount = 1; + mDebounceCount = 0; } /// input window isn't necessarily a single framre because it should encompass @@ -66,7 +66,7 @@ class OnsetSegmentation } private: - index mDebounceCount{1}; + index mDebounceCount{0}; OnsetDetectionFunctions mODF; double mPrevFuncVal{0.0}; };