bardbl

double bar for OLED
Author: Smashed Transistors
License: LGPL
Github: tiar/HW/bardbl.axo

Inlets

frac32 in1

frac32 in2

Outlets

charptr32 string

Declaration
char c[4];
Init
c[0] = 4; // double bar mode
c[3] = '\0';
Control Rate
int32_t v = inlet_in1 >> 20;
if (v >= 0)
  c[1] = (v > 127) ? 128 : (uint8_t)(v + 1); //[1 128]
else
  c[1] = (v < -127) ? 129 : (uint8_t)(256 + v); //[255 129]
v = inlet_in2 >> 20;
if (v >= 0)
  c[2] = (v > 127) ? 128 : (uint8_t)(v + 1); //[1 128]
else
  c[2] = (v < -127) ? 129 : (uint8_t)(256 + v); //[255 129]
outlet_out = c;

Privacy

© 2024 Zrna Research