Skip to content

Commit

Permalink
Merge pull request #264 from tremblap/fix/init-debounce-in-slicers
Browse files Browse the repository at this point in the history
fix #259 init debounce counter
  • Loading branch information
tremblap authored Feb 28, 2024
2 parents 179a62c + 30a43fa commit 52c8621
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 52c8621

Please sign in to comment.