wf16_display

wf_16 waveform display for use with the 16Steps series of oscillators (tiar/osc)
Author: Smashed Transistors
License: LGPL
Github: tiar/disp/wf16_display.axo

Inlets

frac32buffer.bipolar wf12 waveform

bool32 update

Outlets

None

Displays

int8array128.vbar wf16

Declaration
uint8_t v[128];
Init
for (int i = 0; i < 128; i++)
  v[i] = 0;
Control Rate
if (inlet_update) {
  const int16_t *xStartEnd = (const int16_t *)inlet_wf16;
  int cpt = 0;
  for (int i = 0; i < 16; i++) {
    int cv = xStartEnd[i * 2];
    int dv = (xStartEnd[i * 2 + 1] - xStartEnd[i * 2]) >> 3;
    for (int j = 0; j < 8; j++) {
      v[cpt] = cv >> 9;
      cv += dv;
      cpt++;
    }
  }
}

for (int i = 0; i < 128; i++)
  disp_wf16[i] = v[i];

Privacy

© 2024 Zrna Research