VCV Rack API v2
Loading...
Searching...
No Matches
rack::dsp::MinBlep< Z, O > Struct Template Reference

Holds a precomputed minBLEP impulse response, reordered to efficiently insert into an audio buffer. More...

#include <minblep.hpp>

Classes

struct  State

Public Member Functions

 MinBlep ()
const float * getImpulse (int o, int z) const
 Get pointer to impulse data, handling o wrapping and z offset.
template<typename T>
void insertDiscontinuity (State< T > &s, float p, T x) const
 Places a discontinuity with magnitude x at 0 < p <= 1 relative to the current frame.
template<typename T>
process (State< T > &s) const
 Should be called every frame after inserting any discontinuities.

Public Attributes

float impulseReordered [O][1+2 *Z+4] = {}
 Reordered impulse response for cubic interpolation, minus 1.0.

Detailed Description

template<int Z, int O>
struct rack::dsp::MinBlep< Z, O >

Holds a precomputed minBLEP impulse response, reordered to efficiently insert into an audio buffer.

Constructor & Destructor Documentation

◆ MinBlep()

template<int Z, int O>
rack::dsp::MinBlep< Z, O >::MinBlep ( )
inline

Member Function Documentation

◆ getImpulse()

template<int Z, int O>
const float * rack::dsp::MinBlep< Z, O >::getImpulse ( int o,
int z ) const
inline

Get pointer to impulse data, handling o wrapping and z offset.

◆ insertDiscontinuity()

template<int Z, int O>
template<typename T>
void rack::dsp::MinBlep< Z, O >::insertDiscontinuity ( State< T > & s,
float p,
T x ) const
inline

Places a discontinuity with magnitude x at 0 < p <= 1 relative to the current frame.

For example if a square wave will jump from 1 to -1 in 0.1 frames, use insertDiscontinuity(0.1, -2.0).

Note: In the deprecated MinBlepGenerator, p was in the range (-1, 0], so add 1 to p if updating to MinBlep.

◆ process()

template<int Z, int O>
template<typename T>
T rack::dsp::MinBlep< Z, O >::process ( State< T > & s) const
inline

Should be called every frame after inserting any discontinuities.

Member Data Documentation

◆ impulseReordered

template<int Z, int O>
float rack::dsp::MinBlep< Z, O >::impulseReordered[O][1+2 *Z+4] = {}

Reordered impulse response for cubic interpolation, minus 1.0.

Z dimension has +1 padding at start (for z-1 wrap) and +4 at end (for SIMD + z+1 wrap). Access via getImpulse() which handles O wrapping and Z offset.


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