audiblelight.augmentation.LowpassFilter#
- class audiblelight.augmentation.LowpassFilter(sample_rate=44100, cutoff_frequency_hz=None)#
Bases:
EventAugmentationApplies a low-pass filter to the audio.
By default, the cutoff frequency for the filter will be sampled randomly between 5512 and 22050 Hz. Either the exact cutoff frequency or a distribution to sample this from can be provided as arguments to the function.
- Parameters:
sample_rate (custom_types.Numeric) – the sample rate for the effect to use.
cutoff_frequency_hz (Union[custom_types.Numeric, custom_custom_types.DistributionLike]) – the cutoff frequency for the filter, or a distribution-like object to sample this from. Will default to sampling from uniform distribution between 5512 and 22050 Hz if not provided.
- __init__(sample_rate=44100, cutoff_frequency_hz=None)#
- Parameters:
sample_rate (int | float | complex | integer | floating | None)
cutoff_frequency_hz (int | float | complex | integer | floating | DistributionLike | None)
Methods
__init__([sample_rate, cutoff_frequency_hz])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
- MAX_FREQ = 22050#
- MIN_FREQ = 5512#