audiblelight.augmentation.HighShelfFilter#
- class audiblelight.augmentation.HighShelfFilter(sample_rate=44100, gain_db=None, cutoff_frequency_hz=None, q=None)#
Bases:
EventAugmentationApplies a high-shelf filter to the audio.
The high-shelf filter has a variable Q (sharpness) and gain parameter, alongside a cutoff frequency. Frequencies above this value will be boosted by the provided gain, given in decibels.
- Parameters:
sample_rate (custom_types.Numeric) – the sample rate for the effect to use.
cutoff_frequency_hz (int | float | complex | integer | floating | DistributionLike | None) – the cutoff frequency for the filter; will be sampled between 5512 and 22050 Hz if not given
gain_db (int | float | complex | integer | floating | DistributionLike | None) – the gain of the filter, in dB; will be sampled between -20 and 10 dB, if not given
q (int | float | complex | integer | floating | DistributionLike | None) – the Q (or sharpness) of the filter; will be sampled between 0.1 and 1.0 if not given
- __init__(sample_rate=44100, gain_db=None, cutoff_frequency_hz=None, q=None)#
- Parameters:
sample_rate (int | float | complex | integer | floating | None)
gain_db (int | float | complex | integer | floating | DistributionLike | None)
cutoff_frequency_hz (int | float | complex | integer | floating | DistributionLike | None)
q (int | float | complex | integer | floating | DistributionLike | None)
Methods
__init__([sample_rate, gain_db, ...])from_dict(input_dict)Initialise an augmentation from a dictionary.
process(input_array)Calls the underlying FX (or a list of FX)
sample_value(override, default_dist)Samples a value according to the following method:
to_dict()Returns the parameters used by this augmentation
Attributes
AUGMENTATION_TYPEnameReturns the name of this augmentation
- MAX_FREQ = 22050#
- MAX_GAIN = 10#
- MAX_Q = 1.0#
- MIN_FREQ = 5512#
- MIN_GAIN = -20#
- MIN_Q = 0.1#