audiblelight.augmentation.HighpassFilter#

class audiblelight.augmentation.HighpassFilter(sample_rate=44100, cutoff_frequency_hz=None)#

Bases: EventAugmentation

Applies a high-pass filter to the audio.

By default, the cutoff frequency for the filter will be sampled randomly between 32 and 1024 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 32 and 1024 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

AUGMENTATION_TYPE

MAX_FREQ

MIN_FREQ

name

Returns the name of this augmentation

MAX_FREQ = 1024#
MIN_FREQ = 32#