sh 16 _inter

cheapo waveshaper.based on 'table/read/interp'. works as wavetable-oscillator as well.
Author: Robert Schirmer
License: BSD
Github: rbrt/testing/sh 16 _inter.axo

Inlets

frac32buffer.bipolar in

Outlets

frac32buffer.bipolar out

Parameters

frac32.s.mapvsl b0

frac32.s.mapvsl b1

frac32.s.mapvsl b2

frac32.s.mapvsl b3

frac32.s.mapvsl b4

frac32.s.mapvsl b5

frac32.s.mapvsl b6

frac32.s.mapvsl b7

frac32.s.mapvsl b8

frac32.s.mapvsl b9

frac32.s.mapvsl b10

frac32.s.mapvsl b11

frac32.s.mapvsl b12

frac32.s.mapvsl b13

frac32.s.mapvsl b14

frac32.s.mapvsl b15

Declaration
int32_t array[16];

int steps;
int inc;

int i;
int ii;
int iii;

int b;
int a;
Control Rate
array[0] = param_b0;
array[1] = param_b1;
array[2] = param_b2;
array[3] = param_b3;
array[4] = param_b4;
array[5] = param_b5;
array[6] = param_b6;
array[7] = param_b7;
array[8] = param_b8;
array[9] = param_b9;
array[10] = param_b10;
array[11] = param_b11;
array[12] = param_b12;
array[13] = param_b13;
array[14] = param_b14;
array[15] = param_b15;
Audio Rate
uint32_t asat =
    __USAT((___SMMUL((62914560), (inlet_in >> 1) + (1 << 26)) << 6), 27);
int index = asat >> 23;
int32_t y1 = array[index];
int32_t y2 = array[(index + 1) & 15];
int frac = (asat - (index << 23)) << 7;
int32_t rr;
rr = ___SMMUL(y1, (1 << 30) - frac);
rr = ___SMMLA(y2, frac, rr);
outlet_out = rr << 2;

Privacy

© 2024 Zrna Research