feat(amps): Reverb + Vibrato footswitches on Fullerton Reverb

Model the amp's two-button footswitch: Reverb and Vibrato switches that bypass
each onboard effect to a dry pass-through while preserving the knob positions.
Both gate live by scaling the wet amount to zero — reverb mix → 0 (SpringReverb
passes dry), tremolo depth → 0 (LFO collapses to a constant 1.0) — so Off is a
true identity and no rebuild is needed.

reverbEnabled / vibratoEnabled default on. Tests assert each footswitch-off is a
bit-exact pass-through (equals the knob-at-zero render) and differs when engaged;
state round-trip and control-surface exposure updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 07:52:23 -07:00
parent c9795f7305
commit a9e91ef08c
2 changed files with 67 additions and 9 deletions
@@ -79,6 +79,26 @@ struct FullertonReverbAmpPedalTests {
#expect(windowedSSD(flat, bright) > 0, "bright switch had no effect")
}
@Test func reverbFootswitchBypassesToDry() throws {
// Footswitch off with the Reverb knob up must equal the dry signal (knob at 0), and must
// differ from the same knob with the footswitch on.
let bypassed: [Float] = try render { $0.reverb = 0.9; $0.reverbEnabled = 0.0 }
let dry: [Float] = try render { $0.reverb = 0.0; $0.reverbEnabled = 1.0 }
#expect(windowedSSD(bypassed, dry) == 0.0, "reverb footswitch off should be a dry pass-through")
let engaged: [Float] = try render { $0.reverb = 0.9; $0.reverbEnabled = 1.0 }
#expect(windowedSSD(bypassed, engaged) > 0, "reverb footswitch had no effect")
}
@Test func vibratoFootswitchBypassesToIdentity() throws {
// Footswitch off with Intensity up must equal no tremolo (Intensity 0), and must differ
// from the same Intensity with the footswitch on.
let bypassed: [Float] = try render { $0.intensity = 1.0; $0.speed = 6.0; $0.vibratoEnabled = 0.0 }
let noTremolo: [Float] = try render { $0.intensity = 0.0 }
#expect(windowedSSD(bypassed, noTremolo) == 0.0, "vibrato footswitch off should be identity")
let engaged: [Float] = try render { $0.intensity = 1.0; $0.speed = 6.0; $0.vibratoEnabled = 1.0 }
#expect(windowedSSD(bypassed, engaged) > 0, "vibrato footswitch had no effect")
}
@Test func outputStaysWithinCeilingWithFXEngaged() throws {
let ceilingEpsilon: Double = 1.0e-4
let hot: [Float] = try render { (pedal: FullertonReverbAmpPedal) in
@@ -99,7 +119,7 @@ struct FullertonReverbAmpPedalTests {
let pedal: FullertonReverbAmpPedal = FullertonReverbAmpPedal()
#expect(pedal.effectKnobs.map { $0.label }
== ["Gain", "Bass", "Mid", "Treble", "Reverb", "Speed", "Intensity"])
#expect(pedal.effectSwitches.map { $0.label } == ["Bright"])
#expect(pedal.effectSwitches.map { $0.label } == ["Bright", "Reverb", "Vibrato"])
#expect(pedal.effectSelectors.map { $0.label } == ["Cab"])
#expect(pedal.effectSelectors.first?.rebuildsOnChange == true)
#expect(pedal.widthUnits == 3)
@@ -115,6 +135,8 @@ struct FullertonReverbAmpPedalTests {
pedal.intensity = 0.6
pedal.bright = 1.0
pedal.cab = 2.0
pedal.reverbEnabled = 0.0
pedal.vibratoEnabled = 0.0
let restored: FullertonReverbAmpPedal = FullertonReverbAmpPedal()
restored.applyState(pedal.captureState())
#expect(restored.gain == 8.0)
@@ -123,6 +145,8 @@ struct FullertonReverbAmpPedalTests {
#expect(restored.intensity == 0.6)
#expect(restored.bright == 1.0)
#expect(restored.cab == 2.0)
#expect(restored.reverbEnabled == 0.0)
#expect(restored.vibratoEnabled == 0.0)
}
@Test func registeredInBuiltInRegistry() throws {