feat(amps): Fullerton Reverb — full control surface (reverb + tremolo + bright)
First combo amp with onboard effects, modeling the American blackface clean
voice. Adds two overridable hooks to AmpVoicePedal so an amp can insert stages
without touching the fixed chain:
- inputShaping(_:) — pre-preamp (bright switch here)
- onboardEffects(_:) — after tone stack, before power amp (reverb + tremolo here)
FullertonReverbAmpPedal (.fender):
- Spring reverb (SpringReverb) with a Reverb mix knob.
- Tremolo (unipolar sine gain LFO) with Speed + Intensity knobs; defaults off so
the amp opens as a clean reverbed platform. ("Vibrato" channel is really AM.)
- Bright switch: a pre-preamp high-shelf whose gain is scaled by the toggle, so
Off is a true identity and the switch is live (no rebuild).
- Full surface: Gain/Bass/Mid/Treble + Reverb/Speed/Intensity knobs, Bright
switch, Cab selector; widthUnits 3.
Registered across registry / type / category / palette / enclosure color; Help
acknowledgment lists its tone stack. 9 tests (FX effect, ceiling with FX on,
control surface, state round-trip, registry).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,7 @@ public extension PedalType {
|
||||
static let california = PedalType("California")
|
||||
static let british = PedalType("British")
|
||||
static let chime = PedalType("Chime")
|
||||
static let fullertonReverb = PedalType("Fullerton Reverb")
|
||||
static let neuralAmp = PedalType("Neural Amp")
|
||||
static let overdrive = PedalType("Overdrive")
|
||||
static let distortion = PedalType("Distortion")
|
||||
|
||||
@@ -12,8 +12,10 @@ import LyrebirdUI
|
||||
/// Each concrete amp fixes one tone-stack ``ToneStackModel`` and adds one signature control, but
|
||||
/// shares the common chain built here:
|
||||
/// ```
|
||||
/// dry → TriodeStage(drive: gain) (preamp)
|
||||
/// dry → inputShaping(_:) (subclass hook — e.g. bright switch; default identity)
|
||||
/// → TriodeStage(drive: gain) (preamp)
|
||||
/// → ToneStack(bass, mid, treble, model) (fixed per amp)
|
||||
/// → onboardEffects(_:) (subclass hook — e.g. reverb + tremolo; default identity)
|
||||
/// → TriodeStage(power-amp drive) (power-amp warmth)
|
||||
/// → shapeVoice(_:) (subclass signature filter)
|
||||
/// → ConvolutionReverb(cab IR) (speaker cabinet — voice-selectable, rebuild on change)
|
||||
@@ -64,6 +66,24 @@ open class AmpVoicePedal: Pedal {
|
||||
signal
|
||||
}
|
||||
|
||||
/// Shaping applied to the dry input *before* the preamp — e.g. a bright-switch treble lift that
|
||||
/// hits the tubes pre-distortion. Default: identity. Subclasses override.
|
||||
///
|
||||
/// - Parameter signal: The dry input signal.
|
||||
/// - Returns: The shaped signal fed into the preamp.
|
||||
open func inputShaping(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
signal
|
||||
}
|
||||
|
||||
/// Onboard effects inserted *after* the tone stack and *before* the power amp — the slot a
|
||||
/// combo amp's built-in reverb and tremolo occupy. Default: identity. Subclasses override.
|
||||
///
|
||||
/// - Parameter signal: The post-tone-stack signal.
|
||||
/// - Returns: The signal fed into the power-amp stage.
|
||||
open func onboardEffects(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
signal
|
||||
}
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
private static let defaultMix: Double = 1.0
|
||||
@@ -165,11 +185,13 @@ open class AmpVoicePedal: Pedal {
|
||||
/// - Returns: The amped, cab-convolved, soft-limited, ceiling-clamped mono output.
|
||||
public override func effect(_ dry: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
let sr: Double = sampleRate
|
||||
let preamp: TriodeStage = TriodeStage(input: dry, drive: $gain, bias: preampBias, oversample: 4)
|
||||
let preShaped: any ValidGeneratorInput = inputShaping(dry)
|
||||
let preamp: TriodeStage = TriodeStage(input: preShaped, drive: $gain, bias: preampBias, oversample: 4)
|
||||
let toned: ToneStack = ToneStack(
|
||||
input: preamp, bass: $bass, mid: $mid, treble: $treble, model: toneStackModel)
|
||||
let processed: any ValidGeneratorInput = onboardEffects(toned)
|
||||
let powerAmp: TriodeStage = TriodeStage(
|
||||
input: toned, drive: powerAmpDrive, bias: powerAmpBias, oversample: 2)
|
||||
input: processed, drive: powerAmpDrive, bias: powerAmpBias, oversample: 2)
|
||||
let shaped: any ValidGeneratorInput = shapeVoice(powerAmp)
|
||||
let voice: CabinetVoice = CabinetVoice.voice(atSelectorValue: cab)
|
||||
let cabinet: ConvolutionReverb.Audio = ConvolutionReverb.Audio(
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
// FullertonReverbAmpPedal.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
|
||||
/// American blackface-combo amp with a full onboard control surface: spring **reverb**, **tremolo**
|
||||
/// (Speed / Intensity), and a **Bright** switch — the loud, headroom-rich clean voice.
|
||||
///
|
||||
/// A ``AmpVoicePedal`` fixed to the American tone stack that fills both subclass hooks:
|
||||
/// - ``inputShaping(_:)`` applies the Bright switch as a pre-preamp treble shelf.
|
||||
/// - ``onboardEffects(_:)`` inserts the spring reverb then the tremolo, between the tone stack and
|
||||
/// the power amp — the slot a combo amp's built-in reverb/tremolo occupy.
|
||||
///
|
||||
/// The amp's "vibrato" channel is historically amplitude modulation (tremolo), not pitch vibrato,
|
||||
/// so `Intensity` drives a unipolar-sine gain LFO. Tremolo defaults off (`Intensity = 0`) so the
|
||||
/// amp opens as a clean, reverbed platform.
|
||||
public final class FullertonReverbAmpPedal: AmpVoicePedal {
|
||||
|
||||
// MARK: - Onboard-effect parameters
|
||||
|
||||
/// Spring-reverb wet mix in [0, 1]. `0` = dry, `1` = fully wet.
|
||||
@UIParam public var reverb: Double = 0.25
|
||||
/// Tremolo LFO rate in Hz. Range [0.5, 12].
|
||||
@UIParam public var speed: Double = 4.0
|
||||
/// Tremolo depth in [0, 1]. `0` = off (clean), `1` = full silence-to-unity swing.
|
||||
@UIParam public var intensity: Double = 0.0
|
||||
/// Bright switch: `0` = flat, `1` = treble shelf engaged.
|
||||
@UIParam public var bright: Double = 0.0
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
/// Bright-switch shelf corner in Hz.
|
||||
private let brightFreqHz: Double = 2500.0
|
||||
/// Bright-switch shelf lift in dB when engaged.
|
||||
private let brightMaxGainDb: Double = 6.0
|
||||
/// Bright-switch shelf slope.
|
||||
private let brightSlope: Double = 0.8
|
||||
/// Tremolo depth scaling — at full `intensity` the LFO swings over half the normalised range so
|
||||
/// the peak gain is 1.0 and the trough is `1 − intensity`.
|
||||
private let tremoloDepthScale: Double = 0.5
|
||||
|
||||
private let reverbRange: ClosedRange<Double> = 0.0 ... 1.0
|
||||
private let speedRange: ClosedRange<Double> = 0.5 ... 12.0
|
||||
private let intensityRange: ClosedRange<Double> = 0.0 ... 1.0
|
||||
private let brightOffValue: Double = 0.0
|
||||
private let brightOnValue: Double = 1.0
|
||||
|
||||
// MARK: - Voice configuration
|
||||
|
||||
public override var toneStackModel: ToneStackModel { .fender }
|
||||
public override var summaryText: String {
|
||||
"American blackface clean — spring reverb, tremolo, and a Bright switch."
|
||||
}
|
||||
public override var signatureKnobs: [PedalKnob] {
|
||||
[
|
||||
PedalKnob(label: "Reverb", node: $reverb, range: reverbRange),
|
||||
PedalKnob(label: "Speed", node: $speed, range: speedRange),
|
||||
PedalKnob(label: "Intensity", node: $intensity, range: intensityRange),
|
||||
]
|
||||
}
|
||||
|
||||
/// Wider card to hold the extra reverb/tremolo knobs plus the Bright switch.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
/// Creates a Fullerton Reverb amp.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - inputBus: Audio bus index to read the dry input from. Defaults to `0`.
|
||||
/// - outputBus: Audio bus index to write the processed output to. Defaults to `0`.
|
||||
public init(inputBus: Int = 0, outputBus: Int = 0) {
|
||||
super.init(name: "Fullerton Reverb", inputBus: inputBus, outputBus: outputBus)
|
||||
gain = 4.0 // headroom-rich clean default
|
||||
}
|
||||
|
||||
// MARK: - Switches
|
||||
|
||||
public override var effectSwitches: [PedalSwitch] {
|
||||
[
|
||||
PedalSwitch(
|
||||
label: "Bright",
|
||||
node: $bright,
|
||||
options: [
|
||||
PedalSwitch.Option(title: "Off", value: brightOffValue),
|
||||
PedalSwitch.Option(title: "On", value: brightOnValue),
|
||||
]
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
// MARK: - Hooks
|
||||
|
||||
/// Bright switch: a high-shelf lift ahead of the preamp. The switch value (`0`/`1`) scales the
|
||||
/// shelf gain, so "Off" is a true identity and the effect is live (no rebuild).
|
||||
public override func inputShaping(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
let shelfGainDb: any ValidGeneratorInput = $bright * brightMaxGainDb
|
||||
return RBJHighShelf.Audio(
|
||||
input: signal, freq: brightFreqHz, gain: shelfGainDb, slope: brightSlope)
|
||||
}
|
||||
|
||||
/// Spring reverb → tremolo, inserted after the tone stack and before the power amp.
|
||||
public override func onboardEffects(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
let reverbed: SpringReverb.Audio = SpringReverb.Audio(
|
||||
input: signal, mix: $reverb, sampleRate: sampleRate)
|
||||
// Unipolar sine LFO over [1 − intensity, 1]: peak gain 1.0, trough 1 − intensity.
|
||||
let lfoScale: any ValidGeneratorInput = $intensity * tremoloDepthScale
|
||||
let lfoOffset: any ValidGeneratorInput = 1.0 - ($intensity * tremoloDepthScale)
|
||||
let lfo: OscSin.Audio = OscSin.Audio(freq: $speed, mul: lfoScale, add: lfoOffset)
|
||||
return reverbed * lfo
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ public enum PedalRegistry {
|
||||
"California": { CaliforniaAmpPedal() },
|
||||
"British": { BritishAmpPedal() },
|
||||
"Chime": { ChimeAmpPedal() },
|
||||
"Fullerton Reverb": { FullertonReverbAmpPedal() },
|
||||
"Neural Amp": { NeuralAmpPedal() },
|
||||
"Overdrive": { OverdrivePedal() },
|
||||
"Distortion": { DistortionPedal() },
|
||||
|
||||
@@ -178,9 +178,10 @@ public struct HelpView: View {
|
||||
+ "built-in speaker impulse responses.",
|
||||
"The Cabinet pedal's built-in cab voicings are original impulse responses generated in "
|
||||
+ "code — not captures of any third-party hardware or IR pack.",
|
||||
"The California, British, and Chime amp pedals' tone stacks follow the Yeh & Smith analysis "
|
||||
+ "of the classic passive tone-stack circuit (\"Discretization of the '59 Fender Bassman Tone "
|
||||
+ "Stack\", DAFx-06); their models are original code, not captures of specific hardware.",
|
||||
"The California, British, Chime, and Fullerton Reverb amp pedals' tone stacks follow the "
|
||||
+ "Yeh & Smith analysis of the classic passive tone-stack circuit (\"Discretization of the "
|
||||
+ "'59 Fender Bassman Tone Stack\", DAFx-06); their models are original code, not captures of "
|
||||
+ "specific hardware.",
|
||||
"The Neural Amp pedal loads GuitarML Proteus / NeuralPi capture models (the open LSTM "
|
||||
+ "format from github.com/GuitarML). You supply the model file; none are bundled, and "
|
||||
+ "those models are licensed by their respective authors.",
|
||||
|
||||
@@ -42,7 +42,7 @@ public enum PedalCategory: String, CaseIterable, Identifiable, Sendable {
|
||||
}
|
||||
|
||||
private static let mapping: [String: PedalCategory] = [
|
||||
"California": .gain, "British": .gain, "Chime": .gain, "Neural Amp": .gain, "Overdrive": .gain, "Distortion": .gain, "Fuzz": .gain, "Volume": .gain,
|
||||
"California": .gain, "British": .gain, "Chime": .gain, "Fullerton Reverb": .gain, "Neural Amp": .gain, "Overdrive": .gain, "Distortion": .gain, "Fuzz": .gain, "Volume": .gain,
|
||||
"Compressor": .dynamics, "Sustainer": .dynamics, "Limiter": .dynamics, "Noise Gate": .dynamics,
|
||||
"Graphic EQ": .filter, "Auto-Wah": .filter, "Wah": .filter, "Mutant": .filter,
|
||||
"Cabinet": .filter,
|
||||
|
||||
@@ -54,7 +54,7 @@ public struct PedalPaletteView: View {
|
||||
/// Preferred display order for the built-in pedals. Any registered pedal not listed here is
|
||||
/// appended afterwards (sorted) so the palette never silently drops a newly added pedal.
|
||||
private static let preferredOrder: [String] = [
|
||||
"California", "British", "Chime", "Neural Amp", "Overdrive", "Distortion", "Compressor", "Sustainer", "Limiter", "Noise Gate", "Fuzz",
|
||||
"California", "British", "Chime", "Fullerton Reverb", "Neural Amp", "Overdrive", "Distortion", "Compressor", "Sustainer", "Limiter", "Noise Gate", "Fuzz",
|
||||
"Volume",
|
||||
"Graphic EQ", "Tremolo", "Phaser", "Modulation", "Chorus", "Flanger", "Vibrato", "Rotary",
|
||||
"Auto-Wah", "Wah", "Mutant", "Cabinet", "Ring Modulator", "Diffuser", "Bitcrusher", "Granulator",
|
||||
|
||||
@@ -20,6 +20,7 @@ private func enclosureColor(for displayName: String) -> Color {
|
||||
case "California": return Color(red: 0.20, green: 0.28, blue: 0.34) // West-Coast steel blue
|
||||
case "British": return Color(red: 0.30, green: 0.16, blue: 0.10) // oxblood tolex
|
||||
case "Chime": return Color(red: 0.16, green: 0.24, blue: 0.22) // vintage green
|
||||
case "Fullerton Reverb": return Color(red: 0.15, green: 0.22, blue: 0.30) // blackface panel
|
||||
case "Neural Amp": return Color(red: 0.22, green: 0.16, blue: 0.30) // deep neural violet
|
||||
case "Overdrive": return Color(red: 0.85, green: 0.42, blue: 0.08) // warm orange
|
||||
case "Distortion": return Color(red: 0.80, green: 0.26, blue: 0.12) // hot rust
|
||||
|
||||
Reference in New Issue
Block a user