frac32.positive in
charptr32 out
bool32.pulse trig
char out[9];
int8_t v;
int8_t prev;
int8_t fb;
int16_t nb;
#define BARS_ONE_L 0x03
#define BARS_ONE_R 0x04
#define BARS_TWO 0x05
#define BARS_NONE 0x06
outlet_trig = 0;
v = inlet_in >> 20;
if (v != prev) {
if (v <= 0)
v = 0;
memset(out, BARS_NONE, 8);
nb = ((v + 1) << 4) >> 7;
fb = nb >> 1;
memset(out, BARS_TWO, fb);
if (nb % 2)
out[fb] = BARS_ONE_L;
prev = v;
outlet_trig = 1;
}
outlet_out = out;