SrateReduce

description
Author:
License: GPL
Github: sss/dist/SrateReduce.axo

Inlets

frac32buffer in

frac32 rate

Outlets

frac32buffer out

Declaration
int32_t pulse;
int32_t mem;
int32_t divi;
int32_t trig;
Control Rate
// trigger
divi = ___SMMUL(inlet_rate << 3, inlet_rate << 2);
divi = ___SMMUL(divi << 1, divi);
divi = ___SMMUL(divi, divi);
Audio Rate
if (pulse > divi && !trig) {
  pulse = 0;
  trig = 1;
  mem = inlet_in;
} else {
  pulse += 1;
  trig = 0;
}
outlet_out = mem;
if (inlet_rate == 0)
  outlet_out = inlet_in;

Privacy

© 2024 Zrna Research