feat(amps): master-volume enabler + Master knob on British

Add powerAmpDriveInput hook to AmpVoicePedal: an overridable drive into the
power-amp TriodeStage, defaulting to the fixed powerAmpDrive so the five existing
amps are byte-for-byte unchanged. A master-volume amp overrides it with a live
knob mapped to a drive range — so Master pushes the power-amp stage into
saturation (real master-volume behaviour), unlike `level`, which only attenuates
the finished output post-cab/post-limiter.

British gains a Master knob (LinLin [0,1] → power-amp drive [0.5, 5.0]): crank
Gain for preamp grind, set Master for power-amp saturation. signatureKnobs now
[Presence, Master]. Other current amps are non-master (Fender blackface, Vox,
JC) and keep the fixed drive.

Tests: Master changes the power-amp tone (not just level), round-trips through
state; British control-surface updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 09:53:03 -07:00
parent 9588d77137
commit b9a63eeaf5
3 changed files with 48 additions and 6 deletions
@@ -85,6 +85,13 @@ open class AmpVoicePedal: Pedal {
signal
}
/// Drive into the power-amp `TriodeStage`. Defaults to the fixed ``powerAmpDrive``; 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 }
// MARK: - Constants
private static let defaultMix: Double = 1.0
@@ -201,7 +208,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: powerAmpDrive, bias: powerAmpBias, oversample: 2)
input: processed, drive: powerAmpDriveInput, bias: powerAmpBias, oversample: 2)
return shapeVoice(powerAmp)
}