Skip to content

Commit

Permalink
fix the init of the debounce counter in the 3 slicers that had it
Browse files Browse the repository at this point in the history
  • Loading branch information
tremblap committed Feb 27, 2024
1 parent 179a62c commit 30a43fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/algorithms/public/EnvelopeSegmentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class EnvelopeSegmentation
void init(double floor, double hiPassFreq)
{
mEnvelope.init(floor,hiPassFreq);
mDebounceCount = 1;
mDebounceCount = 0;
mPrevValue = 0;
mState = false;
}
Expand Down Expand Up @@ -63,7 +63,7 @@ class EnvelopeSegmentation

private:
Envelope mEnvelope;
index mDebounceCount{1};
index mDebounceCount{0};
double mPrevValue{0};
bool mState{false};
};
Expand Down
4 changes: 2 additions & 2 deletions include/algorithms/public/NoveltySegmentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class NoveltySegmentation
Allocator& alloc = FluidDefaultAllocator())
{
mNovelty.init(kernelSize, filterSize, nDims, alloc);
mDebounceCount = 1;
mDebounceCount = 0;
mPeakBuffer.setZero();
}

Expand Down Expand Up @@ -64,7 +64,7 @@ class NoveltySegmentation
private:
NoveltyFeature mNovelty;
ScopedEigenMap<ArrayXd> mPeakBuffer;
index mDebounceCount{1};
index mDebounceCount{0};
};
} // namespace algorithm
} // namespace fluid
4 changes: 2 additions & 2 deletions include/algorithms/public/OnsetSegmentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -66,7 +66,7 @@ class OnsetSegmentation
}

private:
index mDebounceCount{1};
index mDebounceCount{0};
OnsetDetectionFunctions mODF;
double mPrevFuncVal{0.0};
};
Expand Down

0 comments on commit 30a43fa

Please sign in to comment.