oldFloat

A quantifier that simulates limited accuracy float formats as found on early digital synthesizers. Not anti aliased.
Author: Smashed Transistors
License: LGPL
Github: tiar/dist/oldFloat.axo

Inlets

frac32buffer in

Outlets

frac32buffer out

Attributes

combo resolution

Audio Rate
// __CLZ counts leading zeros
int32_t offset = 32 - __CLZ(abs(inlet_in)) - attr_resolution;
if (offset <= 0) {
  outlet_out = inlet_in;
} else {
  // erases some low bits depending of leading zeros and resolution
  outlet_out = (inlet_in >> offset) << offset;
}

Privacy

© 2024 Zrna Research