feat(amp): Bias X (push-pull balance) in the advanced pop-over
Phase 13. Add a shared power-amp Bias X control modelling push-pull tube balance. powerAmpStage(_:) runs two TriodeStage halves biased at powerAmpBiasInput ± (biasX·biasXMaxSpread) and averages them: at biasX = 0 both halves share the base bias, so the average is bit-identical to the prior single stage (default, no re-voicing); turning it up spreads the operating points, shifting the even/odd harmonic mix. Deliberately a character control on the single-ended power model, not a full push-pull topology rebuild — it reduces to the exact shipped tone at biasX = 0 (monotonic imbalance amount, default 0). Appended to advancedKnobs (Sag, Bias, Bias X) — append-only so Phase-11 presets (2 advancedValues) still load with Bias X defaulting. Tests: Bias X changes waveshape (RMS-normalized, not level), stays within ±1, is exposed in the pop-over, round-trips through state; neutral Sag/Bias/Bias X is bit-exact identity. 650 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,7 @@ struct ModernHighGainAmpPedalTests {
|
||||
// Sag now lives in the shared advanced pop-over (with Bias), not on the pedal face.
|
||||
#expect(pedal.effectKnobs.map { $0.label }
|
||||
== ["Gain", "Bass", "Mid", "Treble", "Presence", "Depth", "Master", "Drive"])
|
||||
#expect(pedal.advancedKnobs.map { $0.label } == ["Sag", "Bias"])
|
||||
#expect(pedal.advancedKnobs.map { $0.label } == ["Sag", "Bias", "Bias X"])
|
||||
#expect(pedal.effectSwitches.map { $0.label } == ["Channel", "Tight"])
|
||||
#expect(pedal.widthUnits == 4)
|
||||
#expect(pedal.toneStackModel == .mesa)
|
||||
@@ -140,7 +140,8 @@ struct ModernHighGainAmpPedalTests {
|
||||
// Gain…Drive, then Mix (0.8), Level (0.9) — the old Sag (0.7) is gone from knobValues.
|
||||
#expect(restored.knobValues == [10.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 15.0, 0.8, 0.9],
|
||||
"legacy Sag shifted Mix/Level: \(restored.knobValues)")
|
||||
// Sag lifted into advanced slot 0; Bias had no legacy value → default 0.5.
|
||||
#expect(restored.advancedValues == [0.7, 0.5], "Sag/Bias advanced values wrong: \(restored.advancedValues)")
|
||||
// Sag lifted into advanced slot 0; Bias (0.5) and Bias X (0.0) had no legacy value → defaults.
|
||||
#expect(restored.advancedValues == [0.7, 0.5, 0.0],
|
||||
"Sag/Bias/Bias X advanced values wrong: \(restored.advancedValues)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user