audiblelight.augmentation.Clipping#
- class audiblelight.augmentation.Clipping(sample_rate=44100, threshold_db=None)#
Bases:
EventAugmentationApplies hard distortion to the audio.
Clips the audio signal at the provided threshold, in decibels.
- 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 level of the distortion effect. By default, will be sampled between -10 and -1 dB.
- __init__(sample_rate=44100, threshold_db=None)#
- Parameters:
sample_rate (int | float | complex | integer | floating)
threshold_db (int | float | complex | integer | floating | DistributionLike | None)
Methods
__init__([sample_rate, threshold_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_THRESHOLD_DB = -1#
- MIN_THRESHOLD_DB = -10#