|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
Per-channel Jiles-Atherton hysteresis processor (field in, M out). More...
#include <Hysteresis.h>
Public Member Functions | |
| void | prepare (double sampleRate) |
| Prepares the integrator for the given sample rate. | |
| void | reset () noexcept |
| Clears magnetization and integrator state. RT-safe. | |
| void | setParameters (double ms, double a, double alpha, double k, double c) noexcept |
| Sets the Jiles-Atherton parameters. | |
| double | getSaturation () const noexcept |
| Saturation magnetization Ms (A/m). | |
| double | getSmallSignalSusceptibility () const noexcept |
| Small-signal susceptibility dM/dH around the demagnetized state. | |
| T | processSample (T fieldH) noexcept |
| Processes one sample of applied field H, returns magnetization M. | |
Per-channel Jiles-Atherton hysteresis processor (field in, M out).
| T | Sample type of the audio interface (internal math is double). |
Definition at line 57 of file Hysteresis.h.
|
inlinenoexcept |
Saturation magnetization Ms (A/m).
Definition at line 100 of file Hysteresis.h.
|
inlinenoexcept |
Small-signal susceptibility dM/dH around the demagnetized state.
The reversible-branch slope c*chi_an/(1 - c*alpha*chi_an), chi_an = Ms/(3a). Used by consumers (TapeMachine) for exact small-signal gain makeup.
Definition at line 108 of file Hysteresis.h.
|
inline |
Prepares the integrator for the given sample rate.
Definition at line 61 of file Hysteresis.h.
|
inlinenoexcept |
Processes one sample of applied field H, returns magnetization M.
| fieldH | Applied magnetic field (A/m scale of the JA parameters). |
Definition at line 118 of file Hysteresis.h.
|
inlinenoexcept |
Clears magnetization and integrator state. RT-safe.
Definition at line 70 of file Hysteresis.h.
|
inlinenoexcept |
Sets the Jiles-Atherton parameters.
Defaults follow the audio-tape calibration from the DAFx literature.
| ms | Saturation magnetization (A/m). [3.5e5] |
| a | Anhysteretic shape parameter (A/m). [2.2e4] |
| alpha | Inter-domain coupling. [1.6e-3] |
| k | Coercivity / loop-loss parameter (A/m). [2.7e4] |
| c | Reversible magnetization fraction [0, 1). [1.7e-1] |
Definition at line 89 of file Hysteresis.h.