audiblelight.augmentation.Bitcrush

audiblelight.augmentation.Bitcrush#

class audiblelight.augmentation.Bitcrush(sample_rate=44100, bit_depth=None)#

Bases: EventAugmentation

Applies a bitcrush effect to the audio input.

Bitcrushing quantizes the “vertical” resolution of the audio input, such that every sample can only take a certain number of unique values, controlled by the bit depth.

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

  • bit_depth (int | float | complex | integer | floating | DistributionLike | None) – the bit depth to quantize the signal to; will be sampled between 8 and 32 bits if not provided.

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

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

Methods

__init__([sample_rate, bit_depth])

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_DEPTH

MIN_DEPTH

name

Returns the name of this augmentation

MAX_DEPTH = 32#
MIN_DEPTH = 8#