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

The deepest gain change of a sliding window (HoldMode::EveryPeak). More...

#include <Compressor.h>

Public Member Functions

void configure (int windowSamples) noexcept
 Sets the window in samples and empties it.
 
void clear () noexcept
 
T push (T gr, int perSample=1) noexcept
 One value in, the deepest of the window out.
 

Public Attributes

std::array< T, kSlots > depth {}
 
std::array< uint32_t, kSlots > block {}
 
int head = 0
 
int count = 0
 
int inBlock = 0
 
int blockLength = 1
 
int blocks = 1
 
uint32_t index = 0
 
T current = T(0)
 

Static Public Attributes

static constexpr int kBlocks = 256
 Blocks the window is cut in, at most.
 
static constexpr int kSlots = 2 * kBlocks
 Room of the queue (a power of two, over kBlocks + 1).
 

Detailed Description

template<FloatType T>
struct dspark::Compressor< T >::SlidingDeepest

The deepest gain change of a sliding window (HoldMode::EveryPeak).

The window is cut in at most kBlocks blocks. The deepest value of each finished block waits in a queue kept in falling order of depth (a block that a later, deeper one covers is dropped), so the deepest of the window is the front of the queue or the block in progress. A value is held for the window and at most one block more.

Definition at line 3514 of file Compressor.h.

Member Function Documentation

◆ clear()

template<FloatType T>
void dspark::Compressor< T >::SlidingDeepest::clear ( )
inlinenoexcept

Definition at line 3533 of file Compressor.h.

◆ configure()

template<FloatType T>
void dspark::Compressor< T >::SlidingDeepest::configure ( int  windowSamples)
inlinenoexcept

Sets the window in samples and empties it.

Definition at line 3525 of file Compressor.h.

◆ push()

template<FloatType T>
T dspark::Compressor< T >::SlidingDeepest::push ( T  gr,
int  perSample = 1 
)
inlinenoexcept

One value in, the deepest of the window out.

Parameters
grGain change in dB (either sign: the deepest is the largest magnitude).
perSampleValues pushed per sample (the window is in samples).

Definition at line 3545 of file Compressor.h.

Member Data Documentation

◆ block

template<FloatType T>
std::array<uint32_t, kSlots> dspark::Compressor< T >::SlidingDeepest::block {}

Definition at line 3519 of file Compressor.h.

◆ blockLength

template<FloatType T>
int dspark::Compressor< T >::SlidingDeepest::blockLength = 1

Definition at line 3520 of file Compressor.h.

◆ blocks

template<FloatType T>
int dspark::Compressor< T >::SlidingDeepest::blocks = 1

Definition at line 3520 of file Compressor.h.

◆ count

template<FloatType T>
int dspark::Compressor< T >::SlidingDeepest::count = 0

Definition at line 3520 of file Compressor.h.

◆ current

template<FloatType T>
T dspark::Compressor< T >::SlidingDeepest::current = T(0)

Definition at line 3522 of file Compressor.h.

◆ depth

template<FloatType T>
std::array<T, kSlots> dspark::Compressor< T >::SlidingDeepest::depth {}

Definition at line 3518 of file Compressor.h.

◆ head

template<FloatType T>
int dspark::Compressor< T >::SlidingDeepest::head = 0

Definition at line 3520 of file Compressor.h.

◆ inBlock

template<FloatType T>
int dspark::Compressor< T >::SlidingDeepest::inBlock = 0

Definition at line 3520 of file Compressor.h.

◆ index

template<FloatType T>
uint32_t dspark::Compressor< T >::SlidingDeepest::index = 0

Definition at line 3521 of file Compressor.h.

◆ kBlocks

template<FloatType T>
constexpr int dspark::Compressor< T >::SlidingDeepest::kBlocks = 256
staticconstexpr

Blocks the window is cut in, at most.

Definition at line 3516 of file Compressor.h.

◆ kSlots

template<FloatType T>
constexpr int dspark::Compressor< T >::SlidingDeepest::kSlots = 2 * kBlocks
staticconstexpr

Room of the queue (a power of two, over kBlocks + 1).

Definition at line 3517 of file Compressor.h.


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