scroll v 8

a mod of tiar/HW/strbar for an OLED-display, change 'offset' to scroll through a lot of lines vertically.
Author: Robert Schirmer
License: BSD
Github: rbrt/string/scroll v 8.axo

Inlets

int32.positive offset

frac32 v0

frac32 v1

frac32 v2

frac32 v3

frac32 v4

frac32 v5

frac32 v6

frac32 v7

Outlets

charptr32 line1

charptr32 line2

charptr32 line3

charptr32 line4

Attributes

table str0

table str1

table str2

table str3

table str4

table str5

table str6

table str7

Declaration
char c[8][8];
char null[1];

void outstring(uint8_t target, int value) __attribute__((noinline)) {
  int32_t v = __SSAT(value, 28) >> 21;
  if (v >= 0)
    c[target][1] = (uint8_t)(v + 1);
  else
    c[target][1] = (uint8_t)(256 + v);
}
Init
strcpy(&c[0][2], "attr_str0");
strcpy(&c[1][2], "attr_str1");
strcpy(&c[2][2], "attr_str2");
strcpy(&c[3][2], "attr_str3");
strcpy(&c[4][2], "attr_str4");
strcpy(&c[5][2], "attr_str5");
strcpy(&c[6][2], "attr_str6");
strcpy(&c[7][2], "attr_str7");

c[0][0] = 1;
c[1][0] = 1;
c[2][0] = 1;
c[3][0] = 1;
c[4][0] = 1;
c[5][0] = 1;
c[6][0] = 1;
c[7][0] = 1;
Control Rate
outstring(0, inlet_v0);
outstring(1, inlet_v1);
outstring(2, inlet_v2);
outstring(3, inlet_v3);
outstring(4, inlet_v4);
outstring(5, inlet_v5);
outstring(6, inlet_v6);
outstring(7, inlet_v7);

outlet_line1 = ((0 + inlet_offset) < 8) ? &c[0 + inlet_offset][0] : &null[0];
outlet_line2 = ((1 + inlet_offset) < 8) ? &c[1 + inlet_offset][0] : &null[0];
outlet_line3 = ((2 + inlet_offset) < 8) ? &c[2 + inlet_offset][0] : &null[0];
outlet_line4 = ((3 + inlet_offset) < 8) ? &c[3 + inlet_offset][0] : &null[0];

Privacy

© 2024 Zrna Research