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

#include <Saturation.h>

Public Member Functions

void antiderivatives (double x, double L, double &G, double &P, double &Q) const noexcept
 

Static Public Member Functions

static const AdaaTapeTable & instance ()
 
static void langevin (double x, double &L, double &Lp) noexcept
 

Detailed Description

Antiderivatives of the anhysteretic tape curve, for its second-order kernel. With x the solution of H = a x - rho L(x) (a = 1/(3(1 - alpha)), rho = alpha/(1 - alpha); see TapeAlgorithm) the curve output is L(x), and with G = ln(sinh x / x) (dG/dx = L), P = int_0^x G and Q = int_0^x L^2,

F1(H) = a G - rho L^2 / 2, F2(H) = a^2 P - a rho G L + (a rho / 2) Q + rho^2 L^3 / 6,

found by integrating in x (dH = (a - rho dL/dx) dx) and by parts. F2 is not elementary: P(x) = x (1 + G) - x^2/2 - pi^2/12 + A(x) and Q(x) = x - L - 2 R(x), R(x) = int_0^x L(t)/t dt = (x - G) - ln 2 + 1/x

  • C + B(x), where A = Li2(e)/2 - x ln(1 - e) and B = ln(1 - e)
  • 2 sum_k E1(2 k x) (e = exp(-2x)) are smooth and exponentially small. A and B are tabulated once per process as degree-11 Chebyshev pieces, eight per octave on [0.5, 32), from their series (dilogarithm, exponential integral by its continued fraction) and are zero beyond 32 (below 1e-26); below 0.5 P, Q, L, its slope and G come from their Taylor series. P and Q stay within 5e-15 (relative, floor 1) of a compensated Gauss quadrature of their integrands.

Definition at line 765 of file Saturation.h.

Member Function Documentation

◆ antiderivatives()

void dspark::detail::AdaaTapeTable::antiderivatives ( double  x,
double  L,
double &  G,
double &  P,
double &  Q 
) const
inlinenoexcept

G = ln(sinh x / x), P and Q for x >= 0, given L(x).

Definition at line 793 of file Saturation.h.

◆ instance()

static const AdaaTapeTable & dspark::detail::AdaaTapeTable::instance ( )
inlinestatic

Shared instance, built on first use (setup thread: TapeAlgorithm::prepare()).

Definition at line 769 of file Saturation.h.

◆ langevin()

static void dspark::detail::AdaaTapeTable::langevin ( double  x,
double &  L,
double &  Lp 
)
inlinestaticnoexcept

L and its slope for x >= 0.

Definition at line 776 of file Saturation.h.


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