# Bitcrusher

amp: | 1 | mix: | 1 | pre_amp: | 1 | sample_rate: | 10000
bits: | 8 | cutoff: | 0

``

    with_fx :bitcrusher do
      play 50
    end

Creates lo-fi output by decimating and deconstructing the incoming audio by lowering both the sample rate and bit depth. The default sample rate for CD audio is 44100, so use values less than that for that crunchy chip-tune sound full of artefacts and bitty distortion. Similarly, the default bit depth for CD audio is 16, so use values less than that for lo-fi sound.

Introduced in v2.3

## Options

amp: | The amplitude of the sound. Typically a value between 0 and 1. Higher amplitudes may be used, but won’t make the sound louder, they will just reduce the quality of all the sounds currently being played (due to compression.) Default: 1 Must be zero or greater May be changed whilst playing Has slide options to shape changes
mix: | The amount (percentage) of FX present in the resulting sound represented as a value between 0 and 1. For example, a mix of 0 means that only the original sound is heard, a mix of 1 means that only the FX is heard (typically the default) and a mix of 0.5 means that half the original and half of the FX is heard. Default: 1 Must be a value between 0 and 1 inclusively May be changed whilst playing Has slide options to shape changes
pre_amp: | Amplification applied to the input signal immediately before it is passed to the FX. Default: 1 Must be zero or greater May be changed whilst playing Has slide options to shape changes
sample_rate: | The sample rate the audio will be resampled at. This represents the number of times per second the audio is sampled. The higher the sample rate, the closer to the original the sound will be, the lower the more low-fi it will sound. The highest sample rate is 44100 (full quality) and the lowest is ~100 (extremely low quality). Try values in between such as 1000, 3000, 8000… Default: 10000 Must be greater than zero May be changed whilst playing Has slide options to shape changes
bits: | The bit depth of the resampled audio. Lower bit depths make the audio sound grainy and less defined. The highest bit depth is 16 (full quality) and the lowest is 1 (lowest quality). Default: 8 Must be greater than zero May be changed whilst playing Has slide options to shape changes
cutoff: | MIDI note representing the highest frequencies allowed to be present in the sound. A low value like 30 makes the sound round and dull, a high value like 100 makes the sound buzzy and crispy. Default: 0 Must be zero or greater,must be a value less than 131 May be changed whilst playing Has slide options to shape changes

## Slide Options

Any parameter that is slidable has three additional options named _slide, _slide_curve, and _slide_shape. For example, 'amp' is slidable, so you can also set amp_slide, amp_slide_curve, and amp_slide_shape with the following effects:

_slide: | Amount of time (in beats) for the parameter value to change. A long parameter_slide value means that the parameter takes a long time to slide from the previous value to the new value. A parameter_slide of 0 means that the parameter instantly changes to the new value. Default: 0
_slide_shape: | Shape of curve. 0: step, 1: linear, 3: sine, 4: welch, 5: custom (use *_slide_curve: opt e.g. amp_slide_curve:), 6: squared, 7: cubed. Default: 5
_slide_curve: | Shape of the slide curve (only honoured if slide shape is 5). 0 means linear and positive and negative numbers curve the segment up and down respectively. Default: 0