pitchshifter

a pitch shift effect, based on the clouds dsp code open sourced by mutable instruments. any bugs/issues you find are our own, report on the axoloti forum. Thanks to Olivier Gillet from Mutable Instruments for open sourcing their code. http://mutable-instruments.com
Author:
License: GPL
Github: fx/clds/pitchshifter.axo

Inlets

frac32buffer l

frac32buffer r

Outlets

frac32buffer l

frac32buffer r

Parameters

frac32.u.map ratio

frac32.u.map size

Declaration
clouds_deriv::PitchShifter fx;
Init
uint16_t *buf = (uint16_t *)sdram_malloc(32768);
if (!buf)
  return;
fx.Init(buf);
Control Rate
static clouds_deriv::FloatFrame iobuf[BUFSIZE];
fx.set_ratio(q27_to_float(param_ratio));
fx.set_size(q27_to_float(param_size));
int i;
for (i = 0; i < BUFSIZE; i++) {
  iobuf[i].l = q27_to_float(inlet_l[i]);
  iobuf[i].r = q27_to_float(inlet_r[i]);
}

fx.Process(iobuf, BUFSIZE);

for (i = 0; i < BUFSIZE; i++) {
  outlet_l[i] = float_to_q27(iobuf[i].l);
  outlet_r[i] = float_to_q27(iobuf[i].r);
}

Privacy

© 2024 Zrna Research