|
| void | prepare (double sample_rate, int max_block, int channels) |
| | Size the engine.
|
| bool | load_impulse_response (const SampleType *const *ir_channels, int ir_channel_count, int ir_length, double ir_sample_rate) |
| | Ingest an impulse response.
|
| void | set_ir_gain_db (double db) |
| void | set_predelay_ms (double ms) |
| void | set_true_stereo (bool on) |
| void | set_wet_percent (double percent) |
| void | set_dry_percent (double percent) |
| void | set_width_percent (double percent) |
| void | set_lowcut_hz (double hz) |
| void | set_highcut_hz (double hz) |
| void | set_normalize_mode (IrNormalizeMode mode) |
| | Load-time policy knobs.
|
| void | set_tail_trim_db (double db) |
| void | set_tail_fade_ms (double ms) |
| void | set_resample_taps_per_phase (int taps) |
| void | process (const SampleType *const *in, SampleType *const *out, int n) |
| | Convolve n <= max_block samples. Allocation-free and lock-free.
|
| void | reset () |
| | Drop all convolution history. Allocation-free.
|
| int | latency_samples () const |
| | The headline invariant.
|
| double | worst_case_gain () const |
| | ir_gain_linear * ||h||_1, the exact l-infinity operator norm of the wet path: |y[n]| <= ||h||_1 * max|x|, with equality approached by the sign-matched input x[n] = sign(h[N-1-n]).
|
| double | l1_norm () const |
| | ||h||_1 under the current channel routing, without the IR trim.
|
| bool | is_loaded () const |
| int | head_length () const |
| int | num_levels () const |
| int | level_block_length (int level) const |
| int | level_ir_start (int level) const |
| int | level_partitions (int level) const |
| int | level_margin (int level) const |
| | Scheduling margin of level i, in samples: the time between its frame closing and the first output it owns falling due, d - L + 1.
|
| int | prepared_ir_length () const |
| int | prepared_ir_channels () const |
| const SampleType * | prepared_ir (int channel) const |
| long long | last_block_cost () const |
| | Estimated real flops performed by the most recent process() call.
|
| double | sample_rate () const |
| IrNormalizeMode | normalize_mode () const |
| double | tail_trim_db () const |
| double | tail_fade_ms () const |
| double | predelay_ms () const |
| int | predelay_samples () const |
|
| static constexpr int | kHeadLenMin = 64 |
| | Head length N0, in taps.
|
| static constexpr int | kHeadLenMax = 512 |
| static constexpr double | kIrGainDbDefault = 0.0 |
| | IR trim on the convolved path. [dp, default 0 dB, range -24..+24 dB].
|
| static constexpr double | kIrGainDbMin = -24.0 |
| static constexpr double | kIrGainDbMax = 24.0 |
| static constexpr double | kPredelayMsDefault = 0.0 |
| | Pre-IR delay of the wet path.
|
| static constexpr double | kPredelayMsMin = 0.0 |
| static constexpr double | kPredelayMsMax = 250.0 |
| static constexpr double | kWetPercentDefault = 100.0 |
| | Wet / dry mix, in percent. [dp, defaults 100 % / 0 %, range 0..100 %].
|
| static constexpr double | kDryPercentDefault = 0.0 |
| static constexpr double | kLowcutHzDefault = 20.0 |
| | Send-EQ corners.
|
| static constexpr double | kLowcutHzMin = 20.0 |
| static constexpr double | kLowcutHzMax = 500.0 |
| static constexpr double | kHighcutHzDefault = 20000.0 |
| static constexpr double | kHighcutHzMin = 1000.0 |
| static constexpr double | kHighcutHzMax = 20000.0 |
| static constexpr double | kWidthPercentDefault = 100.0 |
| | Mid/side width of the wet output. [dp, default 100 %, range 0..200 %].
|
| static constexpr double | kWidthPercentMin = 0.0 |
| static constexpr double | kWidthPercentMax = 200.0 |
| static constexpr double | kTailTrimDbDefault = -72.0 |
| | IR truncation floor on the Schroeder backward-energy curve.
|
| static constexpr double | kTailTrimDbMin = -90.0 |
| static constexpr double | kTailTrimDbMax = -40.0 |
| static constexpr double | kTailFadeMsDefault = 5.0 |
| | Raised-cosine fade applied to the last part of the kept IR so the truncation cannot click.
|
| static constexpr double | kTailFadeMsMin = 2.0 |
| static constexpr double | kTailFadeMsMax = 20.0 |
| static constexpr int | kResampTapsPerPhaseDefault = 32 |
| | Resampler kernel width, in taps per polyphase branch.
|
| static constexpr int | kResampTapsPerPhaseMin = 16 |
| static constexpr int | kResampTapsPerPhaseMax = 64 |
| static constexpr double | kResampKaiserBeta = 8.0 |
| | House Kaiser window shape, fixed by the series contract's oversampling / resampling law — not a tunable of this module.
|
| static constexpr double | kBlockCostSlackDefault = 1.5 |
| | Peak-to-mean per-block cost slack the distributed schedule is allowed.
|
| static constexpr double | kBlockCostSlackMin = 1.2 |
| static constexpr double | kBlockCostSlackMax = 2.0 |
| static constexpr double | kSilenceEpsilon = 1e-24 |
| | Below this, energies are treated as zero.
|
template<typename SampleType = float>
class pulp::signal::ZeroLatencyConvolverT< SampleType >
See the file doc block for the schedule and its lineage.
Channel policy follows the true-stereo contract: 1 IR channel is applied to both ears, 2 IR channels are dual-mono (no crossfeed), 4 IR channels are the full 2x2 matrix in the order [LL, LR, RL, RR] and are only cross-routed when set_true_stereo(true) is engaged.
template<typename SampleType = float>
| bool pulp::signal::ZeroLatencyConvolverT< SampleType >::load_impulse_response |
( |
const SampleType *const * | ir_channels, |
|
|
int | ir_channel_count, |
|
|
int | ir_length, |
|
|
double | ir_sample_rate ) |
|
inline |
Ingest an impulse response.
Worker / prepare context — MAY allocate.
Pipeline, in order: channel map, resample to the session rate with broadband energy preserved by measurement, DC removal, Schroeder tail trim plus raised-cosine fade, amplitude normalization, then the partition spectra and the cached L1 norms.
A channel count other than 1, 2, or 4 is a load error: the previous IR is kept and false is returned.
template<typename SampleType = float>
ir_gain_linear * ||h||_1, the exact l-infinity operator norm of the wet path: |y[n]| <= ||h||_1 * max|x|, with equality approached by the sign-matched input x[n] = sign(h[N-1-n]).
For a multi-channel IR this is the worst ear, i.e. the largest sum of ||h||_1 over the cells feeding one output channel under the current routing. Measured at load, never estimated.
This is the WET-path bound the registry cites. The bound on the mixed output additionally includes the dry sum: dry_gain + wet_gain * worst_case_gain().
| double pulp::signal::ZeroLatencyConvolverDesign::kBlockCostSlackDefault = 1.5 |
|
staticconstexprinherited |
Peak-to-mean per-block cost slack the distributed schedule is allowed.
[dp, default 1.5, range 1.2..2.0] Absorbs the fact that a sliced transform's phases (permuted gather, butterfly stages, conjugate passes) have different per-item costs, so equal budgets do not produce exactly equal flop counts.