DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::detail::AdaaTape Struct Reference

#include <Saturation.h>

Collaboration diagram for dspark::detail::AdaaTape:

Classes

struct  Point
 

Public Member Functions

void reset (double u, double alphaIn) noexcept
 
double process (double H, double alphaIn) noexcept
 
void setCurve (double alphaIn) noexcept
 
Point point (double H, double seed) const noexcept
 

Static Public Member Functions

static double div (const Point &p, const Point &q) noexcept
 
static double average (const Point &p0, const Point &p1, const Point &p2) noexcept
 

Public Attributes

const AdaaTapeTable * table = nullptr
 
double alpha = -1.0
 
double a = 1.0
 
double rho = 0.0
 Curve of the points held.
 
double h1 = 0.0
 
double h2 = 0.0
 Inputs one and two samples ago.
 
Point p1
 
Point p2
 

Detailed Description

Second-order kernel of the tape curve (one stream): the curve's average over the linear B-spline with knots at the last three inputs, from F2 differences. Close inputs use the Euler-Maclaurin form of the divided difference, (F1(a) + F1(b))/2 - (a - b)(f(a) - f(b))/12, and the confluent and coincident forms of Core/detail/Adaa.h written with the same per-sample data, so no solve is needed between samples. Within 1e-7 of a brute-force Gauss quadrature of the curve over the same B-spline, for random knots from 1e-7 to 50 apart. A change of the curve (character) re-evaluates the two held inputs on the new curve.

Definition at line 949 of file Saturation.h.

Member Function Documentation

◆ average()

static double dspark::detail::AdaaTape::average ( const Point &  p0,
const Point &  p1,
const Point &  p2 
)
inlinestaticnoexcept

Definition at line 1024 of file Saturation.h.

◆ div()

static double dspark::detail::AdaaTape::div ( const Point &  p,
const Point &  q 
)
inlinestaticnoexcept

Definition at line 1017 of file Saturation.h.

◆ point()

Point dspark::detail::AdaaTape::point ( double  H,
double  seed 
) const
inlinenoexcept

Solves H = a x - rho L(x) by Newton from the seed (slope in [1/3, a]).

Definition at line 993 of file Saturation.h.

◆ process()

double dspark::detail::AdaaTape::process ( double  H,
double  alphaIn 
)
inlinenoexcept

The antialiased output for input H, centred one sample back.

Definition at line 968 of file Saturation.h.

◆ reset()

void dspark::detail::AdaaTape::reset ( double  u,
double  alphaIn 
)
inlinenoexcept

Holds u as the whole history (arming).

Definition at line 959 of file Saturation.h.

◆ setCurve()

void dspark::detail::AdaaTape::setCurve ( double  alphaIn)
inlinenoexcept

Definition at line 985 of file Saturation.h.

Member Data Documentation

◆ a

double dspark::detail::AdaaTape::a = 1.0

Definition at line 954 of file Saturation.h.

◆ alpha

double dspark::detail::AdaaTape::alpha = -1.0

Definition at line 954 of file Saturation.h.

◆ h1

double dspark::detail::AdaaTape::h1 = 0.0

Definition at line 955 of file Saturation.h.

◆ h2

double dspark::detail::AdaaTape::h2 = 0.0

Inputs one and two samples ago.

Definition at line 955 of file Saturation.h.

◆ p1

Point dspark::detail::AdaaTape::p1

Definition at line 956 of file Saturation.h.

◆ p2

Point dspark::detail::AdaaTape::p2

Definition at line 956 of file Saturation.h.

◆ rho

double dspark::detail::AdaaTape::rho = 0.0

Curve of the points held.

Definition at line 954 of file Saturation.h.

◆ table

const AdaaTapeTable* dspark::detail::AdaaTape::table = nullptr

Definition at line 953 of file Saturation.h.


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