feat(amps): Jazz Clean — stereo-chorus solid-state amp

First stereo (widener) amp, modeling the JC-style ultra-clean combo whose
signature is a lush stereo chorus fed to two power amps / speakers.

Refactor AmpVoicePedal.effect() into two reusable, behavior-preserving pieces:
- preCabinetCore(_:)  — inputShaping → preamp → tone → onboardEffects → power → shapeVoice (mono)
- cabinetAndLimit(_:) — selected cab convolver → tanh soft-limit → Clip(±1) (per channel)
effect() = cabinetAndLimit(preCabinetCore(dry)); the four existing amps are
unchanged (verified by their suites).

JazzCleanAmpPedal (widener, .fender): mono core (with spring reverb + bright)
→ Chorus (mono → stereo split) → per-channel cabinetAndLimit. Controls:
Gain/Bass/Mid/Treble + Reverb/Rate/Depth knobs, Bright + Chorus switches, Cab
selector; widthUnits 3; defaults to the Full-Range cab for a hi-fi voice. The
Chorus footswitch gates the wet mix to 0 (dry pass-through, Rate/Depth kept).

Registered across registry/type/category/palette/enclosure; Help acknowledgment
lists its tone stack. 10 tests (chorus rate/depth, reverb, bright, footswitch
bit-exact bypass, ceiling with FX, stereo/control-surface config, round-trip,
registry).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 08:12:27 -07:00
parent 27fb6e6898
commit 102715ded1
9 changed files with 328 additions and 10 deletions
@@ -184,7 +184,16 @@ open class AmpVoicePedal: Pedal {
/// - Parameter dry: Dry mono input signal.
/// - Returns: The amped, cab-convolved, soft-limited, ceiling-clamped mono output.
public override func effect(_ dry: any ValidGeneratorInput) -> any ValidGeneratorInput {
let sr: Double = sampleRate
cabinetAndLimit(preCabinetCore(dry))
}
/// The mono pre-cabinet core: `inputShaping → preamp → tone stack → onboardEffects → power amp →
/// shapeVoice`. Factored out of `effect(_:)` so a stereo (widener) amp can split into a stereo
/// stage (e.g. a stereo chorus) between the core and a per-channel ``cabinetAndLimit(_:)``.
///
/// - Parameter dry: Dry mono input signal.
/// - Returns: The post-power-amp, pre-cabinet mono signal.
func preCabinetCore(_ dry: any ValidGeneratorInput) -> any ValidGeneratorInput {
let preShaped: any ValidGeneratorInput = inputShaping(dry)
let preamp: TriodeStage = TriodeStage(input: preShaped, drive: $gain, bias: preampBias, oversample: 4)
let toned: ToneStack = ToneStack(
@@ -192,11 +201,20 @@ open class AmpVoicePedal: Pedal {
let processed: any ValidGeneratorInput = onboardEffects(toned)
let powerAmp: TriodeStage = TriodeStage(
input: processed, drive: powerAmpDrive, bias: powerAmpBias, oversample: 2)
let shaped: any ValidGeneratorInput = shapeVoice(powerAmp)
return shapeVoice(powerAmp)
}
/// The per-channel cabinet + output stage: the selected `CabinetVoice` convolver → `tanh`
/// soft-limit → `Clip(±1)` safety clamp. Applied once in mono, or once per channel by a
/// widener amp.
///
/// - Parameter signal: The post-core signal for one channel.
/// - Returns: The cab-convolved, soft-limited, ceiling-clamped signal.
func cabinetAndLimit(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
let voice: CabinetVoice = CabinetVoice.voice(atSelectorValue: cab)
let cabinet: ConvolutionReverb.Audio = ConvolutionReverb.Audio(
input: shaped,
ir: CabinetIRFactory.makeIR(voice: voice, sampleRate: sr),
input: signal,
ir: CabinetIRFactory.makeIR(voice: voice, sampleRate: sampleRate),
mix: cabinetMix
)
let softLimited: TriodeStage = TriodeStage(