feat(amps): character amps — Command/Citrus/Sixties/Magna/Anaheim (Phase 8)

Five character voices:
- Command (Hiwatt) — BritishCombo variant: loud hi-fi clean, high headroom.
- Citrus (Orange) — .marshall, fixed mid bump + a single Shape tilt control.
- Sixties Combo (Supro) — .fender, gritty early breakup + onboard tremolo (shared
  tremolo helper + footswitch).
- Magna Vibrato (Magnatone) — .fender, TRUE pitch vibrato: a DelayLine whose delay
  is swept by an LFO (Speed/Depth + footswitch), not amplitude tremolo.
- Anaheim (Music Man hybrid) — .fender, symmetric-bias (solid-state-flavoured)
  preamp, huge headroom, Bright + Deep switches, and a built-in Limiter
  (LookAheadLimiter, ceiling 0.5 when engaged, before the power amp). True
  oversampled hard-clip SS shaper deferred to Lyrebird 1.7.x.

Registered across 6 sites as .amp. New CharacterAmpsTests suite (10 tests):
per-amp control/effect changes, Sixties tremolo bit-exact bypass, Magna vibrato
on≠off + fixed-delay-when-off, Anaheim switches + limiter engages hot, ceiling at
max for all five, tone-stack models, round-trip, registry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 15:36:06 -07:00
parent 88ad976b8e
commit ac61b47d17
11 changed files with 552 additions and 2 deletions
@@ -0,0 +1,75 @@
// SixtiesComboAmpPedal.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
import LyrebirdSynth
import LyrebirdUI
/// American **'60s grit combo** — the small Supro/Silvertone-style amp: low headroom, gritty early
/// breakup, and an onboard **tremolo**.
///
/// A ``AmpVoicePedal`` (`.fender`) driven hard into the power stage for early breakup, with a
/// tremolo (Speed / Intensity + footswitch) in the onboard-effects slot.
public final class SixtiesComboAmpPedal: AmpVoicePedal {
/// Tremolo LFO rate in Hz. Range [0.5, 12].
@UIParam public var speed: Double = 5.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
/// Power-amp drive — well above the default fixed value so the small combo grits up early.
private let grittyPowerDrive: Double = 2.4
private let speedRange: ClosedRange<Double> = 0.5 ... 12.0
private let intensityRange: ClosedRange<Double> = 0.0 ... 1.0
public override var toneStackModel: ToneStackModel { .fender }
public override var summaryText: String {
"American '60s grit combo — early-breakup with onboard tremolo."
}
public override var signatureKnobs: [PedalKnob] {
[
PedalKnob(label: "Speed", node: $speed, range: speedRange),
PedalKnob(label: "Intensity", node: $intensity, range: intensityRange),
]
}
public override var effectSwitches: [PedalSwitch] {
[
PedalSwitch(
label: "Tremolo",
node: $tremoloEnabled,
options: [
PedalSwitch.Option(title: "Off", value: switchOffValue),
PedalSwitch.Option(title: "On", value: switchOnValue),
]
),
]
}
/// Driven hard into the power stage, so 4× oversampling for anti-alias headroom.
public override var powerAmpOversample: Int { 4 }
public override var powerAmpDriveInput: any ValidGeneratorInput { grittyPowerDrive }
/// Wider card for the tremolo knobs plus the Tremolo switch.
public override var widthUnits: Int { 3 }
/// Creates a Sixties Combo 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: "Sixties Combo", inputBus: inputBus, outputBus: outputBus)
gain = 7.0 // gritty starting point
cab = 2.0 // Vintage Dark — small, dark
}
/// Onboard tremolo (gated by the Tremolo footswitch), inserted after the tone stack.
public override func onboardEffects(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
tremolo(signal, speed: $speed, depth: $intensity, enabled: $tremoloEnabled)
}
}