feat(amps): Marshall non-master voices — Plexi / JTM / Bluesbreaker (Phase 2)
Add a shared non-master British base and three voices. BritishComboAmpPedal (open) provides the common surface: .marshall tone stack, Presence lift (post-power-amp shelf), Bright switch (pre-preamp shelf), fixed power-amp drive (loudness from Gain, no Master — distinct from the master-volume BritishAmpPedal). - British Plexi — non-master Super Lead, higher gain, 4×12. - British JTM — warmer, lower-gain JTM crunch, darker top. - British Bluesbreaker — 2×12 combo crunch + onboard tremolo (Speed/Intensity + Tremolo footswitch), widthUnits 3. Registered across all 6 sites as .amp; Help tone-stack acknowledgment genericized so it no longer needs editing per amp. 12 tests (Presence/Bright per voice, non-master check, Plexi/JTM surface, voices differ, Bluesbreaker tremolo + footswitch bit-exact bypass, ceiling, round-trip, registry). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,9 @@ public extension PedalType {
|
||||
// Drive & dynamics
|
||||
static let california = PedalType("California")
|
||||
static let british = PedalType("British")
|
||||
static let britishPlexi = PedalType("British Plexi")
|
||||
static let britishJTM = PedalType("British JTM")
|
||||
static let britishBluesbreaker = PedalType("British Bluesbreaker")
|
||||
static let chime = PedalType("Chime")
|
||||
static let fullertonReverb = PedalType("Fullerton Reverb")
|
||||
static let fullertonDeluxe = PedalType("Fullerton Deluxe")
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
// BritishBluesbreakerAmpPedal.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
|
||||
/// British non-master **2×12 combo** with onboard **tremolo** — the bluesbreaker voice: lower-power
|
||||
/// Marshall crunch that cleans up with the guitar volume, plus a bias-tremolo.
|
||||
///
|
||||
/// A ``BritishComboAmpPedal`` (Presence + Bright) that overlays a tremolo in the onboard-effects
|
||||
/// slot, with Speed / Intensity knobs and a Tremolo footswitch.
|
||||
public final class BritishBluesbreakerAmpPedal: BritishComboAmpPedal {
|
||||
|
||||
/// Tremolo LFO rate in Hz. Range [0.5, 12].
|
||||
@UIParam public var speed: Double = 4.0
|
||||
/// Tremolo depth in [0, 1]. `0` = off, `1` = full swing.
|
||||
@UIParam public var intensity: Double = 0.0
|
||||
/// Tremolo footswitch: `1` = engaged, `0` = bypassed (`Speed`/`Intensity` preserved).
|
||||
@UIParam public var tremoloEnabled: Double = 1.0
|
||||
|
||||
/// 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 speedRange: ClosedRange<Double> = 0.5 ... 12.0
|
||||
private let intensityRange: ClosedRange<Double> = 0.0 ... 1.0
|
||||
|
||||
public override var summaryText: String {
|
||||
"British 2×12 combo — bluesbreaker crunch with tremolo, Presence, and a Bright switch."
|
||||
}
|
||||
|
||||
public override var signatureKnobs: [PedalKnob] {
|
||||
[
|
||||
PedalKnob(label: "Presence", node: $presence, range: signatureRange),
|
||||
PedalKnob(label: "Speed", node: $speed, range: speedRange),
|
||||
PedalKnob(label: "Intensity", node: $intensity, range: intensityRange),
|
||||
]
|
||||
}
|
||||
|
||||
/// Wider card for the extra tremolo knobs plus the Bright and Tremolo switches.
|
||||
public override var widthUnits: Int { 3 }
|
||||
|
||||
public override var effectSwitches: [PedalSwitch] {
|
||||
[
|
||||
PedalSwitch(
|
||||
label: "Bright",
|
||||
node: $bright,
|
||||
options: [
|
||||
PedalSwitch.Option(title: "Off", value: switchOffValue),
|
||||
PedalSwitch.Option(title: "On", value: switchOnValue),
|
||||
]
|
||||
),
|
||||
PedalSwitch(
|
||||
label: "Tremolo",
|
||||
node: $tremoloEnabled,
|
||||
options: [
|
||||
PedalSwitch.Option(title: "Off", value: switchOffValue),
|
||||
PedalSwitch.Option(title: "On", value: switchOnValue),
|
||||
]
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
/// Creates a British Bluesbreaker 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: "British Bluesbreaker", inputBus: inputBus, outputBus: outputBus)
|
||||
gain = 6.0
|
||||
cab = 1.0 // British 4×12 voice (combo 2×12 tonally close enough among our cabs)
|
||||
}
|
||||
|
||||
/// Tremolo (gated by the Tremolo footswitch), inserted after the tone stack.
|
||||
public override func onboardEffects(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
// Footswitch gates depth to 0 → LFO is a constant 1.0 (identity). Unipolar sine over
|
||||
// [1 − depth, 1]: peak gain 1.0, trough 1 − depth.
|
||||
let depth: any ValidGeneratorInput = $intensity * $tremoloEnabled
|
||||
let lfoScale: any ValidGeneratorInput = depth * tremoloDepthScale
|
||||
let lfoOffset: any ValidGeneratorInput = 1.0 - (depth * tremoloDepthScale)
|
||||
let lfo: OscSin.Audio = OscSin.Audio(freq: $speed, mul: lfoScale, add: lfoOffset)
|
||||
return signal * lfo
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// BritishComboAmpPedal.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
|
||||
/// Shared base for the **non-master** British voices (Plexi / JTM / Bluesbreaker) — the earlier
|
||||
/// Marshalls with no master volume, so the power-amp stage runs at a fixed drive and loudness comes
|
||||
/// from cranking `Gain`.
|
||||
///
|
||||
/// Provides the common British control surface: the `.marshall` tone stack, a **Presence** lift
|
||||
/// (post-power-amp high-shelf) and a **Bright** switch (pre-preamp high-shelf). Concrete voices
|
||||
/// subclass this and differ by gain/cab/headroom; the Bluesbreaker additionally overlays tremolo.
|
||||
///
|
||||
/// Distinct from ``BritishAmpPedal``, which is the master-volume (JCM-style) crunch voice.
|
||||
open class BritishComboAmpPedal: AmpVoicePedal {
|
||||
|
||||
/// Presence amount in [0, 1] → 0…`presenceMaxGainDb` of lift above `presenceFreqHz`.
|
||||
@UIParam public var presence: Double = 0.4
|
||||
/// Bright switch: `0` = flat, `1` = treble shelf engaged.
|
||||
@UIParam public var bright: Double = 0.0
|
||||
|
||||
private let presenceFreqHz: Double = 4500.0
|
||||
private let presenceMaxGainDb: Double = 8.0
|
||||
private let presenceSlope: Double = 0.7
|
||||
private let brightFreqHz: Double = 3500.0
|
||||
private let brightMaxGainDb: Double = 6.0
|
||||
private let brightSlope: Double = 0.7
|
||||
let switchOffValue: Double = 0.0
|
||||
let switchOnValue: Double = 1.0
|
||||
|
||||
public override var toneStackModel: ToneStackModel { .marshall }
|
||||
public override var signatureKnobs: [PedalKnob] {
|
||||
[PedalKnob(label: "Presence", node: $presence, range: signatureRange)]
|
||||
}
|
||||
|
||||
public override var effectSwitches: [PedalSwitch] {
|
||||
[
|
||||
PedalSwitch(
|
||||
label: "Bright",
|
||||
node: $bright,
|
||||
options: [
|
||||
PedalSwitch.Option(title: "Off", value: switchOffValue),
|
||||
PedalSwitch.Option(title: "On", value: switchOnValue),
|
||||
]
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
/// Bright switch: a high-shelf lift ahead of the preamp (identity when off, 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)
|
||||
}
|
||||
|
||||
/// Presence: a post-power-amp high-shelf lift, `[0, 1]` → `[0, presenceMaxGainDb]` dB.
|
||||
public override func shapeVoice(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
|
||||
let gainDB: LinLin.Audio = LinLin.Audio(
|
||||
$presence, inLo: 0.0, inHi: 1.0, outLo: 0.0, outHi: presenceMaxGainDb)
|
||||
return RBJHighShelf.Audio(input: signal, freq: presenceFreqHz, gain: gainDB, slope: presenceSlope)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// BritishJTMAmpPedal.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
|
||||
/// British non-master **JTM** — the earliest Marshall, Bassman-derived: warmer and lower-gain than
|
||||
/// the plexi Super Lead, a rounder blues-rock crunch.
|
||||
///
|
||||
/// A ``BritishComboAmpPedal`` with lower gain and a slightly darker top end.
|
||||
public final class BritishJTMAmpPedal: BritishComboAmpPedal {
|
||||
|
||||
public override var summaryText: String {
|
||||
"British non-master combo — warm, lower-gain JTM crunch with Presence and Bright."
|
||||
}
|
||||
|
||||
/// Creates a British JTM 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: "British JTM", inputBus: inputBus, outputBus: outputBus)
|
||||
gain = 5.0 // warmer, lower-gain than the plexi
|
||||
treble = 0.5 // a shade rounder on top
|
||||
cab = 1.0 // British 4×12
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// BritishPlexiAmpPedal.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
|
||||
/// British non-master **Super Lead** — the classic plexi-panel stack: big, loud, no master volume,
|
||||
/// clean-ish until cranked and then a singing midrange roar.
|
||||
///
|
||||
/// A ``BritishComboAmpPedal`` with higher gain and the 4×12 cab. Presence + Bright; loudness and
|
||||
/// breakup both come from `Gain`.
|
||||
public final class BritishPlexiAmpPedal: BritishComboAmpPedal {
|
||||
|
||||
public override var summaryText: String {
|
||||
"British non-master stack — plexi roar with Presence and a Bright switch."
|
||||
}
|
||||
|
||||
/// Creates a British Plexi 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: "British Plexi", inputBus: inputBus, outputBus: outputBus)
|
||||
gain = 7.0 // clean-ish until pushed
|
||||
cab = 1.0 // British 4×12
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,9 @@ public enum PedalRegistry {
|
||||
public static let builtIn: [String: @MainActor () -> Pedal] = [
|
||||
"California": { CaliforniaAmpPedal() },
|
||||
"British": { BritishAmpPedal() },
|
||||
"British Plexi": { BritishPlexiAmpPedal() },
|
||||
"British JTM": { BritishJTMAmpPedal() },
|
||||
"British Bluesbreaker": { BritishBluesbreakerAmpPedal() },
|
||||
"Chime": { ChimeAmpPedal() },
|
||||
"Fullerton Reverb": { FullertonReverbAmpPedal() },
|
||||
"Fullerton Deluxe": { FullertonDeluxeAmpPedal() },
|
||||
|
||||
@@ -178,7 +178,7 @@ 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, Chime, Fullerton Reverb, Fullerton Deluxe, Fullerton Princeton, Jazz Clean, and Chime Top Boost amp pedals' tone stacks "
|
||||
"The 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.",
|
||||
|
||||
@@ -44,7 +44,7 @@ public enum PedalCategory: String, CaseIterable, Identifiable, Sendable {
|
||||
}
|
||||
|
||||
private static let mapping: [String: PedalCategory] = [
|
||||
"California": .amp, "British": .amp, "Chime": .amp, "Fullerton Reverb": .amp, "Fullerton Deluxe": .amp, "Fullerton Princeton": .amp, "Jazz Clean": .amp, "Chime Top Boost": .amp, "Neural Amp": .amp,
|
||||
"California": .amp, "British": .amp, "British Plexi": .amp, "British JTM": .amp, "British Bluesbreaker": .amp, "Chime": .amp, "Fullerton Reverb": .amp, "Fullerton Deluxe": .amp, "Fullerton Princeton": .amp, "Jazz Clean": .amp, "Chime Top Boost": .amp, "Neural Amp": .amp,
|
||||
"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,
|
||||
|
||||
@@ -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", "Fullerton Reverb", "Fullerton Deluxe", "Fullerton Princeton", "Jazz Clean", "Chime Top Boost", "Neural Amp", "Overdrive", "Distortion", "Compressor", "Sustainer", "Limiter", "Noise Gate", "Fuzz",
|
||||
"California", "British", "British Plexi", "British JTM", "British Bluesbreaker", "Chime", "Fullerton Reverb", "Fullerton Deluxe", "Fullerton Princeton", "Jazz Clean", "Chime Top Boost", "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",
|
||||
|
||||
@@ -19,6 +19,9 @@ private func enclosureColor(for displayName: String) -> Color {
|
||||
switch displayName {
|
||||
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 "British Plexi": return Color(red: 0.34, green: 0.20, blue: 0.10) // gold-panel plexi
|
||||
case "British JTM": return Color(red: 0.36, green: 0.24, blue: 0.12) // warm JTM bronze
|
||||
case "British Bluesbreaker": return Color(red: 0.28, green: 0.22, blue: 0.12) // bluesbreaker tan
|
||||
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 "Fullerton Deluxe": return Color(red: 0.17, green: 0.20, blue: 0.26) // blackface, warmer
|
||||
|
||||
Reference in New Issue
Block a user