feat(amp): Gain/Drive become a 1–11 dial with a musical taper

Every amp's Gain (and the boutique/drive-channel Drive) is now a 1–11 dial —
yes, it goes to eleven — instead of the raw 1–30 tube-drive number.

- New AmpVoicePedal.taperedDrive(_:) maps the 1–11 dial to the 1–30 tube drive
  through an exponential LinExp taper, so 1 is nearly clean, 11 is full
  saturation, and the useful grind spreads across the dial (fine at the bottom,
  steep at the top) rather than bunching near the low end.
- Wired into the base preampStage and every override that feeds a drive:
  Boutique / Fullerton Drive / Jazz Clean / British Dual (Drive channel),
  Anaheim (SS preamp), British Master (cascaded stage).
- gainRange / driveRange → 1...11; every amp's default gain/drive reconverted
  from drive-space to the equivalent dial value (dial = 1 + 10·ln(drive)/ln(30)),
  so each amp's shipped voicing is preserved.
- No preset migration (nothing shipped — per product owner); all knob work
  stays within ShoeGaze (no core Lyrebird change).
- Tests updated to the 1–11 scale; added range + exponential-taper assertions.

671 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 10:42:35 -07:00
parent da2c3328ee
commit f9ddd6b160
41 changed files with 151 additions and 106 deletions
@@ -19,8 +19,8 @@ public final class FullertonDriveAmpPedal: AmpVoicePedal {
/// Spring-reverb wet mix in [0, 1].
@UIParam public var reverb: Double = 0.25
/// Drive-channel preamp gain (the cascaded overdrive stage). Range [1, 30].
@UIParam public var drive: Double = 8.0
/// Drive-channel preamp gain (the cascaded overdrive stage). Dial [1, 11], tapered to tube drive.
@UIParam public var drive: Double = 7.11
/// Bright switch: `0` = flat, `1` = treble shelf engaged.
@UIParam public var bright: Double = 0.0
/// Channel select: `0` = Clean, `1` = Drive (the cascaded overdrive stage).
@@ -35,7 +35,7 @@ public final class FullertonDriveAmpPedal: AmpVoicePedal {
private let channelThreshold: Double = 0.5
private let reverbRange: ClosedRange<Double> = 0.0 ... 1.0
private let driveRange: ClosedRange<Double> = 1.0 ... 30.0
private let driveRange: ClosedRange<Double> = 1.0 ... 11.0
public override var toneStackModel: ToneStackModel { .fender }
public override var summaryText: String {
@@ -80,7 +80,7 @@ public final class FullertonDriveAmpPedal: AmpVoicePedal {
/// - outputBus: Audio bus index to write the processed output to. Defaults to `0`.
public init(inputBus: Int = 0, outputBus: Int = 0) {
super.init(name: "Fullerton Drive", inputBus: inputBus, outputBus: outputBus)
gain = 4.0
gain = 5.08
cab = 0.0 // American 1×12
}
@@ -97,7 +97,7 @@ public final class FullertonDriveAmpPedal: AmpVoicePedal {
public override func preampStage(_ signal: any ValidGeneratorInput) -> any ValidGeneratorInput {
let clean: any ValidGeneratorInput = super.preampStage(signal)
guard channel >= channelThreshold else { return clean }
return TriodeStage(input: clean, drive: $drive, bias: driveBias, oversample: preampOversample)
return TriodeStage(input: clean, drive: taperedDrive($drive), bias: driveBias, oversample: preampOversample)
}
/// Spring reverb in the onboard-effects slot (after the tone stack).