SoundpipeAudioKit icon indicating copy to clipboard operation
SoundpipeAudioKit copied to clipboard

ZitaReverb: Invalid range for equalizerFrequency2 (default exceeds maximum)

Open EssamSoft opened this issue 8 months ago • 0 comments

macOS Version(s) Used to Build

macOS 13 Ventura

Xcode Version(s)

Xcode 14

Description

macOS Version(s) Used to Build* macOS 15.4.1

Xcode Version(s)* Xcode 16.2

Description* I found a conflict in the ZitaReverb parameter definition in AudioKit. The equalizerFrequency2Def has a default value that is outside its defined range:

public static let equalizerFrequency2Def = NodeParameterDef(
    identifier: "EQ Frequency 2",
    name: "EQ Frequency 2",
    address: akGetParameterAddress("ZitaReverbParameterEqualizerFrequency2"),
    defaultValue: 1500.0,  // Default value is 1500.0 Hz
    range: 160.0 ... 1000.0,  // Range is from 160.0 to 1000.0 Hz
    unit: .hertz
)

The default value (1500.0) is higher than the maximum range value (1000.0), which creates a conflict when initializing this parameter. Based on typical mid-frequency EQ ranges in reverb systems, I believe the correct fix should be to expand the range rather than change the default value: swift range: 160.0 ... 10000.0, // Corrected range that includes the default value

Crash Logs, Screenshots or Other Attachments (if applicable)

No response

EssamSoft avatar May 17 '25 03:05 EssamSoft