BIGscope

bipolar audio rate signal oscilloscope (time domain), showing 128 consecutive samples after the signal becomes positive. this module has outputs to link several scopes behind each other for a big scope
Author: Remco van der Most
License: BSD
Github: sss/disp/BIGscope.axo

Inlets

frac32buffer.bipolar input

bool32 hold

frac32buffer.positive syncIn

Outlets

frac32buffer thru

frac32buffer syncOut

Displays

int8array128.vbar 1

int8array128.vbar 2

int8array128.vbar 3

int8array128.vbar 4

int8array128.vbar 5

int8array128.vbar 6

int8array128.vbar 7

int8array128.vbar 8

Declaration
int8_t t[1024];
int index;
int32_t pval;
int32_t write;
int32_t array[1024];
Init
int i;
for (i = 0; i < 1024; i++)
  t[i] = 0;
index = 0;
pval = 0;
Control Rate
int i;
int32_t val;
if (index < 0) {
  for (i = 0; i < 16; i++) {

    val = (inlet_syncIn[i] - (1 << 10)) > (1 << 19);
    if (val && (!pval)) {

      index = 0;
      break;
    }
    pval = val;
  }
  if (index == 0) {
    for (; i < 16; i++) {
      t[index++] = (uint8_t)(inlet_in[i] >> 21);
    }
  }
} else {
  for (i = 0; i < 16; i++) {
    if (index == 1024) {

      index = -1;
      break;
    }
    t[index++] = (uint8_t)(inlet_in[i] >> 21);
  }
  if ((index == -1) && (!inlet_hold)) {
    for (i = 0; i < 1024; i++)
      if (i < 128) {
        disp_1[i] = t[i];
      } else if (i < 256) {
        disp_2[i - 128] = t[i];
      } else if (i < 384) {
        disp_3[i - 256] = t[i];
      } else if (i < 512) {
        disp_4[i - 384] = t[i];
      } else if (i < 640) {
        disp_5[i - 512] = t[i];
      } else if (i < 768) {
        disp_6[i - 640] = t[i];
      } else if (i < 768) {
        disp_7[i - 768] = t[i];
      } else {
        disp_8[i - 896] = t[i];
      }
    pval = (inlet_syncIn[BUFSIZE - 1] - (1 << 10)) > (1 << 19);
  }
}
for (i = 0; i < 16; i++) {
  outlet_thru[i] = inlet_in[i];
}
Audio Rate
write += 1;
write = write & 127;
outlet_syncOut = array[(write)];
array[write] = (val && (!pval)) > 0 ? 1 << 27 : -1 << 27;

Privacy

© 2024 Zrna Research