fix(amps): master review follow-ups — tone-proving test, headroom, default

- britishMasterDrivesPowerAmp now uses an RMS-normalized SSD so it proves Master
  changes the *waveshape* (power-amp saturation), not merely level — a raw SSD
  couldn't distinguish the two, and distinguishing them is the whole point vs
  `level`.
- Add powerAmpOversample hook (default 2); British overrides to 4 so the higher
  Master drive (up to 5.0 vs the fixed 1.5) has anti-alias headroom.
- British Master default 0.3 → 0.22 so it maps to ≈1.5 drive, keeping the amp's
  out-of-box tone unchanged.
- Add a max-Master (gain 30 + Master 1.0) ceiling test; DocC no longer links the
  private powerAmpDrive symbol.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 09:59:59 -07:00
parent b9a63eeaf5
commit 48dce06f5a
3 changed files with 52 additions and 8 deletions
@@ -17,8 +17,10 @@ public final class BritishAmpPedal: AmpVoicePedal {
/// Presence amount in [0, 1] → 0…`presenceMaxGainDb` of lift above `presenceFreqHz`.
@UIParam public var presence: Double = 0.4
/// Master volume in [0, 1] → power-amp drive in [`masterMinDrive`, `masterMaxDrive`].
@UIParam public var master: Double = 0.3
/// Master volume in [0, 1] → power-amp drive in [`masterMinDrive`, `masterMaxDrive`]. The
/// default maps to ≈1.5 drive — the amp's prior fixed power-amp drive — so the out-of-box tone
/// is unchanged; turn it up for power-amp saturation.
@UIParam public var master: Double = 0.22
private let presenceFreqHz: Double = 4500.0
private let presenceMaxGainDb: Double = 8.0
@@ -44,6 +46,10 @@ public final class BritishAmpPedal: AmpVoicePedal {
LinLin.Audio($master, inLo: 0.0, inHi: 1.0, outLo: masterMinDrive, outHi: masterMaxDrive)
}
/// 4× oversampling on the power-amp stage — Master can drive it well past the fixed value used
/// by the non-master amps, so the extra anti-alias headroom keeps the added harmonics clean.
public override var powerAmpOversample: Int { 4 }
/// Creates a British amp.
///
/// - Parameters: