Skip to content

LowShelfFilter

Added in v0.21.0

A low shelf filter is a filter that either boosts (increases amplitude) or cuts (decreases amplitude) frequencies below a certain center frequency. This transform applies a low-shelf filter at a specific center frequency in hertz. The gain at DC frequency is controlled by {min,max}_gain_db (note: can be positive or negative!). Filter coefficients are taken from the W3 Audio EQ Cookbook

LowShelfFilter API

min_center_freq: float • unit: hertz
Default: 50.0. The minimum center frequency of the shelving filter
max_center_freq: float • unit: hertz
Default: 4000.0. The maximum center frequency of the shelving filter
min_gain_db: float • unit: Decibel
Default: -18.0. The minimum gain at DC (0 Hz)
max_gain_db: float • unit: Decibel
Default: 18.0. The maximum gain at DC (0 Hz)
min_q: float • range: (0.0, 1.0]
Default: 0.1. The minimum quality factor Q. The higher the Q, the steeper the transition band will be.
max_q: float • range: (0.0, 1.0]
Default: 0.999. The maximum quality factor Q. The higher the Q, the steeper the transition band will be.
p: float • range: [0.0, 1.0]
Default: 0.5. The probability of applying this transform.

Source code

audiomentations/augmentations/low_shelf_filter.py