feat(amps): channel-switch enabler + drive-channel amps (Phase 4)

Enabler:
- PedalSwitch.rebuildsOnChange (mirrors PedalSelectorKnob): a switch that changes
  graph topology asks the host to rebuild. Wired through PedalSwitchView (onCommit
  on a changed tap) and PedalView.switchRow → pedalRebuildAction.
- AmpVoicePedal.preampStage(_:) overridable hook (default: one TriodeStage at
  Gain). preCabinetCore feeds it; a channel amp cascades an extra stage on its
  drive channel. Named preampOversample constant (4).

Amps:
- Fullerton Drive — American two-channel combo: blackface Clean + an overdrive
  channel (cascaded TriodeStage set by Drive), spring reverb, Bright. Channel
  switch is rebuildsOnChange, so only the selected channel's stages are built.
- Jazz Clean — add the JC onboard Distortion channel (Clean/Dist switch + Drive
  knob) via the same preampStage cascade; flows through its stereo wideEffect.

Registered Fullerton Drive across 6 sites as .amp. 22 tests across the two amps
(channel switch changes output, drive knob, rebuildsOnChange, ceiling on the
drive channel, control surface, round-trip, registry).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 13:04:06 -07:00
parent 8cd77ad984
commit da4d5e23ea
12 changed files with 327 additions and 10 deletions
+10 -1
View File
@@ -54,6 +54,11 @@ public struct PedalSwitch {
/// to their first (off) option — while the tempo indicator is turned off. Defaults to `false`.
public let tempoDependent: Bool
/// When `true`, committing a new position asks the host to rebuild the board — for switches that
/// change the *graph topology* (e.g. a clean/drive channel that adds or removes a gain stage),
/// the same mechanism as ``PedalSelectorKnob/rebuildsOnChange``. Defaults to `false`.
public let rebuildsOnChange: Bool
/// Creates a switch descriptor.
///
/// - Parameters:
@@ -62,17 +67,21 @@ public struct PedalSwitch {
/// (`pedal.$mode`, `pedal.$direction`, …).
/// - options: Ordered switch positions, left to right. At least two.
/// - tempoDependent: `true` if the switch depends on the tempo/clock. Defaults to `false`.
/// - rebuildsOnChange: Ask the host to rebuild the board when a new position is committed. Use
/// for switches that change graph topology (e.g. a channel switch). Defaults to `false`.
public init(
label: String,
node: UIParamNode,
options: [Option],
tempoDependent: Bool = false
tempoDependent: Bool = false,
rebuildsOnChange: Bool = false
) {
precondition(options.count >= 2, "PedalSwitch requires at least two options")
self.label = label
self.node = node
self.options = options
self.tempoDependent = tempoDependent
self.rebuildsOnChange = rebuildsOnChange
}
/// The value of the next option after the one nearest `current`, wrapping to the first — so a