fix(cab): keep modernStack breakup in-band; doc + test follow-ups
Review fixes: - modernStack.breakupHz 4500 → 3800 so the cone-breakup peak sits below the 4000 Hz low-pass (was the only voice with breakup > lowPass, which rolled off most of the intended boost). - CabinetIRFactory class doc: list the full 7-stage chain (breakup + notch were missing). - Tests: add loFiIsDarkerThanFullRange and breakupPeakLiftsUpperMid for per-voice differentiation; drop the hard-coded voice count in voiceNamesAreUnique. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -88,9 +88,26 @@ struct CabinetIRFactoryTests {
|
||||
#expect(atNotch < above, "notch did not dip below the upper midrange")
|
||||
}
|
||||
|
||||
@Test func loFiIsDarkerThanFullRange() {
|
||||
// Lo-Fi 1×8 rolls off at ~3 kHz vs Full-Range's ~9 kHz, so it is markedly darker at 4 kHz.
|
||||
let loFi: LyrebirdBuffer = CabinetIRFactory.makeIR(voice: .loFiBox, sampleRate: sampleRate)
|
||||
let frfr: LyrebirdBuffer = CabinetIRFactory.makeIR(voice: .fullRange, sampleRate: sampleRate)
|
||||
#expect(responseMagnitude(frfr, hz: 4000.0) > responseMagnitude(loFi, hz: 4000.0),
|
||||
"Lo-Fi should be darker than Full-Range at 4 kHz")
|
||||
}
|
||||
|
||||
@Test func breakupPeakLiftsUpperMid() {
|
||||
// Bright 1×12 (breakup +3 dB @ 5.2 kHz, LP 6.5 kHz) keeps more ~5.1 kHz energy than
|
||||
// Boutique 2×12 (breakup +1.5 dB @ 5.0 kHz, LP 6.0 kHz) — both the stronger breakup boost
|
||||
// and the higher low-pass push the same direction.
|
||||
let bright: LyrebirdBuffer = CabinetIRFactory.makeIR(voice: .brightCombo, sampleRate: sampleRate)
|
||||
let boutique: LyrebirdBuffer = CabinetIRFactory.makeIR(voice: .boutiqueOpen, sampleRate: sampleRate)
|
||||
#expect(responseMagnitude(bright, hz: 5100.0) > responseMagnitude(boutique, hz: 5100.0),
|
||||
"brightCombo should have more upper-mid bite than boutiqueOpen at 5.1 kHz")
|
||||
}
|
||||
|
||||
@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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user