Bitcrusher

Last updated

A Bitcrusher is an audio effect that produces distortion by reducing the resolution or bandwidth of digital audio data. The resulting quantization noise may produce a "warmer" sound impression, or a harsh one, depending on the amount of reduction.

Contents

Methods

A typical bitcrusher uses two methods to reduce audio fidelity: sample rate reduction and resolution reduction.

Sample rate reduction

Digital audio is composed of a rapid series of numeric samples that encode the changing amplitude of an audio waveform. To accurately represent a wideband waveform of substantial duration, digital audio requires a large number of samples at a high sample rate. The higher the rate, the more accurate the waveform; a lower rate requires the source analog signal to be low-pass filtered to limit the maximum frequency component in the signal, or else high-frequency components of the signal will be aliased. Specifically, the frequency of sampling (a.k.a. the sample rate) must be at least twice the maximum frequency component in the signal; this maximum signal frequency of one-half the sampling frequency is called the Nyquist limit.

Though it is a common misconception that the sample rate affects the "smoothness" of the digitally represented waveform, this is not true; sampling theory guarantees that up to the maximum signal frequency supported by the sample rate (i.e. the Nyquist limit), the digital (discrete) signal will exactly represent the analog (continuous-wave) source, except for the distortion of quantization noise resulting from the finite precision of the individual samples. The original signal can be exactly reconstructed simply bypassing the low-pass discrete signal through an ideal low-pass filter (with a perfect vertical cutoff profile). However, as an ideal filter is impossible to build, a real filter, with a gradual transition between the passband and the stopband, must be used, with the consequence that it is impossible to accurately record all frequencies right up to the Nyquist limit for a given sample rate. The solution is to increase the sample rate by an amount that accommodates the transition bands of the filters used both for sampling and for continuous-wave reconstruction; this is why, for example, Compact Discs use a sampling rate of 44.1 kHz to record audio that seldom exceeds 20 kHz, even though the Nyquist limit for this sample rate is 22.05 kHz. Another consideration is that for perfect reconstruction, the samples should be rendered as ideal impulses of infinitesimal duration, but all real hardware generates rectangular pulses for the samples; some lower-quality digital-to-analog conversion devices use step-wave conversion, which essentially outputs the samples as rectangular pulses that have a duration equal to the sampling period. In this case, too, an increase in the sample rate can reduce and compensate for the resultant distortion. Even so, it cannot be overemphasized that, regardless of its motivation, an extra margin added to the sampling frequency does not make the reconstructed waveform smoother, it merely prevents aliasing of the frequencies in the transition band to lower frequencies, which would distort the signal nonlinearly.

DAWs today typically use 44.1 kHz or higher sample rates. Early digital gear used much lower sample rates to conserve memory for stored audio. A Speak & Spell from 1979, for instance, used an 8 kHz sample rate.

Sample rate reduction (also called down-sampling) intentionally reduces the sample rate to degrade the quality of the audio. As the sample rate is reduced, high frequencies are aliased or, if the digital signal is first low-pass filtered, they are lost. If a primitive step-wave DAC is used, or if the DAC filter cutoff frequency is not adjustable to track with the sample rate, but instead is fixed at half the Nyquist frequency for the maximum supported sample rate, then waveforms also become more "coarse" sounding. At extreme reductions, the waveform becomes metallic sounding as a result of severe aliasing and perhaps nonlinear distortion from poorly tuned digital-to-analog conversion. (Note that all of these effects are avoidable if the signal is low-pass filtered before being downsampled and if the DAC parameters for playback are proper to the reduced sample rate; then the waveform just sounds band-limited like a telephone, an AM radio with clear reception, or a magnetic tape recorder at a slow tape speed.)

Resolution reduction

Samples in digital audio are recorded as integers or floating-point numbers stored in digital memory. Those numbers are encoded using a series of on and off memory bits. The larger the number of bits, the more accurately a sample encodes the instantaneous volume level of a sampled audio waveform. DAWs today typically use 32-bit floating-point numbers, because they are more suitable for successive layered processing and mixing, but the final master output usually consists of 16-bit or 24-bit integer samples. Early digital audio gear and video games used 8-bit integer samples or less. Roland's classic TR-909 drum machine used 6-bit integer samples. The number of bits used in each sample directly affects the signal-to-noise ratio and dynamic range of the digital signal, specifically by determining the amplitude of a kind of noise called quantization noise that is similar to low-pass-filtered white noise.

Resolution reduction intentionally reduces the number of bits used for audio samples. As the bit depth goes down, waveforms become more noisy and subtle volume variations are lost, reducing dynamic range at the low end. At extreme bit reduction, waveforms are reduced to clicks and buzzes (square waves) as a waveform jumps abruptly from low to high and back again without intervening values, with many lower peaks flattened out to zero amplitude.

Principal controls

Bitcrusher effects usually have at least two controls: One reduces the sample rate, while the other reduces the resolution.

The knob or slider for resolution reduction (a.k.a. "bit depth", "depth", or "bits") usually adjusts from 32 bits down to 1 bit.

LossyWAV software by David Robinson and Nick Currie calculates the minimum bit depth to represent each segment of a PCM waveform without audible distortion. Though it is intended as a preprocessor for reducing bit rates in audio compression, pushing the quality setting lower produces bitcrush distortion. [1]

The control for sample rate reduction (a.k.a. "downsampling" or "averaging") is sometimes shown in Hz for a new sample rate, or as a reduction factor. Sample rate reduction is sometimes shown instead as the number of consecutive samples to average together to create a new sample. A value of 20 reduces the sample rate to 1/20 of its original rate.

Examples

Related Research Articles

<span class="mw-page-title-main">Analog-to-digital converter</span> System that converts an analog signal into a digital signal

In electronics, an analog-to-digital converter is a system that converts an analog signal, such as a sound picked up by a microphone or light entering a digital camera, into a digital signal. An ADC may also provide an isolated measurement such as an electronic device that converts an analog input voltage or current to a digital number representing the magnitude of the voltage or current. Typically the digital output is a two's complement binary number that is proportional to the input, but there are other possibilities.

<span class="mw-page-title-main">Delta modulation</span> Signal conversion technique

Delta modulation is an analog-to-digital and digital-to-analog signal conversion technique used for transmission of voice information where quality is not of primary importance. DM is the simplest form of differential pulse-code modulation (DPCM) where the difference between successive samples is encoded into n-bit data streams. In delta modulation, the transmitted data are reduced to a 1-bit data stream representing either up (↗) or down (↘). Its main features are:

<span class="mw-page-title-main">Digital audio</span> Technology that records, stores, and reproduces sound

Digital audio is a representation of sound recorded in, or converted into, digital form. In digital audio, the sound wave of the audio signal is typically encoded as numerical samples in a continuous sequence. For example, in CD audio, samples are taken 44,100 times per second, each with 16-bit resolution. Digital audio is also the name for the entire technology of sound recording and reproduction using audio signals that have been encoded in digital form. Following significant advances in digital audio technology during the 1970s and 1980s, it gradually replaced analog audio technology in many areas of audio engineering, record production and telecommunications in the 1990s and 2000s.

<span class="mw-page-title-main">Digital-to-analog converter</span> Device that converts a digital signal into an analog signal

In electronics, a digital-to-analog converter is a system that converts a digital signal into an analog signal. An analog-to-digital converter (ADC) performs the reverse function.

<span class="mw-page-title-main">Aliasing</span> Signal processing effect

In signal processing and related disciplines, aliasing is the overlapping of frequency components resulting from a sample rate below the Nyquist rate. This overlap results in distortion or artifacts when the signal is reconstructed from samples which causes the reconstructed signal to differ from the original continuous signal. Aliasing that occurs in signals sampled in time, for instance in digital audio or the stroboscopic effect, is referred to as temporal aliasing. Aliasing in spatially sampled signals is referred to as spatial aliasing.

Sound can be recorded and stored and played using either digital or analog techniques. Both techniques introduce errors and distortions in the sound, and these methods can be systematically compared. Musicians and listeners have argued over the superiority of digital versus analog sound recordings. Arguments for analog systems include the absence of fundamental error mechanisms which are present in digital audio systems, including aliasing and associated anti-aliasing filter implementation, jitter and quantization noise. Advocates of digital point to the high levels of performance possible with digital audio, including excellent linearity in the audible band and low levels of noise and distortion.

<span class="mw-page-title-main">Sampling (signal processing)</span> Measurement of a signal at discrete time intervals

In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples". A sample is a value of the signal at a point in time and/or space; this definition differs from the term's usage in statistics, which refers to a set of such values.

A numerically controlled oscillator (NCO) is a digital signal generator which creates a synchronous, discrete-time, discrete-valued representation of a waveform, usually sinusoidal. NCOs are often used in conjunction with a digital-to-analog converter (DAC) at the output to create a direct digital synthesizer (DDS).

<span class="mw-page-title-main">Sound quality</span> Assessment of the audio output from an electronic device

Sound quality is typically an assessment of the accuracy, fidelity, or intelligibility of audio output from an electronic device. Quality can be measured objectively, such as when tools are used to gauge the accuracy with which the device reproduces an original sound; or it can be measured subjectively, such as when human listeners respond to the sound or gauge its perceived similarity to another sound.

<span class="mw-page-title-main">Audio system measurements</span> Means of quantifying system performance

Audio system measurements are used to quantify audio system performance. These measurements are made for several purposes. Designers take measurements to specify the performance of a piece of equipment. Maintenance engineers make them to ensure equipment is still working to specification, or to ensure that the cumulative defects of an audio path are within limits considered acceptable. Audio system measurements often accommodate psychoacoustic principles to measure the system in a way that relates to human hearing.

<span class="mw-page-title-main">Digital recording</span> Audio or video represented as a stream of discrete numbers

In digital recording, an audio or video signal is converted into a stream of discrete numbers representing the changes over time in air pressure for audio, or chroma and luminance values for video. This number stream is saved to a storage device. To play back a digital recording, the numbers are retrieved and converted back into their original analog audio or video forms so that they can be heard or seen.

Noise shaping is a technique typically used in digital audio, image, and video processing, usually in combination with dithering, as part of the process of quantization or bit-depth reduction of a signal. Its purpose is to increase the apparent signal-to-noise ratio of the resultant signal. It does this by altering the spectral shape of the error that is introduced by dithering and quantization; such that the noise power is at a lower level in frequency bands at which noise is considered to be less desirable and at a correspondingly higher level in bands where it is considered to be more desirable. A popular noise shaping algorithm used in image processing is known as ‘Floyd Steinberg dithering’; and many noise shaping algorithms used in audio processing are based on an ‘Absolute threshold of hearing’ model.

An anti-aliasing filter (AAF) is a filter used before a signal sampler to restrict the bandwidth of a signal to satisfy the Nyquist–Shannon sampling theorem over the band of interest. Since the theorem states that unambiguous reconstruction of the signal from its samples is possible when the power of frequencies above the Nyquist frequency is zero, a brick wall filter is an idealized but impractical AAF. A practical AAF makes a trade off between reduced bandwidth and increased aliasing. A practical anti-aliasing filter will typically permit some aliasing to occur or attenuate or otherwise distort some in-band frequencies close to the Nyquist limit. For this reason, many practical systems sample higher than would be theoretically required by a perfect AAF in order to ensure that all frequencies of interest can be reconstructed, a practice called oversampling.

In signal processing, oversampling is the process of sampling a signal at a sampling frequency significantly higher than the Nyquist rate. Theoretically, a bandwidth-limited signal can be perfectly reconstructed if sampled at the Nyquist rate or above it. The Nyquist rate is defined as twice the bandwidth of the signal. Oversampling is capable of improving resolution and signal-to-noise ratio, and can be helpful in avoiding aliasing and phase distortion by relaxing anti-aliasing filter performance requirements.

<span class="mw-page-title-main">Delta-sigma modulation</span> Method for converting signals between digital and analog

Delta-sigma modulation is an oversampling method for encoding signals into low bit depth digital signals at a very high sample-frequency as part of the process of delta-sigma analog-to-digital converters (ADCs) and digital-to-analog converters (DACs). Delta-sigma modulation achieves high quality by utilizing a negative feedback loop during quantization to the lower bit depth that continuously corrects quantization errors and moves quantization noise to higher frequencies well above the original signal's bandwidth. Subsequent low-pass filtering for demodulation easily removes this high frequency noise and time averages to achieve high accuracy in amplitude which can be ultimately encoded as pulse-code modulation (PCM).

In a mixed-signal system, a reconstruction filter, sometimes called an anti-imaging filter, is used to construct a smooth analog signal from a digital input, as in the case of a digital to analog converter (DAC) or other sampled data output device.

<span class="mw-page-title-main">Audio bit depth</span> Number of bits of information recorded for each digital audio sample

In digital audio using pulse-code modulation (PCM), bit depth is the number of bits of information in each sample, and it directly corresponds to the resolution of each sample. Examples of bit depth include Compact Disc Digital Audio, which uses 16 bits per sample, and DVD-Audio and Blu-ray Disc, which can support up to 24 bits per sample.

Pulse-code modulation (PCM) is a method used to digitally represent analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM stream, the amplitude of the analog signal is sampled at uniform intervals, and each sample is quantized to the nearest value within a range of digital steps. Alec Reeves, Claude Shannon, Barney Oliver and John R. Pierce are credited with its invention.

In digital audio, 44,100 Hz is a common sampling frequency. Analog audio is often recorded by sampling it 44,100 times per second, and then these samples are used to reconstruct the audio signal when playing it back.

References

  1. lossyWAV Accessed 2018-12-08.