HighPassFilterWorklet
The audio processing worklet for the high-pass filter. Implements a second-order biquad high-pass filter with per-channel processing.
Instance Members
process(buffer: AudioFilterBuffer, samples: Int, channels: Int, sampleRate: Float, time: Float): VoidProcess audio buffer in place. Override this method to implement custom filtering. CAUTION: this may be called from a background thread
| Name | Type | Description |
|---|---|---|
buffer |
AudioFilterBuffer | The audio buffer to process (modify in place, planar layout: one channel after another, not interleaved) |
samples |
Int | Number of samples per channel |
channels |
Int | Number of audio channels (1 = mono, 2 = stereo) |
sampleRate |
Float | Sample rate in Hz |
time |
Float | Current playback time in seconds |
| Name | Type |
|---|---|
filterId |
Int |
bus |
Int |
Private Members
cutoffFrequency: FloatCutoff frequency in Hz. Frequencies below this value will be attenuated. Range: 1 Hz to half the sample rate (Nyquist frequency). Default: 1000 Hz
gain: FloatFilter gain/amplitude multiplier. Adjusts the overall output level after filtering. Range: 0.0 to any positive value (1.0 = unity gain). Default: 1.0
resonance: FloatFilter resonance/Q factor. Controls the sharpness of the filter and frequency emphasis at the cutoff.
- 0.707: No resonance (Butterworth response)
- < 0.707: Gentler rolloff
- > 0.707: Sharper rolloff with peak at cutoff Range: 0.1 to 30.0 (higher values = more resonance) Default: 0.707
a0: Floata1: Floata2: Floatb1: Floatb2: FloatlastCutoff: FloatlastQ: FloatlastSampleRate: FloatCalculates biquad filter coefficients for the high-pass response. Uses the standard audio EQ cookbook formulas for a second-order high-pass filter.
| Name | Type | Description |
|---|---|---|
cutoff |
Float | Cutoff frequency in Hz |
q |
Float | Quality factor (resonance) |
sampleRate |
Float | Sample rate in Hz |