|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
Zero-allocation, thread-safe transient shaper. More...
#include <TransientDesigner.h>
Public Member Functions | |
| ~TransientDesigner ()=default | |
| void | prepare (const AudioSpec &spec) noexcept |
| Prepares the processor with the current audio specification. | |
| void | prepare (double sampleRate) noexcept |
| Prepares the processor with a specific sample rate. | |
| void | processBlock (AudioBufferView< T > buffer) noexcept |
| Processes an audio buffer in-place. | |
| void | setAttack (T amount) noexcept |
| Sets attack (transient) emphasis. | |
| void | setSustain (T amount) noexcept |
| Sets sustain (body) emphasis. | |
| void | setOutputDepRecovery (bool enabled) noexcept |
| Enables output-dependent recovery (ODR). | |
| void | setCharacter (T amount) noexcept |
| Sets character as a single macro-knob (overwrites attack AND sustain). | |
| void | reset () noexcept |
| Clears all internal buffers and state. Must be lock-free. | |
| 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). | |
Zero-allocation, thread-safe transient shaper.
The per-channel envelope recursion is inherently serial (no SIMD); the channel-outer loop keeps each channel's state in registers and the data accesses cache-friendly.
| T | Sample type (float or double). |
Definition at line 63 of file TransientDesigner.h.
|
default |
|
inline |
Serializes the parameter state (setup/UI threads; allocates).
Definition at line 225 of file TransientDesigner.h.
|
inlinenoexcept |
Prepares the processor with the current audio specification.
| spec | Audio specification including sample rate (invalid specs are ignored). |
Definition at line 74 of file TransientDesigner.h.
|
inlinenoexcept |
Prepares the processor with a specific sample rate.
| sampleRate | The operating sample rate in Hz. Non-finite or non-positive rates are ignored (a NaN rate used to pass the coefficient guard and poison the envelopes permanently). |
Definition at line 87 of file TransientDesigner.h.
|
inlinenoexcept |
Processes an audio buffer in-place.
| buffer | View of the audio buffer to process. |
Definition at line 99 of file TransientDesigner.h.
|
inlinenoexcept |
Clears all internal buffers and state. Must be lock-free.
Definition at line 216 of file TransientDesigner.h.
|
inlinenoexcept |
Sets attack (transient) emphasis.
| amount | -100 to +100 (%). Positive = boost transients, negative = soften. |
Definition at line 176 of file TransientDesigner.h.
|
inlinenoexcept |
Sets character as a single macro-knob (overwrites attack AND sustain).
| amount | Range [-1.0, 1.0]. -1 = soften transients/boost sustain, +1 = boost transients/reduce sustain. |
Definition at line 205 of file TransientDesigner.h.
|
inlinenoexcept |
Enables output-dependent recovery (ODR).
| enabled | If true, slow envelope release speed scales with output level. |
Definition at line 196 of file TransientDesigner.h.
|
inline |
Restores parameters from a blob (tolerant; rejects foreign ids).
Definition at line 237 of file TransientDesigner.h.
|
inlinenoexcept |
Sets sustain (body) emphasis.
| amount | -100 to +100 (%). Positive = boost sustain, negative = reduce. |
Definition at line 186 of file TransientDesigner.h.