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
@@ -85,13 +85,19 @@ open class AmpVoicePedal: Pedal {
signal
}
/// Drive into the power-amp `TriodeStage`. Defaults to the fixed ``powerAmpDrive``; a
/// Drive into the power-amp `TriodeStage`. Defaults to the fixed power-amp drive; a
/// master-volume amp overrides this to return a live `Master` knob mapped to a drive range, so
/// turning Master up pushes the power-amp stage into saturation — the real master-volume
/// behaviour — rather than merely attenuating the finished output the way `level` does. Non-
/// master amps leave it at the fixed value and are unaffected.
open var powerAmpDriveInput: any ValidGeneratorInput { powerAmpDrive }
/// Oversampling factor for the power-amp stage — `2` or `4`. Amps that drive the power amp hard
/// (a `Master` control) override to `4` for more anti-alias headroom, since higher drive
/// generates more high-order harmonics. Defaults to `2` (ample for the lightly-driven fixed
/// power stage of the non-master amps).
open var powerAmpOversample: Int { 2 }
// MARK: - Constants
private static let defaultMix: Double = 1.0
@@ -208,7 +214,7 @@ open class AmpVoicePedal: Pedal {
input: preamp, bass: $bass, mid: $mid, treble: $treble, model: toneStackModel)
let processed: any ValidGeneratorInput = onboardEffects(toned)
let powerAmp: TriodeStage = TriodeStage(
input: processed, drive: powerAmpDriveInput, bias: powerAmpBias, oversample: 2)
input: processed, drive: powerAmpDriveInput, bias: powerAmpBias, oversample: powerAmpOversample)
return shapeVoice(powerAmp)
}