#include <character_delay.hpp>
Public Types | |
| enum class | Character { clean , vintage_digital , tape , bbd , diffusion } |
| enum class | TapeTier { standard , physical } |
Public Member Functions | |
| void | set_sample_rate (double sample_rate) |
| Allocates every buffer for the 2 s left-channel maximum times the largest right-channel offset, recomputes coefficients, then resets. | |
| void | set_character (Character character) |
| void | set_tape_tier (TapeTier tier) |
| void | set_tape_speed_ips (SampleType ips) |
| void | set_time_ms (SampleType left_ms) |
| void | set_time_offset (SampleType multiplier) |
| Right-channel time as a MULTIPLE of the left. | |
| void | set_right_time_ms (SampleType right_ms) |
| Right-channel time in MILLISECONDS, independent of the left. | |
| bool | right_time_is_absolute () const noexcept |
| True while the right channel is following set_right_time_ms(). | |
| double | right_time_ms () const noexcept |
| The right channel's target time in ms, whichever mode is selected. | |
| void | set_feedback (SampleType feedback) |
| void | set_crossfeed (SampleType crossfeed) |
| void | set_character_amount (SampleType amount) |
| void | set_diffusion_amount (SampleType amount) |
| void | set_mod (SampleType rate01, SampleType depth01) |
| void | set_duck (SampleType amount01) |
| void | set_freeze (bool on) |
| void | set_reverse (bool on) |
| void | set_loop_low_cut_hz (SampleType hz) |
| void | set_loop_low_cut_resonance (SampleType q) |
| void | set_loop_high_cut_hz (SampleType hz) |
| void | set_loop_high_cut_resonance (SampleType q) |
| bool | loop_tone_active () const noexcept |
| True when the in-loop tone stage is doing anything at all. | |
| int | latency_samples () const noexcept |
| Always 0. | |
| void | reset () noexcept |
| Allocation-free. | |
| void | process (SampleType *left, SampleType *right, int num_samples) noexcept |
| Stereo, in place, WET ONLY. | |
| void | set_bbd_compander_enabled (bool enabled) noexcept |
| Bypass the BBD compander. | |
| double | bbd_bandwidth_hz () const noexcept |
| std::size_t | bbd_stages () const noexcept |
| double | vintage_band_edge_hz () const noexcept |
| double | vintage_internal_rate_hz () const noexcept |
| std::size_t | chew_state_index (int channel) const noexcept |
| const std::vector< double > & | tape_gap_coefficients (int channel) const noexcept |
|
strong |
|
strong |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Always 0.
See the header note: the physical tier's in-loop oversampler group delay is folded into the delay line, and every other stage is IIR (group delay is phase, not a bufferable constant).
|
inlinenoexcept |
True when the in-loop tone stage is doing anything at all.
|
inlinenoexcept |
Stereo, in place, WET ONLY.
|
inlinenoexcept |
|
inlinenoexcept |
True while the right channel is following set_right_time_ms().
|
inlinenoexcept |
The right channel's target time in ms, whichever mode is selected.
|
inlinenoexcept |
Bypass the BBD compander.
Proving the compander does anything requires comparing against the same signal path without it.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Right-channel time in MILLISECONDS, independent of the left.
Selects absolute mode, which is what a dual-mono setup (two unrelated delay times) and a millisecond offset both need — neither can be expressed as a ratio, because a fixed ratio is a different millisecond spread at every delay time and a fixed spread is a different ratio.
Ratio mode is restored by calling set_time_offset().
|
inline |
Allocates every buffer for the 2 s left-channel maximum times the largest right-channel offset, recomputes coefficients, then resets.
Must be called before process().
|
inline |
|
inline |
|
inline |
|
inline |
Right-channel time as a MULTIPLE of the left.
Selects ratio mode; the right channel tracks the left, which is what a stereo-spread delay wants.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |