|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
One/two 12AX7 stages with sag and a WDF tone circuit. More...
#include <TubePreamp.h>
Public Member Functions | |
| void | prepare (const AudioSpec &spec) |
| Allocates the chain (one circuit instance per channel) and runs the reference calibration. Invalid specs (non-positive or non-finite rate, block size or channel count) are ignored: the previous state is kept and an unprepared instance stays pass-through. | |
| void | reset () noexcept |
| Re-settles every stage at its DC operating point. RT-safe. | |
| void | setDrive (T db) noexcept |
| Input drive in dB [-12, +36]; level-compensated. Non-finite values are ignored. | |
| void | setTreble (T treble) noexcept |
| Treble control of the FMV stack [0, 1]. Non-finite values are ignored. | |
| void | setBass (T bass) noexcept |
| Bass control of the FMV stack [0, 1] (log-taper, like the original). Non-finite values are ignored. | |
| void | setMiddle (T middle) noexcept |
| Middle control of the FMV stack [0, 1]. Non-finite values are ignored. | |
| void | setSag (T sag) noexcept |
| Supply sag depth [0, 1] (0 = stiff supply). Non-finite values are ignored. | |
| void | setStages (int stages) noexcept |
| Number of triode stages (1 = clean/edge, 2 = high gain). | |
| void | setOversampling (int factor) |
| Configures internal oversampling of the nonlinear circuit (RF-009/ADR-011 transparency policy). SETUP THREAD ONLY - it reallocates the polyphase filters and re-runs the reference calibration exactly like prepare(); never call it concurrently with processBlock(). | |
| int | getOversamplingFactor () const noexcept |
| Active oversampling factor (1 = off, 2 = default). | |
| void | setOutput (T db) noexcept |
| Static output trim in dB [-24, +12]. Non-finite values are ignored. | |
| void | setMix (T mix) noexcept |
| Dry/wet mix [0, 1]; dry is latency-compensated and the mix is smoothed linearly over one block. Non-finite values are ignored. | |
| T | getDrive () const noexcept |
| T | getTreble () const noexcept |
| T | getBass () const noexcept |
| T | getMiddle () const noexcept |
| T | getSag () const noexcept |
| int | getStages () const noexcept |
| T | getOutput () const noexcept |
| T | getMix () const noexcept |
| int | getLatency () const noexcept |
| Latency in samples the active oversampler adds (0 at 1x = off); reflects the current factor for host PDC (RF-009/ADR-011). | |
| int | getLatencySamples () const noexcept |
| Alias of getLatency() under the framework-wide latency-reporter name (RNF-005), so ProcessorChain::getLatency() includes this stage. | |
| T | getSupplyVoltage () const noexcept |
| Effective B+ supply voltage of channel 0 (sag meter readout). | |
| std::vector< uint8_t > | getState () const |
| Serializes the parameter state (setup/UI threads; allocates). | |
| bool | setState (const uint8_t *data, size_t size) |
| Restores parameters from a blob (tolerant; rejects foreign ids). | |
| void | processBlock (AudioBufferView< T > buffer) noexcept |
| Processes a block in-place. Pass-through until prepare() succeeds. | |
One/two 12AX7 stages with sag and a WDF tone circuit.
| T | Sample type (float or double). |
Definition at line 101 of file TubePreamp.h.
|
inlinenoexcept |
Definition at line 266 of file TubePreamp.h.
|
inlinenoexcept |
Definition at line 264 of file TubePreamp.h.
|
inlinenoexcept |
Latency in samples the active oversampler adds (0 at 1x = off); reflects the current factor for host PDC (RF-009/ADR-011).
Definition at line 275 of file TubePreamp.h.
|
inlinenoexcept |
Alias of getLatency() under the framework-wide latency-reporter name (RNF-005), so ProcessorChain::getLatency() includes this stage.
Definition at line 279 of file TubePreamp.h.
|
inlinenoexcept |
Definition at line 267 of file TubePreamp.h.
|
inlinenoexcept |
Definition at line 271 of file TubePreamp.h.
|
inlinenoexcept |
Definition at line 270 of file TubePreamp.h.
|
inlinenoexcept |
Active oversampling factor (1 = off, 2 = default).
Definition at line 247 of file TubePreamp.h.
|
inlinenoexcept |
Definition at line 268 of file TubePreamp.h.
|
inlinenoexcept |
Definition at line 269 of file TubePreamp.h.
|
inline |
Serializes the parameter state (setup/UI threads; allocates).
Definition at line 288 of file TubePreamp.h.
|
inlinenoexcept |
Effective B+ supply voltage of channel 0 (sag meter readout).
Definition at line 282 of file TubePreamp.h.
|
inlinenoexcept |
Definition at line 265 of file TubePreamp.h.
|
inline |
Allocates the chain (one circuit instance per channel) and runs the reference calibration. Invalid specs (non-positive or non-finite rate, block size or channel count) are ignored: the previous state is kept and an unprepared instance stays pass-through.
Definition at line 110 of file TubePreamp.h.
|
inlinenoexcept |
Processes a block in-place. Pass-through until prepare() succeeds.
Definition at line 327 of file TubePreamp.h.
|
inlinenoexcept |
Re-settles every stage at its DC operating point. RT-safe.
Definition at line 153 of file TubePreamp.h.
|
inlinenoexcept |
Bass control of the FMV stack [0, 1] (log-taper, like the original). Non-finite values are ignored.
Definition at line 191 of file TubePreamp.h.
|
inlinenoexcept |
Input drive in dB [-12, +36]; level-compensated. Non-finite values are ignored.
Definition at line 174 of file TubePreamp.h.
|
inlinenoexcept |
Middle control of the FMV stack [0, 1]. Non-finite values are ignored.
Definition at line 199 of file TubePreamp.h.
|
inlinenoexcept |
Dry/wet mix [0, 1]; dry is latency-compensated and the mix is smoothed linearly over one block. Non-finite values are ignored.
Definition at line 258 of file TubePreamp.h.
|
inlinenoexcept |
Static output trim in dB [-24, +12]. Non-finite values are ignored.
Definition at line 250 of file TubePreamp.h.
|
inline |
Configures internal oversampling of the nonlinear circuit (RF-009/ADR-011 transparency policy). SETUP THREAD ONLY - it reallocates the polyphase filters and re-runs the reference calibration exactly like prepare(); never call it concurrently with processBlock().
| factor | Power-of-two multiplier in {1,2,4,8,16}. 1 = OFF (no internal resampling, zero added latency; the triode/grid nonlinearity then aliases in-band unless the surrounding chain is oversampled). 2 is the default. Higher factors lower the alias floor at ~linearly higher CPU. Invalid or non-power-of-two values are ignored. getLatency() reflects the new factor after this call (0 at 1x). |
Definition at line 234 of file TubePreamp.h.
|
inlinenoexcept |
Supply sag depth [0, 1] (0 = stiff supply). Non-finite values are ignored.
Definition at line 207 of file TubePreamp.h.
|
inlinenoexcept |
Number of triode stages (1 = clean/edge, 2 = high gain).
Definition at line 215 of file TubePreamp.h.
|
inline |
Restores parameters from a blob (tolerant; rejects foreign ids).
Definition at line 306 of file TubePreamp.h.
|
inlinenoexcept |
Treble control of the FMV stack [0, 1]. Non-finite values are ignored.
Definition at line 182 of file TubePreamp.h.