bar

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

Inlets

frac32 in

Outlets

charptr32 string

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

Privacy

© 2024 Zrna Research