feat(amps): master-volume Marshalls — British Master / Dual (Phase 5)

Add a shared AmpVoicePedal.masterDrive(_:minDrive:maxDrive:) helper (Master knob
[0,1] → power-amp drive range) and route British's powerAmpDriveInput through it.
Two new BritishComboAmpPedal subclasses (Presence + Bright inherited):

- British Master — 800-series single-channel lead: preampStage cascades a second
  gain stage (both driven by Gain) + Master + 4× power-amp oversample.
- British Dual — 900/DSL: rebuildsOnChange Clean/Lead Channel switch (Lead
  cascades a stage set by Drive), Master, spring reverb; widthUnits 4.

Registered across 6 sites as .amp. 11 tests (Master drives power amp via
RMS-normalized SSD, cascaded-vs-Plexi, channel switch + rebuildsOnChange, drive/
reverb, ceiling on lead channel at max, control surfaces, round-trips, registry).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 13:46:08 -07:00
parent a7534a29db
commit cda596b9d5
10 changed files with 347 additions and 3 deletions
@@ -111,6 +111,23 @@ open class AmpVoicePedal: Pedal {
return signal * lfo
}
/// Maps a `Master` knob `[0, 1]` to a power-amp drive range — the canonical body of a
/// master-volume amp's ``powerAmpDriveInput`` override. Turning Master up drives the power-amp
/// stage harder (real master-volume saturation, unlike `level`).
///
/// - Parameters:
/// - master: The `Master` knob node (`[0, 1]`).
/// - minDrive: Power-amp drive at `master = 0`.
/// - maxDrive: Power-amp drive at `master = 1`.
/// - Returns: The mapped drive to feed the power-amp stage.
func masterDrive(
_ master: any ValidGeneratorInput,
minDrive: Double,
maxDrive: Double
) -> any ValidGeneratorInput {
LinLin.Audio(master, inLo: 0.0, inHi: 1.0, outLo: minDrive, outHi: maxDrive)
}
/// The preamp gain stage — the (post-`inputShaping`) input driven through the first tube stage
/// at `Gain`. Default: one `TriodeStage`. A channel-switching amp overrides this to cascade an
/// extra stage on its drive channel (call `super.preampStage(_:)` for the clean stage first).