play

Read from 4x8bit table (32bit)
Author: Sputnki
License: BSD
Github: sptnk/looper/play.axo

Inlets

frac32buffer.positive use looper/pos to drive this input

Outlets

frac32buffer track 1 output

frac32buffer track 2 output

frac32buffer track 3 output

frac32buffer track 4 output

Attributes

objref 32bit table in which 4 tracks are stored

Declaration
uint32_t bitmask1 = 0b11111111000000000000000000000000;
uint32_t bitmask2 = 0b00000000111111110000000000000000;
uint32_t bitmask3 = 0b00000000000000001111111100000000;
uint32_t bitmask4 = 0b00000000000000000000000011111111;
Audio Rate
uint32_t pos = __USAT(inlet_pos, 28);
if (pos > attr_table.LENGTH)
  pos = attr_table.LENGTH;

int8_t temp1 = (bitmask1 & attr_table.array[pos]) >> 24;
int8_t temp2 = (bitmask2 & attr_table.array[pos]) >> 16;
int8_t temp3 = (bitmask3 & attr_table.array[pos]) >> 8;
int8_t temp4 = (bitmask4 & attr_table.array[pos]);

outlet_o1 = ((int32_t)temp1) << 20;
outlet_o2 = ((int32_t)temp2) << 20;
outlet_o3 = ((int32_t)temp3) << 20;
outlet_o4 = ((int32_t)temp4) << 20;

Privacy

© 2024 Zrna Research