bool32.rising redraw
int32 row
frac32.positive v0
frac32.positive v1
frac32.positive v2
frac32.positive v3
frac32.positive v4
frac32.positive v5
frac32.positive v6
frac32.positive v7
bool32.risingfalling mute
None
objref LEDmaster
spinner row
bool trig;
bool mtrig;
int8_t fb;
int16_t nb;
uint8_t prerow;
uint8_t count;
int32_t in[8];
int32_t prev[8];
int32_t v;
int i;
bool doit;
uint8_t docount;
#define BARS_ONE_L 0x03
#define BARS_ONE_R 0x04
#define BARS_TWO 0x05
#define BARS_NONE 0x06
if (!inlet_mute) {
in[0] = inlet_v0;
in[1] = inlet_v1;
in[2] = inlet_v2;
in[3] = inlet_v3;
in[4] = inlet_v4;
in[5] = inlet_v5;
in[6] = inlet_v6;
in[7] = inlet_v7;
if (in[count] != prev[count]) {
prev[count] = in[count];
doit = 1;
docount = 0;
}
if (inlet_redraw && !trig) {
trig = 1;
doit = 1;
docount = 0;
}
if (!inlet_mute && !mtrig) {
mtrig = 1;
doit = 1;
docount = 0;
}
if (inlet_row != prerow) {
doit = 1;
prerow = inlet_row;
}
if (doit) {
if (docount < 8) {
v = in[docount];
if (v <= 0)
v = 0;
memset(attr_LEDmaster.array + attr_LEDmaster.CELLOFFSET[docount],
BARS_NONE, 8);
nb = (((v >> 20) + 1) << 4) >> 7;
fb = nb >> 1;
memset(attr_LEDmaster.array + attr_LEDmaster.CELLOFFSET[docount],
BARS_TWO, fb);
if (nb % 2)
attr_LEDmaster.array[fb + attr_LEDmaster.CELLOFFSET[docount]] =
BARS_ONE_L;
attr_LEDmaster.array[8 + attr_LEDmaster.CELLOFFSET[docount]] = 32;
docount++;
} else {
attr_LEDmaster.ROW = ((inlet_row + attr_row) + 1) % 5;
doit = 0;
docount = 0;
}
}
count++;
count = count % 8;
}
if (!inlet_redraw)
trig = 0;
if (inlet_mute)
mtrig = 0;