DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::OnsetDetector< T >::OdfFrame Struct Reference

#include <OnsetDetector.h>

Public Attributes

T value = T(0)
 ODF value of the most recent frame.
 
int64_t referenceSample = 0
 Sample index the frame localises to.
 
int64_t frameIndex = 0
 
std::array< T, kNumRegisters > registers {}
 
T linear = T(0)
 

Detailed Description

template<FloatType T>
struct dspark::OnsetDetector< T >::OdfFrame

Definition at line 654 of file OnsetDetector.h.

Member Data Documentation

◆ frameIndex

template<FloatType T>
int64_t dspark::OnsetDetector< T >::OdfFrame::frameIndex = 0

Frames computed since the last reset.

Definition at line 658 of file OnsetDetector.h.

◆ linear

template<FloatType T>
T dspark::OnsetDetector< T >::OdfFrame::linear = T(0)

The linear-magnitude spectral flux of the same frame (half-wave rectified, mean over bins): computed under SuperFlux when setLinearFlux(true), the value itself under SpectralFlux, zero otherwise. It is weighted by loudness, where value is log-compressed per band, so the two read the same events with different emphasis: the loudest sound in the mix against every register's share.

Definition at line 673 of file OnsetDetector.h.

◆ referenceSample

template<FloatType T>
int64_t dspark::OnsetDetector< T >::OdfFrame::referenceSample = 0

Sample index the frame localises to.

Definition at line 657 of file OnsetDetector.h.

◆ registers

template<FloatType T>
std::array<T, kNumRegisters> dspark::OnsetDetector< T >::OdfFrame::registers {}

The same flux restricted to each register group (mean over the group's bands; SuperFlux only, zero for the other methods). A consumer that wants every register to count - a beat tracker, for which a kick is as much evidence as a dense hi-hat - normalises these separately instead of reading value, where the upper registers own most of the bands and so most of the mean.

Definition at line 665 of file OnsetDetector.h.

◆ value

template<FloatType T>
T dspark::OnsetDetector< T >::OdfFrame::value = T(0)

ODF value of the most recent frame.

Definition at line 656 of file OnsetDetector.h.


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