DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::detail::OnsetPeakPicker< T > Class Template Referencefinal

Allocation-free symmetric novelty peak picker with an explicit frame clock. More...

#include <OnsetFeatures.h>

Classes

struct  Windows
 

Public Member Functions

template<typename Value >
bool accept (std::size_t index, std::size_t count, Value value, Windows windows, T delta)
 Examines increasing indices in an immutable, finite novelty sequence. The accessor returns T. Summation order and equal-maximum handling match the original offline OnsetDetector picker. No source timing is inferred.
 
template<typename Value , typename Gate >
bool accept (std::size_t index, std::size_t count, Value value, Windows windows, T delta, T meanScale, Gate gate)
 accept() with the moving mean scaled and a final veto. The veto is consulted only for a candidate that passed the maximum and mean tests; a vetoed candidate does not start the wait window, exactly as one that failed them. A scale of one is the plain picker above.
 

Detailed Description

template<FloatType T>
class dspark::detail::OnsetPeakPicker< T >

Allocation-free symmetric novelty peak picker with an explicit frame clock.

Definition at line 34 of file OnsetFeatures.h.

Member Function Documentation

◆ accept() [1/2]

template<FloatType T>
template<typename Value >
bool dspark::detail::OnsetPeakPicker< T >::accept ( std::size_t  index,
std::size_t  count,
Value  value,
Windows  windows,
T  delta 
)
inline

Examines increasing indices in an immutable, finite novelty sequence. The accessor returns T. Summation order and equal-maximum handling match the original offline OnsetDetector picker. No source timing is inferred.

Definition at line 50 of file OnsetFeatures.h.

◆ accept() [2/2]

template<FloatType T>
template<typename Value , typename Gate >
bool dspark::detail::OnsetPeakPicker< T >::accept ( std::size_t  index,
std::size_t  count,
Value  value,
Windows  windows,
T  delta,
T  meanScale,
Gate  gate 
)
inline

accept() with the moving mean scaled and a final veto. The veto is consulted only for a candidate that passed the maximum and mean tests; a vetoed candidate does not start the wait window, exactly as one that failed them. A scale of one is the plain picker above.

Parameters
indexCandidate index, increasing between calls.
countLength of the novelty sequence.
valueAccessor returning the novelty at an index.
windowsMaximum, average and wait windows.
deltaMargin above the scaled moving mean.
meanScaleFactor on the moving mean.
gateCallable taking the index and the candidate's margin over the threshold; false rejects the candidate.
Returns
True when the candidate is selected.

Definition at line 71 of file OnsetFeatures.h.


The documentation for this class was generated from the following file: