sampleredux

quantize to n bits
Author: Johannes Taelman
License: BSD
Github: lokki/sampleredux.axo

Inlets

frac32buffer in

frac32.positive rate

frac32.positive mask

Outlets

frac32buffer out

Parameters

int32 rate

int32 mask

Declaration
int sample;
int counter;
int mask;
Init
counter = 0;
mask = 0;
Audio Rate
if (counter >= (param_rate + (inlet_rate >> 21) - mask)) {
  counter = -1;
  mask = mask + 1;
  sample = inlet_in;
}
if (mask >= (param_mask + (inlet_mask >> 21)))
  mask = 0;
counter = counter + 1;
outlet_out = sample;

Privacy

© 2024 Zrna Research