Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 690030a4c5 | |||
| 8a08264fb4 |
@@ -48,6 +48,8 @@ public extension PedalType {
|
|||||||
static let british = PedalType("British")
|
static let british = PedalType("British")
|
||||||
static let chime = PedalType("Chime")
|
static let chime = PedalType("Chime")
|
||||||
static let fullertonReverb = PedalType("Fullerton Reverb")
|
static let fullertonReverb = PedalType("Fullerton Reverb")
|
||||||
|
static let fullertonDeluxe = PedalType("Fullerton Deluxe")
|
||||||
|
static let fullertonPrinceton = PedalType("Fullerton Princeton")
|
||||||
static let jazzClean = PedalType("Jazz Clean")
|
static let jazzClean = PedalType("Jazz Clean")
|
||||||
static let chimeTopBoost = PedalType("Chime Top Boost")
|
static let chimeTopBoost = PedalType("Chime Top Boost")
|
||||||
static let neuralAmp = PedalType("Neural Amp")
|
static let neuralAmp = PedalType("Neural Amp")
|
||||||
|
|||||||
@@ -85,17 +85,19 @@ open class AmpVoicePedal: Pedal {
|
|||||||
signal
|
signal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Drive into the power-amp `TriodeStage`. Defaults to the fixed power-amp drive; a
|
/// Drive into the power-amp `TriodeStage`. Defaults to the fixed power-amp drive. Two kinds of
|
||||||
/// master-volume amp overrides this to return a live `Master` knob mapped to a drive range, so
|
/// amp override it: a **master-volume** amp returns a live `Master` knob mapped to a drive range
|
||||||
/// turning Master up pushes the power-amp stage into saturation — the real master-volume
|
/// (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-
|
/// behaviour, unlike `level`, which only attenuates the finished output); a **lower-headroom
|
||||||
/// master amps leave it at the fixed value and are unaffected.
|
/// variant** returns a fixed value *higher* than the default to model an amp that breaks up
|
||||||
|
/// earlier. Either way, higher drive = more power-amp saturation.
|
||||||
open var powerAmpDriveInput: any ValidGeneratorInput { powerAmpDrive }
|
open var powerAmpDriveInput: any ValidGeneratorInput { powerAmpDrive }
|
||||||
|
|
||||||
/// Oversampling factor for the power-amp stage — `2` or `4`. Amps that drive the power amp hard
|
/// Oversampling factor for the power-amp stage — `2` or `4`. Any amp that drives the power amp
|
||||||
/// (a `Master` control) override to `4` for more anti-alias headroom, since higher drive
|
/// harder than the default fixed value (a `Master` control, or a lower-headroom variant with a
|
||||||
|
/// higher fixed drive) should override to `4` for more anti-alias headroom, since higher drive
|
||||||
/// generates more high-order harmonics. Defaults to `2` (ample for the lightly-driven fixed
|
/// generates more high-order harmonics. Defaults to `2` (ample for the lightly-driven fixed
|
||||||
/// power stage of the non-master amps).
|
/// power stage of the standard voices).
|
||||||
open var powerAmpOversample: Int { 2 }
|
open var powerAmpOversample: Int { 2 }
|
||||||
|
|
||||||
// MARK: - Constants
|
// MARK: - Constants
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
// FullertonDeluxeAmpPedal.swift
|
||||||
|
// Lyrebird
|
||||||
|
//
|
||||||
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
import LyrebirdSynth
|
||||||
|
import LyrebirdUI
|
||||||
|
|
||||||
|
/// American blackface **lower-headroom combo** — the smaller-powered sibling of
|
||||||
|
/// ``FullertonReverbAmpPedal``.
|
||||||
|
///
|
||||||
|
/// Same reverb + tremolo + Bright control surface and American cab, but with less clean headroom:
|
||||||
|
/// the power-amp stage runs a higher fixed drive than the Twin, so it breaks up earlier and grittier.
|
||||||
|
/// The go-to blackface combo tone.
|
||||||
|
public final class FullertonDeluxeAmpPedal: FullertonReverbAmpPedal {
|
||||||
|
|
||||||
|
/// Power-amp drive — higher than the Twin's fixed `1.5` so it saturates earlier (less headroom).
|
||||||
|
private let deluxePowerDrive: Double = 2.2
|
||||||
|
|
||||||
|
public override var summaryText: String {
|
||||||
|
"American combo — earlier-breakup blackface tone with reverb, tremolo, and Bright."
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Fixed power-amp drive is higher than the Twin's, so 4× oversampling for anti-alias headroom.
|
||||||
|
public override var powerAmpOversample: Int { 4 }
|
||||||
|
public override var powerAmpDriveInput: any ValidGeneratorInput { deluxePowerDrive }
|
||||||
|
|
||||||
|
/// Creates a Fullerton Deluxe amp.
|
||||||
|
///
|
||||||
|
/// - Parameters:
|
||||||
|
/// - inputBus: Audio bus index to read the dry input from. Defaults to `0`.
|
||||||
|
/// - 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 Deluxe", inputBus: inputBus, outputBus: outputBus)
|
||||||
|
gain = 4.5 // slightly hotter starting point than the Twin
|
||||||
|
bass = 0.45 // a touch less low end than the 2×12
|
||||||
|
cab = 0.0 // American 1×12
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// FullertonPrincetonAmpPedal.swift
|
||||||
|
// Lyrebird
|
||||||
|
//
|
||||||
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
import LyrebirdSynth
|
||||||
|
import LyrebirdUI
|
||||||
|
|
||||||
|
/// American blackface **1×10 combo** — the smallest, darkest blackface voice, below
|
||||||
|
/// ``FullertonDeluxeAmpPedal``.
|
||||||
|
///
|
||||||
|
/// Same reverb + tremolo + Bright control surface, but voiced smaller: a darker cabinet, less low
|
||||||
|
/// end, and the earliest, most compressed breakup of the three — the classic small-studio recording
|
||||||
|
/// combo.
|
||||||
|
public final class FullertonPrincetonAmpPedal: FullertonReverbAmpPedal {
|
||||||
|
|
||||||
|
/// Power-amp drive — the highest of the blackface trio, so it breaks up earliest.
|
||||||
|
private let princetonPowerDrive: Double = 2.6
|
||||||
|
|
||||||
|
public override var summaryText: String {
|
||||||
|
"American 1×10 combo — small, dark, early-breakup blackface with reverb, tremolo, and Bright."
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Driven hardest of the blackface trio, so 4× oversampling for anti-alias headroom.
|
||||||
|
public override var powerAmpOversample: Int { 4 }
|
||||||
|
public override var powerAmpDriveInput: any ValidGeneratorInput { princetonPowerDrive }
|
||||||
|
|
||||||
|
/// Creates a Fullerton Princeton amp.
|
||||||
|
///
|
||||||
|
/// - Parameters:
|
||||||
|
/// - inputBus: Audio bus index to read the dry input from. Defaults to `0`.
|
||||||
|
/// - 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 Princeton", inputBus: inputBus, outputBus: outputBus)
|
||||||
|
gain = 5.0 // hotter still — the small combo grits up soonest
|
||||||
|
bass = 0.4 // least low end of the trio
|
||||||
|
treble = 0.55 // a shade darker
|
||||||
|
cab = 2.0 // Vintage Dark — the small, dark 1×10 voice
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ import LyrebirdUI
|
|||||||
/// A **Reverb** and a **Vibrato** switch model the amp's two-button footswitch: each bypasses its
|
/// A **Reverb** and a **Vibrato** switch model the amp's two-button footswitch: each bypasses its
|
||||||
/// effect (dry pass-through) while preserving the knob positions, so a player can stomp the FX in
|
/// effect (dry pass-through) while preserving the knob positions, so a player can stomp the FX in
|
||||||
/// and out without losing their settings.
|
/// and out without losing their settings.
|
||||||
public final class FullertonReverbAmpPedal: AmpVoicePedal {
|
open class FullertonReverbAmpPedal: AmpVoicePedal {
|
||||||
|
|
||||||
// MARK: - Onboard-effect parameters
|
// MARK: - Onboard-effect parameters
|
||||||
|
|
||||||
@@ -83,8 +83,11 @@ public final class FullertonReverbAmpPedal: AmpVoicePedal {
|
|||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - inputBus: Audio bus index to read the dry input from. Defaults to `0`.
|
/// - inputBus: Audio bus index to read the dry input from. Defaults to `0`.
|
||||||
/// - outputBus: Audio bus index to write the processed output to. Defaults to `0`.
|
/// - outputBus: Audio bus index to write the processed output to. Defaults to `0`.
|
||||||
public init(inputBus: Int = 0, outputBus: Int = 0) {
|
/// The blackface-combo variants (Deluxe / Princeton) call the inherited
|
||||||
super.init(name: "Fullerton Reverb", inputBus: inputBus, outputBus: outputBus)
|
/// `AmpVoicePedal.init(name:inputBus:outputBus:)` designated init to set their own name while
|
||||||
|
/// inheriting the shared reverb + tremolo + bright control surface.
|
||||||
|
public convenience init(inputBus: Int = 0, outputBus: Int = 0) {
|
||||||
|
self.init(name: "Fullerton Reverb", inputBus: inputBus, outputBus: outputBus)
|
||||||
gain = 4.0 // headroom-rich clean default
|
gain = 4.0 // headroom-rich clean default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ public enum PedalRegistry {
|
|||||||
"British": { BritishAmpPedal() },
|
"British": { BritishAmpPedal() },
|
||||||
"Chime": { ChimeAmpPedal() },
|
"Chime": { ChimeAmpPedal() },
|
||||||
"Fullerton Reverb": { FullertonReverbAmpPedal() },
|
"Fullerton Reverb": { FullertonReverbAmpPedal() },
|
||||||
|
"Fullerton Deluxe": { FullertonDeluxeAmpPedal() },
|
||||||
|
"Fullerton Princeton": { FullertonPrincetonAmpPedal() },
|
||||||
"Jazz Clean": { JazzCleanAmpPedal() },
|
"Jazz Clean": { JazzCleanAmpPedal() },
|
||||||
"Chime Top Boost": { ChimeTopBoostAmpPedal() },
|
"Chime Top Boost": { ChimeTopBoostAmpPedal() },
|
||||||
"Neural Amp": { NeuralAmpPedal() },
|
"Neural Amp": { NeuralAmpPedal() },
|
||||||
|
|||||||
@@ -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 California, British, Chime, Fullerton Reverb, Jazz Clean, and Chime Top Boost amp pedals' tone stacks "
|
"The California, British, Chime, Fullerton Reverb, Fullerton Deluxe, Fullerton Princeton, Jazz Clean, and Chime Top Boost amp 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.",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public enum PedalCategory: String, CaseIterable, Identifiable, Sendable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static let mapping: [String: PedalCategory] = [
|
private static let mapping: [String: PedalCategory] = [
|
||||||
"California": .amp, "British": .amp, "Chime": .amp, "Fullerton Reverb": .amp, "Jazz Clean": .amp, "Chime Top Boost": .amp, "Neural Amp": .amp,
|
"California": .amp, "British": .amp, "Chime": .amp, "Fullerton Reverb": .amp, "Fullerton Deluxe": .amp, "Fullerton Princeton": .amp, "Jazz Clean": .amp, "Chime Top Boost": .amp, "Neural Amp": .amp,
|
||||||
"Overdrive": .gain, "Distortion": .gain, "Fuzz": .gain, "Volume": .gain,
|
"Overdrive": .gain, "Distortion": .gain, "Fuzz": .gain, "Volume": .gain,
|
||||||
"Compressor": .dynamics, "Sustainer": .dynamics, "Limiter": .dynamics, "Noise Gate": .dynamics,
|
"Compressor": .dynamics, "Sustainer": .dynamics, "Limiter": .dynamics, "Noise Gate": .dynamics,
|
||||||
"Graphic EQ": .filter, "Auto-Wah": .filter, "Wah": .filter, "Mutant": .filter,
|
"Graphic EQ": .filter, "Auto-Wah": .filter, "Wah": .filter, "Mutant": .filter,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public struct PedalPaletteView: View {
|
|||||||
/// Preferred display order for the built-in pedals. Any registered pedal not listed here is
|
/// Preferred display order for the built-in pedals. Any registered pedal not listed here is
|
||||||
/// appended afterwards (sorted) so the palette never silently drops a newly added pedal.
|
/// appended afterwards (sorted) so the palette never silently drops a newly added pedal.
|
||||||
private static let preferredOrder: [String] = [
|
private static let preferredOrder: [String] = [
|
||||||
"California", "British", "Chime", "Fullerton Reverb", "Jazz Clean", "Chime Top Boost", "Neural Amp", "Overdrive", "Distortion", "Compressor", "Sustainer", "Limiter", "Noise Gate", "Fuzz",
|
"California", "British", "Chime", "Fullerton Reverb", "Fullerton Deluxe", "Fullerton Princeton", "Jazz Clean", "Chime Top Boost", "Neural Amp", "Overdrive", "Distortion", "Compressor", "Sustainer", "Limiter", "Noise Gate", "Fuzz",
|
||||||
"Volume",
|
"Volume",
|
||||||
"Graphic EQ", "Tremolo", "Phaser", "Modulation", "Chorus", "Flanger", "Vibrato", "Rotary",
|
"Graphic EQ", "Tremolo", "Phaser", "Modulation", "Chorus", "Flanger", "Vibrato", "Rotary",
|
||||||
"Auto-Wah", "Wah", "Mutant", "Cabinet", "Ring Modulator", "Diffuser", "Bitcrusher", "Granulator",
|
"Auto-Wah", "Wah", "Mutant", "Cabinet", "Ring Modulator", "Diffuser", "Bitcrusher", "Granulator",
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ private func enclosureColor(for displayName: String) -> Color {
|
|||||||
case "British": return Color(red: 0.30, green: 0.16, blue: 0.10) // oxblood tolex
|
case "British": return Color(red: 0.30, green: 0.16, blue: 0.10) // oxblood tolex
|
||||||
case "Chime": return Color(red: 0.16, green: 0.24, blue: 0.22) // vintage green
|
case "Chime": return Color(red: 0.16, green: 0.24, blue: 0.22) // vintage green
|
||||||
case "Fullerton Reverb": return Color(red: 0.15, green: 0.22, blue: 0.30) // blackface panel
|
case "Fullerton Reverb": return Color(red: 0.15, green: 0.22, blue: 0.30) // blackface panel
|
||||||
|
case "Fullerton Deluxe": return Color(red: 0.17, green: 0.20, blue: 0.26) // blackface, warmer
|
||||||
|
case "Fullerton Princeton": return Color(red: 0.19, green: 0.19, blue: 0.23) // small blackface
|
||||||
case "Jazz Clean": return Color(red: 0.14, green: 0.30, blue: 0.34) // solid-state silver-teal
|
case "Jazz Clean": return Color(red: 0.14, green: 0.30, blue: 0.34) // solid-state silver-teal
|
||||||
case "Chime Top Boost": return Color(red: 0.20, green: 0.32, blue: 0.20) // vox-green tolex
|
case "Chime Top Boost": return Color(red: 0.20, green: 0.32, blue: 0.20) // vox-green tolex
|
||||||
case "Neural Amp": return Color(red: 0.22, green: 0.16, blue: 0.30) // deep neural violet
|
case "Neural Amp": return Color(red: 0.22, green: 0.16, blue: 0.30) // deep neural violet
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
// FullertonVariantsTests.swift
|
||||||
|
// Lyrebird
|
||||||
|
//
|
||||||
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
import Testing
|
||||||
|
import Foundation
|
||||||
|
import LyrebirdSynth
|
||||||
|
import LyrebirdUI
|
||||||
|
@testable import LyrebirdShoeGaze
|
||||||
|
|
||||||
|
@MainActor
|
||||||
|
@Suite("Fullerton blackface variants")
|
||||||
|
struct FullertonVariantsTests {
|
||||||
|
|
||||||
|
private let sampleRate: Double = 48000.0
|
||||||
|
|
||||||
|
private func render<P: AmpVoicePedal>(_ make: () -> P, configure: (P) -> Void = { _ in }) throws -> [Float] {
|
||||||
|
let (engine, url): (SynthesisEngine, URL) = makeNRTEngine(
|
||||||
|
duration: 0.3, sampleRate: sampleRate, numAudioBuses: 64)
|
||||||
|
defer { try? FileManager.default.removeItem(at: url) }
|
||||||
|
|
||||||
|
let srcBus: AudioBus = try engine.busAllocator.allocateAudioBus(channelCount: 1)
|
||||||
|
let dstBus: AudioBus = try engine.busAllocator.allocateAudioBus(channelCount: 1)
|
||||||
|
defer {
|
||||||
|
engine.busAllocator.releaseAudioBus(srcBus)
|
||||||
|
engine.busAllocator.releaseAudioBus(dstBus)
|
||||||
|
}
|
||||||
|
|
||||||
|
let source: TestLoopSource = TestLoopSource(targetBus: srcBus.index)
|
||||||
|
let pedal: P = make()
|
||||||
|
pedal.inputBus = srcBus.index
|
||||||
|
pedal.outputBus = dstBus.index
|
||||||
|
pedal.sampleRate = sampleRate
|
||||||
|
configure(pedal)
|
||||||
|
let master: TestRouteMaster = TestRouteMaster(inputBusIndex: dstBus.index)
|
||||||
|
try engine.add(source)
|
||||||
|
try engine.add(pedal, position: NodePosition.after(source))
|
||||||
|
try engine.add(master, position: NodePosition.after(pedal))
|
||||||
|
try engine.start()
|
||||||
|
return readStereoCAF(url: url, sampleRate: sampleRate)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func windowedSSD(_ a: [Float], _ b: [Float], skip: Int = 4096, window: Int = 4096) -> Double {
|
||||||
|
guard a.count >= skip + window, b.count >= skip + window else { return 0.0 }
|
||||||
|
return zip(a[skip..<(skip + window)], b[skip..<(skip + window)]).reduce(0.0) { acc, pair in
|
||||||
|
let d: Double = Double(pair.0 - pair.1); return acc + d * d
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private let variants: [(name: String, make: () -> FullertonReverbAmpPedal)] = [
|
||||||
|
("Fullerton Deluxe", { FullertonDeluxeAmpPedal() }),
|
||||||
|
("Fullerton Princeton", { FullertonPrincetonAmpPedal() }),
|
||||||
|
]
|
||||||
|
|
||||||
|
@Test func bothBuildNonSilentFinite() throws {
|
||||||
|
for v: (name: String, make: () -> FullertonReverbAmpPedal) in variants {
|
||||||
|
let s: [Float] = try render(v.make)
|
||||||
|
#expect(hasNonSilentOutput(s), "\(v.name) produced silence")
|
||||||
|
#expect(s.allSatisfy { $0.isFinite }, "\(v.name) produced non-finite output")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func variantsDifferFromTwinAndEachOther() throws {
|
||||||
|
// Same knob settings, different voicing (power-amp drive; plus cab for Princeton) → different output.
|
||||||
|
let cfg: (FullertonReverbAmpPedal) -> Void = { $0.gain = 6.0; $0.reverb = 0.3 }
|
||||||
|
let twin: [Float] = try render({ FullertonReverbAmpPedal() }, configure: cfg)
|
||||||
|
let deluxe: [Float] = try render({ FullertonDeluxeAmpPedal() }, configure: cfg)
|
||||||
|
let princeton: [Float] = try render({ FullertonPrincetonAmpPedal() }, configure: cfg)
|
||||||
|
#expect(windowedSSD(twin, deluxe) > 0, "Deluxe should differ from the Twin")
|
||||||
|
#expect(windowedSSD(deluxe, princeton) > 0, "Princeton should differ from the Deluxe")
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func inheritedReverbAndBrightWork() throws {
|
||||||
|
// The reverb knob and Bright switch are inherited from the Twin — spot-check on the Deluxe.
|
||||||
|
let dry: [Float] = try render({ FullertonDeluxeAmpPedal() }) { $0.reverb = 0.0 }
|
||||||
|
let wet: [Float] = try render({ FullertonDeluxeAmpPedal() }) { $0.reverb = 0.9 }
|
||||||
|
#expect(windowedSSD(dry, wet) > 0, "inherited reverb had no effect")
|
||||||
|
let flat: [Float] = try render({ FullertonPrincetonAmpPedal() }) { $0.bright = 0.0 }
|
||||||
|
let bright: [Float] = try render({ FullertonPrincetonAmpPedal() }) { $0.bright = 1.0 }
|
||||||
|
#expect(windowedSSD(flat, bright) > 0, "inherited bright switch had no effect")
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func stayWithinCeilingAtMaxGain() throws {
|
||||||
|
let ceilingEpsilon: Double = 1.0e-4
|
||||||
|
for v: (name: String, make: () -> FullertonReverbAmpPedal) in variants {
|
||||||
|
let hot: [Float] = try render(v.make) { (pedal: FullertonReverbAmpPedal) in
|
||||||
|
pedal.gain = 30.0
|
||||||
|
pedal.bass = 1.0
|
||||||
|
pedal.treble = 1.0
|
||||||
|
pedal.reverb = 1.0
|
||||||
|
pedal.bright = 1.0
|
||||||
|
pedal.intensity = 1.0
|
||||||
|
}
|
||||||
|
let peak: Double = hot.reduce(0.0) { Swift.max($0, abs(Double($1))) }
|
||||||
|
#expect(peak <= 1.0 + ceilingEpsilon, "\(v.name) peak \(peak) exceeds the ±1 ceiling")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func inheritFullControlSurface() throws {
|
||||||
|
for v: (name: String, make: () -> FullertonReverbAmpPedal) in variants {
|
||||||
|
let pedal: FullertonReverbAmpPedal = v.make()
|
||||||
|
#expect(pedal.effectKnobs.map { $0.label }
|
||||||
|
== ["Gain", "Bass", "Mid", "Treble", "Reverb", "Speed", "Intensity"], "\(v.name) knobs")
|
||||||
|
#expect(pedal.effectSwitches.map { $0.label } == ["Bright", "Reverb FX", "Vibrato"], "\(v.name) switches")
|
||||||
|
#expect(pedal.effectSelectors.map { $0.label } == ["Cab"], "\(v.name) selectors")
|
||||||
|
#expect(pedal.widthUnits == 3, "\(v.name) width")
|
||||||
|
#expect(pedal.toneStackModel == .fender, "\(v.name) tone stack")
|
||||||
|
#expect(pedal.powerAmpOversample == 4, "\(v.name) should oversample the harder-driven power amp at 4×")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func reverbRoundTripsThroughState() throws {
|
||||||
|
let pedal: FullertonDeluxeAmpPedal = FullertonDeluxeAmpPedal()
|
||||||
|
pedal.reverb = 0.7
|
||||||
|
pedal.cab = 3.0
|
||||||
|
let restored: FullertonDeluxeAmpPedal = FullertonDeluxeAmpPedal()
|
||||||
|
restored.applyState(pedal.captureState())
|
||||||
|
#expect(restored.reverb == 0.7 && restored.cab == 3.0, "Deluxe state did not round-trip")
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test func registeredInBuiltInRegistry() throws {
|
||||||
|
#expect(PedalRegistry.makePedal(type: "Fullerton Deluxe") is FullertonDeluxeAmpPedal)
|
||||||
|
#expect(PedalRegistry.makePedal(type: "Fullerton Princeton") is FullertonPrincetonAmpPedal)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user