Distortion & Bit-Crusher Suite — User Guide
Two deliberately different nonlinear processors in one Praat tool: amplitude quantization for stepped digital degradation, and sign-driven synthesis for gated, modulated harsh textures.
What this does
Distortion & Bit-Crusher Suite contains two separate processing modes. Bit Crusher applies a static sample-by-sample amplitude quantizer. Harsh Distortion discards the source amplitude and keeps only each sample's sign, then multiplies that sign texture by a sinusoidal amplitude modulator and a periodic gate.
The script requires exactly one Sound, creates a processed copy, preserves the Sound's channel count and duration, optionally draws a diagnostic page, optionally plays the result, and leaves the processed Sound selected.
Quick start
- Select exactly one Sound in Praat.
- Run
Distortion_Bit-Crusher.praat. - Choose one of the eight named presets or Custom.
- For Custom, choose Bit Crusher or Harsh Distortion and edit only the parameters relevant to that mode.
- Choose an Output_level. The default is Normalize to target with
Target_peak = 0.95. - Click OK. The output is named with
_crushed_or_harsh_plus the preset name.
Zero_handling, Phase_origin, Output_level, Target_peak, visualization, or playback choices.Bit Crusher
Bit Crusher mode is a memoryless amplitude mapping: every sample is quantized independently and every input channel is processed with the same transfer rule.
Quantizer 1 — Steps per unit (legacy)
This parameter is not a literal number of levels. For example, q=4 produces a step of 0.25 and therefore nine states over −1..+1: −1, −0.75, −0.5, −0.25, 0, 0.25, 0.5, 0.75, 1. Samples outside full scale are not clamped, so the mapping can continue beyond ±1.
Quantizer 2 — True N levels
This mode first clamps the input to −1..+1 and then maps that interval onto exactly N discrete output values. It therefore behaves like an explicit N-level quantizer rather than the legacy step-size mapping.
Quantization_steps should not be read as a PCM bit-depth control.Bit Crusher presets
| Preset | Quantizer | Step | States over −1..+1 |
|---|---|---|---|
| Bit Crush: Default (step 1/4) | Steps per unit | 0.25 | 9 |
| Bit Crush: Mild (step 1/8) | Steps per unit | 0.125 | 17 |
| Bit Crush: Lo-Fi (step 1/3) | Steps per unit | 0.333… | 7 |
| Bit Crush: Extreme (step 1/2) | Steps per unit | 0.5 | 5 |
Harsh Distortion
Harsh Distortion is not clipping in the usual sense. It replaces the source amplitude with a synthesized texture. The source contributes only its sample sign — positive, negative, and optionally zero — while the output magnitude is generated by the AM and gate stages.
Sample-sign extraction
The script does not run a separate zero-crossing detector. It evaluates the sign of each sample. The resulting polarity sequence is square-wave-like and retains the timing of sign changes while discarding the original amplitude contour.
| Zero_handling | Sample x = 0 | Consequence |
|---|---|---|
| Treat zero as negative | −1 | Legacy/default behavior. Digital silence can generate a negative-polarity synthesized texture while the gate is open. |
| Preserve silence | 0 | Exact zero samples remain zero. |
| Treat zero as positive | +1 | Zero samples generate the positive branch of the synthesized texture. |
Amplitude modulation
Base_amplitude and Mod_amplitude may both be zero in Custom mode. Negative values are rejected. When Mod_amplitude = 0, the sinusoidal modulation disappears and the sign texture is multiplied by a constant base level. If Mod_amplitude > Base_amplitude, the envelope crosses below zero and introduces additional polarity inversions from the modulator; the script allows this but reports a note.
Gate and phase origin
Gate_duty_cycle_s is the open duration within each gate period. A duty of 0 produces a fully closed gate. If duty exceeds the period, the script clamps it to the period and reports the correction.
With the default Start of this Sound phase origin, both AM and gate use time relative to the Sound's own start, so processing begins at modulation phase zero even when the Sound's time domain does not start at 0 s. Absolute time axis instead uses Praat's absolute time coordinates.
Harsh presets
| Preset | Base | Mod | Frequency | Gate period | Open |
|---|---|---|---|---|---|
| Harsh: Balanced | 0.50 | 0.30 | 100 Hz | 50 ms | 25 ms |
| Harsh: Light Drive | 0.40 | 0.20 | 80 Hz | 70 ms | 35 ms |
| Harsh: Industrial | 0.70 | 0.40 | 150 Hz | 30 ms | 15 ms |
| Harsh: Stutter Gate | 0.60 | 0.25 | 90 Hz | 20 ms | 10 ms |
Parameters & presets
| Parameter | Default | Used by | Meaning |
|---|---|---|---|
| Preset | Custom | Both | Custom plus eight named presets. |
| Effect_type | Bit Crusher | Custom | Selects the active processing engine. Named presets set this automatically. |
| Quantization_steps | 4 | Bit Crusher | Integer q for the legacy step quantizer, or N for True N levels. |
| Quantizer | Steps per unit | Bit Crusher | Legacy step-size mapping or exact N-level mapping. |
| Base_amplitude | 0.5 | Harsh | Constant component of the synthesized AM envelope; 0 is allowed. |
| Mod_amplitude | 0.3 | Harsh | Sinusoidal AM depth; 0 disables modulation. |
| Mod_frequency_Hz | 100 | Harsh | AM oscillator frequency in Hz. |
| Gate_period_s | 0.05 | Harsh | Duration of one gate cycle. |
| Gate_duty_cycle_s | 0.025 | Harsh | Open duration per cycle; clamped to the period if necessary. |
| Zero_handling | Treat zero as negative | Harsh | Defines the sign assigned to an exact zero sample. |
| Phase_origin | Start of this Sound | Harsh | Chooses relative or absolute phase reference for AM and gate. |
| Output_level | Normalize to target | Both | Preserve, attenuate only when necessary, or normalize. |
| Target_peak | 0.95 | Scaling modes | Peak target for attenuation/normalization; must not exceed 1.0 when used. |
| Draw_visualization | Yes | Both | Draw the diagnostic Picture page. |
| Play_result | Yes | Both | Play the processed Sound after rendering. |
Target_peak is checked only when an output-scaling mode actually uses it.Output level, channels, and naming
Output level
| Mode | Behavior |
|---|---|
| Preserve | No peak scaling. If the peak exceeds 1.0, the Info window warns that playback/export may clip. |
| Attenuate to target only if peak > target | Performs one global peak scaling operation only when the current peak exceeds Target_peak. This is attenuation, not a dynamic limiter. |
| Normalize to target | Scales any non-silent result so its absolute peak equals Target_peak. A fully silent result is left silent and normalization is skipped. |
Normalization can change the absolute meaning of Harsh mode's Base/Mod amplitudes because the whole rendered file is rescaled afterward. Preserve mode is the clearest choice when those absolute amplitudes should determine output level directly.
Channels
The effect is applied independently to every channel of the selected Sound. Mono remains mono; stereo remains stereo; multichannel input keeps all channels. In Harsh mode, all channels share the same AM oscillator and gate timing, while each channel contributes its own sample-sign sequence.
Object naming
Bit Crusher creates <source>_crushed_<preset>. Harsh Distortion creates <source>_harsh_<preset>. The source object is not deleted.
Visualization
The Picture page follows the AudioTools 8-inch layout and changes its main diagnostic according to the active mode.
Quantization staircase over input −1..+1. It mirrors the selected quantizer and includes the actual peak scaling applied to this render.
Component diagram: INPUT → SIGN → AM → GATE → OUTPUT. The SIGN box shows the selected zero-sample rule.
Mode-specific values: quantizer/state count for Bit Crusher, or Base/Mod/Frequency/Gate for Harsh.
Original in gray and processed output in the mode color, starting at the Sound's actual xmin rather than assuming 0 s.
Mono is shown directly. For multichannel output the display draws only channels 1 and 2; all channels remain present in the Sound.
Preset, mode parameters, output-level result, duration, and final peak.
Notes & limitations
- No sample-rate reduction: Bit Crusher changes amplitude resolution only.
- No oversampling: both quantization and the discontinuous sign/gate operations can generate high-frequency content that aliases at the Sound's existing sampling rate.
- Harsh mode intentionally discards amplitude information: it should not be understood as conventional clipping or saturation.
- Zero handling matters on digital silence: the default legacy rule turns exact zero samples into the negative sign state; choose Preserve silence when pauses must remain silent.
- Bipolar AM is possible: Custom
Mod_amplitude > Base_amplitudemakes the modulation envelope cross zero, adding sign inversions unrelated to the source. - Gate timing is in seconds, not tempo units: BPM synchronization must be calculated externally.
- Visualization is selective for multichannel files: processing preserves every channel, while waveform panels show at most the first two.
Applications
Bit Crusher is suited to stepped digital degradation, lo-fi percussion, coarse amplitude textures, and controlled reduction of amplitude resolution. Harsh Distortion is suited to industrial/noise textures, rhythmic sign-based resynthesis, stutter patterns, and intentionally severe transformation of source material.