audiblelight.augmentation.LowShelfFilter#

class audiblelight.augmentation.LowShelfFilter(sample_rate=44100, gain_db=None, cutoff_frequency_hz=None, q=None)#

Bases: EventAugmentation

Applies a low-shelf filter to the audio.

The low-shelf filter has a variable Q (sharpness) and gain parameter, alongside a cutoff frequency. Frequencies below 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 32 and 1024 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_TYPE

MAX_FREQ

MAX_GAIN

MAX_Q

MIN_FREQ

MIN_GAIN

MIN_Q

name

Returns the name of this augmentation

MAX_FREQ = 1024#
MAX_GAIN = 10#
MAX_Q = 1.0#
MIN_FREQ = 32#
MIN_GAIN = -20#
MIN_Q = 0.1#