fix(amps): Phase 2 review nits — Help scope, compose switches, test
- HelpView: scope the tone-stack acknowledgment to "tube-amp voice pedals" (the genericized "amp pedals" wrongly implied Neural Amp, which is .amp but has no tone stack, follows Yeh & Smith). - BritishBluesbreaker: compose super.effectSwitches for the Bright switch instead of re-declaring it, so it stays in sync with the base. - Test: round-trip now also asserts speed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -42,16 +42,9 @@ public final class BritishBluesbreakerAmpPedal: BritishComboAmpPedal {
|
|||||||
/// Wider card for the extra tremolo knobs plus the Bright and Tremolo switches.
|
/// Wider card for the extra tremolo knobs plus the Bright and Tremolo switches.
|
||||||
public override var widthUnits: Int { 3 }
|
public override var widthUnits: Int { 3 }
|
||||||
|
|
||||||
|
/// The base Bright switch plus a Tremolo footswitch (compose `super` so Bright stays in sync).
|
||||||
public override var effectSwitches: [PedalSwitch] {
|
public override var effectSwitches: [PedalSwitch] {
|
||||||
[
|
super.effectSwitches + [
|
||||||
PedalSwitch(
|
|
||||||
label: "Bright",
|
|
||||||
node: $bright,
|
|
||||||
options: [
|
|
||||||
PedalSwitch.Option(title: "Off", value: switchOffValue),
|
|
||||||
PedalSwitch.Option(title: "On", value: switchOnValue),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
PedalSwitch(
|
PedalSwitch(
|
||||||
label: "Tremolo",
|
label: "Tremolo",
|
||||||
node: $tremoloEnabled,
|
node: $tremoloEnabled,
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ public struct HelpView: View {
|
|||||||
+ "built-in speaker impulse responses.",
|
+ "built-in speaker impulse responses.",
|
||||||
"The Cabinet pedal's built-in cab voicings are original impulse responses generated in "
|
"The Cabinet pedal's built-in cab voicings are original impulse responses generated in "
|
||||||
+ "code — not captures of any third-party hardware or IR pack.",
|
+ "code — not captures of any third-party hardware or IR pack.",
|
||||||
"The amp pedals' tone stacks "
|
"The tube-amp voice pedals' tone stacks "
|
||||||
+ "follow the Yeh & Smith analysis of the classic passive tone-stack circuit (\"Discretization "
|
+ "follow the Yeh & Smith analysis of the classic passive tone-stack circuit (\"Discretization "
|
||||||
+ "of the '59 Fender Bassman Tone Stack\", DAFx-06); their models are original code, not "
|
+ "of the '59 Fender Bassman Tone Stack\", DAFx-06); their models are original code, not "
|
||||||
+ "captures of specific hardware.",
|
+ "captures of specific hardware.",
|
||||||
|
|||||||
@@ -144,12 +144,13 @@ struct BritishComboAmpPedalTests {
|
|||||||
let pedal: BritishBluesbreakerAmpPedal = BritishBluesbreakerAmpPedal()
|
let pedal: BritishBluesbreakerAmpPedal = BritishBluesbreakerAmpPedal()
|
||||||
pedal.presence = 0.7
|
pedal.presence = 0.7
|
||||||
pedal.bright = 1.0
|
pedal.bright = 1.0
|
||||||
|
pedal.speed = 9.0
|
||||||
pedal.intensity = 0.5
|
pedal.intensity = 0.5
|
||||||
pedal.tremoloEnabled = 0.0
|
pedal.tremoloEnabled = 0.0
|
||||||
pedal.cab = 2.0
|
pedal.cab = 2.0
|
||||||
let restored: BritishBluesbreakerAmpPedal = BritishBluesbreakerAmpPedal()
|
let restored: BritishBluesbreakerAmpPedal = BritishBluesbreakerAmpPedal()
|
||||||
restored.applyState(pedal.captureState())
|
restored.applyState(pedal.captureState())
|
||||||
#expect(restored.presence == 0.7 && restored.bright == 1.0)
|
#expect(restored.presence == 0.7 && restored.bright == 1.0 && restored.speed == 9.0)
|
||||||
#expect(restored.intensity == 0.5 && restored.tremoloEnabled == 0.0 && restored.cab == 2.0)
|
#expect(restored.intensity == 0.5 && restored.tremoloEnabled == 0.0 && restored.cab == 2.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user