Classes | |
| struct | Instance |
Typedefs | |
| using | Shifter = signal::PitchShifter |
Functions | |
| signal::PedalMode | decode_pedal_mode (float v) |
| Decodes the stepped pedal_mode value. | |
| float | whammy_worst_case_gain (double sample_rate) |
| Worst-case linear gain for the Forge registry (series law 8). | |
| int | whammy_latency_samples (double sample_rate, double window_ms=Shifter::kWindowMsDefault) |
| The node's reported latency at a given window and sample rate, in samples. | |
| float | whammy_default_mix_for_mode (signal::PedalMode mode) |
| The conventional dry/wet default for a mode, for the PRESET layer. | |
| CustomNodeType | make_whammy_node (double window_ms=Shifter::kWindowMsDefault) |
| The expression-pedal pitch shifter as a lowerable custom node. | |
| ForgeNodeDescriptor | descriptor () |
Variables | |
| constexpr const char * | kTypeId = "pitch.whammy" |
| constexpr state::ParamID | kPedal = 1 |
| constexpr state::ParamID | kPedalMode = 2 |
| constexpr state::ParamID | kShiftSource = 3 |
| constexpr state::ParamID | kShiftSemitones = 4 |
| constexpr state::ParamID | kHeelSemis = 5 |
| constexpr state::ParamID | kToeSemis = 6 |
| constexpr state::ParamID | kIntervalASemis = 7 |
| constexpr state::ParamID | kIntervalBSemis = 8 |
| constexpr state::ParamID | kDetuneCents = 9 |
| constexpr state::ParamID | kDiveFloorSemis = 10 |
| constexpr state::ParamID | kGlideUpMs = 11 |
| constexpr state::ParamID | kGlideDownMs = 12 |
| constexpr state::ParamID | kMix = 13 |
| constexpr state::ParamID | kDetents = 14 |
| constexpr state::ParamID | kInterp = 15 |
| constexpr state::ParamID | kDriftDepth = 16 |
| constexpr float | kModeWhammy = 0.0f |
| The pedal_mode param's stepped encoding. | |
| constexpr float | kModeHarmony = 1.0f |
| constexpr float | kModeDetune = 2.0f |
| constexpr float | kModeDive = 3.0f |
| constexpr float | kSourcePedal = 0.0f |
| The shift_source param's stepped encoding. | |
| constexpr float | kSourceDirect = 1.0f |
| constexpr float | kInterpLinear = 0.0f |
| The interp param's stepped encoding. | |
| constexpr float | kInterpCubic = 1.0f |
| signal::PedalMode pulp::host::pitch::whammy::decode_pedal_mode | ( | float | v | ) |
Decodes the stepped pedal_mode value.
Rounds rather than truncates so a host that sends 0.9999 for "harmony" gets harmony instead of whammy.
| ForgeNodeDescriptor pulp::host::pitch::whammy::descriptor | ( | ) |
| CustomNodeType pulp::host::pitch::whammy::make_whammy_node | ( | double | window_ms = Shifter::kWindowMsDefault | ) |
The expression-pedal pitch shifter as a lowerable custom node.
window_ms is a construction-time argument, not a param: it IS this member's latency_samples(), and it sets the warble rate. The DSP sizes its line for the whole declared range at prepare(), so any value in range is allocation-free — it is frozen here for the host's sake.
| float pulp::host::pitch::whammy::whammy_default_mix_for_mode | ( | signal::PedalMode | mode | ) |
The conventional dry/wet default for a mode, for the PRESET layer.
Deliberately not applied when the pedal_mode param moves — see the note at the top of this file.
| int pulp::host::pitch::whammy::whammy_latency_samples | ( | double | sample_rate, |
| double | window_ms = Shifter::kWindowMsDefault ) |
The node's reported latency at a given window and sample rate, in samples.
Exposed because CustomNodeType cannot declare latency and the graph's PDC therefore sees zero (see the gap note at the top of this file). A host that needs to align a whammy branch against a dry one has to read this and compensate itself. Computed by the shipped block rather than by repeating its expression here.
| float pulp::host::pitch::whammy::whammy_worst_case_gain | ( | double | sample_rate | ) |
Worst-case linear gain for the Forge registry (series law 8).
Cited from the invariant the DSP suite asserts, not re-derived here.
This used to be kWorstCaseGain * dc_blocker_peak_gain() with kWorstCaseGain = √2 and the DC blocker contributing 2/(1+p) at Nyquist — 1.000327 at 48 kHz, so the product was 1.4147. Measured, the node reaches 2.2117 on sustained near-DC content: the registry was understating the headroom a downstream stage plans against by 3.9 dB.
The error was using the DC blocker's MAGNITUDE-response peak as a bound on its worst single SAMPLE. Those are different quantities; the sample bound is the impulse response's L1 norm, which is exactly 2 at every pole position. Shifter::kWorstCaseGain now folds that in — an equal-power mix maximises cos θ · 1 + sin θ · 2 at √5 — so it is the whole bound and multiplying by the blocker again would double-count it.
No longer sample-rate dependent, and that is a consequence rather than a simplification: the L1 norm of y[n] = x[n] − x[n−1] + p·y[n−1] is 2 for every p, so the pole's position (and hence the rate) drops out.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
The interp param's stepped encoding.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
The pedal_mode param's stepped encoding.
Ordered so 0 is the default and the two continuous-bend modes sit at the ends.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
The shift_source param's stepped encoding.
|
inlineconstexpr |
|
inlineconstexpr |