audiblelight.augmentation.Limiter#

class audiblelight.augmentation.Limiter(sample_rate=44100, threshold_db=None, release_ms=None)#

Bases: EventAugmentation

Applies limiting to the audio.

A simple limiter with a hard clipper set to 0 dB. Release and threshold dB can be controlled by the user.

Parameters:
  • sample_rate (custom_types.Numeric) – the sample rate for the effect to use.

  • threshold_db (int | float | complex | integer | floating | DistributionLike | None) – the dB threshold after which the compressor is active. Sampled between -40 and -20 dB if not given

  • release_ms (int | float | complex | integer | floating | DistributionLike | None) – the time taken for the compressor to return to 0 dB after exceeding the threshold. If not provided, will be sampled between 50 and 1100 ms (again, inspired by the UREI 1176).

__init__(sample_rate=44100, threshold_db=None, release_ms=None)#
Parameters:
  • sample_rate (int | float | complex | integer | floating | None)

  • threshold_db (int | float | complex | integer | floating | DistributionLike | None)

  • release_ms (int | float | complex | integer | floating | DistributionLike | None)

Methods

__init__([sample_rate, threshold_db, release_ms])

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_RELEASE

MAX_THRESHOLD_DB

MIN_RELEASE

MIN_THRESHOLD_DB

name

Returns the name of this augmentation

MAX_RELEASE = 1100#
MAX_THRESHOLD_DB = -20#
MIN_RELEASE = 50#
MIN_THRESHOLD_DB = -40#