dasp Bitcrusher
Bitcrusher with bit-depth reduction, sample-and-hold rate reduction, and a dry/wet mix. Shows how to integrate a third-party DSP crate (dasp) into a truce plugin.
Source: examples/truce-example-dasp-bitcrusher/.
#What it demonstrates
- Third-party DSP crate integration: quantization routes through
dasp_sample::Sample(to_sample::<i8>()/to_sample::<i16>()) for the depths dasp ships as concrete types, with a floor-quantize fallback for the rest IntParamwithdiscrete(..)ranges and the boundary-read helpers (value_usize)- Per-channel sample-and-hold state (
held,hold_counter) reset inreset()and carried across blocks - Built-in
GridLayouteditor: threeknobwidgets addressed by the derivedParamIdenum - Driver-based passthrough test (
driver!withInputSource::Constant) plus per-OSscreenshot!baselines
#Parameters
| Name | Range | Unit |
|---|---|---|
| Bits | 2 to 16 (discrete, default 16) | bits |
| Hold | 1 to 32 (discrete, default 1) | samples |
| Mix | 0 to 1 (default 1.0) | % |