read_interp_smps

read from table, linear interpolated
Author: Johannes Taelman
License: BSD
Github: rbrt/testing/read_interp_smps.axo

Inlets

frac32buffer.positive index in fraction of table size

Outlets

frac32buffer table[a]

Attributes

objref wave

Audio Rate
uint32_t asat = inlet_smps << (27 - attr_wave.LENGTHPOW);
int32_t y1 = attr_wave.array[inlet_smps & attr_wave.LENGTHMASK]
             << attr_wave.GAIN;
int32_t y2 = attr_wave.array[(inlet_smps + 1) & attr_wave.LENGTHMASK]
             << attr_wave.GAIN;
int frac = (asat - (inlet_smps << (27 - attr_wave.LENGTHPOW)))
           << (attr_wave.LENGTHPOW + 3);
int32_t rr;
rr = ___SMMUL(y1, (1 << 30) - frac);
rr = ___SMMLA(y2, frac, rr);
outlet_wave = rr << 2;

Privacy

© 2024 Zrna Research