// CabinetVoice.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT /// A built-in guitar-speaker-cabinet voicing. /// /// Each voice is a compact set of target-response parameters (low/high rolloff, a low-mid /// "body" bump, and a presence peak) from which ``CabinetIRFactory`` synthesizes a short /// impulse response entirely in code. These IRs are **our own content** (MIT, generated, no /// third-party capture), so they ship with the pedal without licensing concerns. (Loading a /// user-supplied captured `.wav` cab IR is a planned follow-up.) /// /// The values are deliberately broad-strokes voicings, not measurements of specific hardware. public enum CabinetVoice: String, CaseIterable, Sendable { case americanCombo case britishStack case vintageDark /// Human-readable name for pickers. public var displayName: String { switch self { case .americanCombo: return "American 1×12" case .britishStack: return "British 4×12" case .vintageDark: return "Vintage Dark" } } /// Low-frequency rolloff (high-pass cutoff) in Hz — the speaker's bass limit. var highPassHz: Double { switch self { case .americanCombo: return 80.0 case .britishStack: return 95.0 case .vintageDark: return 90.0 } } /// High-frequency rolloff (low-pass cutoff) in Hz — the speaker's top-end limit. Applied as a /// two-stage cascade for a steeper, more speaker-like slope. var lowPassHz: Double { switch self { case .americanCombo: return 5500.0 case .britishStack: return 4500.0 case .vintageDark: return 3800.0 } } /// Low-mid "body" peak centre in Hz. var bodyHz: Double { switch self { case .americanCombo: return 420.0 case .britishStack: return 700.0 case .vintageDark: return 500.0 } } /// Low-mid body peak gain in dB (may be negative for a scoop). var bodyGainDb: Double { switch self { case .americanCombo: return 1.5 case .britishStack: return -2.0 case .vintageDark: return 2.0 } } /// Presence peak centre in Hz — the upper-mid "bite". var presenceHz: Double { switch self { case .americanCombo: return 3000.0 case .britishStack: return 2500.0 case .vintageDark: return 2200.0 } } /// Presence peak gain in dB. var presenceGainDb: Double { switch self { case .americanCombo: return 3.0 case .britishStack: return 4.0 case .vintageDark: return 2.0 } } }