fix(amps): Jazz Clean chorus depth range + true stereo tests
Review fixes: - chorusDepth was defaulted 0.3 with a 0..1 range, but the Chorus generator's depth is a fraction of the delay time — that's ~30-300× the classic-chorus band and produces pitch wobble, not lush chorus. Retune to default 0.005, range 0.0005...0.015 (matching the ModulationPedal precedent). - Tests now render the widener as true stereo (outputBusRight + split master), asserting L≠R when the chorus is engaged and bit-exact L==R when bypassed, and checking the ±1 ceiling on BOTH channels — the prior suite only exercised the left channel. - AmpVoicePedal base doc lists Jazz Clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import LyrebirdSynth
|
||||
import LyrebirdUI
|
||||
|
||||
/// Shared base for the amp pedals (California / British / Chime / Fullerton Reverb).
|
||||
/// Shared base for the amp pedals (California / British / Chime / Fullerton Reverb / Jazz Clean).
|
||||
///
|
||||
/// Each concrete amp fixes one tone-stack ``ToneStackModel`` and adds one signature control, but
|
||||
/// shares the common chain built here:
|
||||
|
||||
@@ -31,8 +31,9 @@ public final class JazzCleanAmpPedal: AmpVoicePedal {
|
||||
@UIParam public var reverb: Double = 0.2
|
||||
/// Chorus LFO rate in Hz. Range [0.1, 5.0].
|
||||
@UIParam public var chorusRate: Double = 0.8
|
||||
/// Chorus depth as a fraction of the base delay time, in [0, 1].
|
||||
@UIParam public var chorusDepth: Double = 0.3
|
||||
/// Chorus depth as a fraction of the base delay time. Kept in the classic-chorus band
|
||||
/// (~0.001–0.01) so it adds width without pitch wobble.
|
||||
@UIParam public var chorusDepth: Double = 0.005
|
||||
/// Bright switch: `0` = flat, `1` = treble shelf engaged.
|
||||
@UIParam public var bright: Double = 0.0
|
||||
/// Chorus footswitch: `1` = chorus engaged (stereo), `0` = bypassed (dry, mono-equivalent).
|
||||
@@ -51,7 +52,7 @@ public final class JazzCleanAmpPedal: AmpVoicePedal {
|
||||
|
||||
private let reverbRange: ClosedRange<Double> = 0.0 ... 1.0
|
||||
private let chorusRateRange: ClosedRange<Double> = 0.1 ... 5.0
|
||||
private let chorusDepthRange: ClosedRange<Double> = 0.0 ... 1.0
|
||||
private let chorusDepthRange: ClosedRange<Double> = 0.0005 ... 0.015
|
||||
private let switchOffValue: Double = 0.0
|
||||
private let switchOnValue: Double = 1.0
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ public struct PedalView: View {
|
||||
private var switchRow: some View {
|
||||
let switches: [PedalSwitch] = pedal.effectSwitches
|
||||
if !switches.isEmpty {
|
||||
VStack(spacing: PedalView.knobSpacing) {
|
||||
HStack(spacing: PedalView.knobSpacing) {
|
||||
ForEach(Array(switches.enumerated()), id: \.offset) { pair in
|
||||
PedalSwitchView(pair.element)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user