feat(cab): 5 new cabinet voices + notch/breakup IR shaping

Expand CabinetVoice from 3 to 8 synthesized voicings (all original code, no
captures): add Modern 4×12, Boutique 2×12, Bright 1×12, Full-Range (FRFR),
and Lo-Fi 1×8.

Extend the IR synthesis model with two per-voice stages so the voices reach
character the old 4-band curve could not:
- cone-"breakup" peak (narrow upper-mid bite/clank, breakupQ 2.0)
- mid interference "notch" (comb-filter dip ~1.2–2.5 kHz, notchQ 2.5)

Both are RBJ peaking biquads; gain 0 = identity, so a voice can disable either
(Full-Range runs a flat notch). Chain is now HP → LP×2 → body → presence →
breakup → notch. New tests: FRFR top-end extension, notch mid-dip, 8-voice
name uniqueness.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-02 18:49:08 -07:00
parent 733e979c1b
commit ec4e7dc5a4
3 changed files with 137 additions and 5 deletions
@@ -66,4 +66,31 @@ struct CabinetIRFactoryTests {
let darkHigh: Double = responseMagnitude(dark, hz: 5000.0)
#expect(americanHigh > darkHigh, "vintageDark should be darker at 5 kHz")
}
@Test func fullRangeExtendsHigherThanCombo() {
// Full-Range (FRFR) has a ~9 kHz low-pass vs the American combo's ~5.5 kHz, so it keeps
// markedly more energy at 8 kHz.
let frfr: LyrebirdBuffer = CabinetIRFactory.makeIR(voice: .fullRange, sampleRate: sampleRate)
let combo: LyrebirdBuffer = CabinetIRFactory.makeIR(voice: .americanCombo, sampleRate: sampleRate)
let frfrHigh: Double = responseMagnitude(frfr, hz: 8000.0)
let comboHigh: Double = responseMagnitude(combo, hz: 8000.0)
#expect(frfrHigh > comboHigh * 2.0, "FRFR should keep more 8 kHz than the combo")
}
@Test func notchCreatesMidDip() {
// Modern 4×12 has a deep interference notch at 1.7 kHz. Its response there should dip below
// the surrounding midrange (points chosen clear of the body / presence peaks).
let ir: LyrebirdBuffer = CabinetIRFactory.makeIR(voice: .modernStack, sampleRate: sampleRate)
let atNotch: Double = responseMagnitude(ir, hz: 1700.0)
let below: Double = responseMagnitude(ir, hz: 1100.0)
let above: Double = responseMagnitude(ir, hz: 2400.0)
#expect(atNotch < below, "notch did not dip below the lower midrange")
#expect(atNotch < above, "notch did not dip below the upper midrange")
}
@Test func voiceNamesAreUnique() {
let names: [String] = CabinetVoice.allCases.map { $0.displayName }
#expect(Set(names).count == names.count, "duplicate cabinet display names")
#expect(names.count == 8, "expected 8 cabinet voices")
}
}