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:
@@ -32,6 +32,10 @@ public enum CabinetIRFactory {
|
||||
private static let lowPassCascadeQ: [Double] = [0.541_196_100_146_197, 1.306_562_964_876_377]
|
||||
/// Q for the resonant body / presence peaks.
|
||||
private static let peakQ: Double = 1.2
|
||||
/// Q for the narrower cone-breakup peak (higher than the body/presence peaks).
|
||||
private static let breakupQ: Double = 2.0
|
||||
/// Q for the mid interference notch (narrow, so it dips without gutting the midrange).
|
||||
private static let notchQ: Double = 2.5
|
||||
|
||||
/// Builds the impulse response for `voice` at `sampleRate`.
|
||||
///
|
||||
@@ -51,6 +55,8 @@ public enum CabinetIRFactory {
|
||||
OfflineBiquad.lowPass(freq: voice.lowPassHz, q: lowPassCascadeQ[1], sampleRate: sampleRate),
|
||||
OfflineBiquad.peaking(freq: voice.bodyHz, q: peakQ, gainDb: voice.bodyGainDb, sampleRate: sampleRate),
|
||||
OfflineBiquad.peaking(freq: voice.presenceHz, q: peakQ, gainDb: voice.presenceGainDb, sampleRate: sampleRate),
|
||||
OfflineBiquad.peaking(freq: voice.breakupHz, q: breakupQ, gainDb: voice.breakupGainDb, sampleRate: sampleRate),
|
||||
OfflineBiquad.peaking(freq: voice.notchHz, q: notchQ, gainDb: voice.notchGainDb, sampleRate: sampleRate),
|
||||
]
|
||||
|
||||
var ir: [Double] = [Double](repeating: 0.0, count: frames)
|
||||
|
||||
Reference in New Issue
Block a user