matrix colors attr

Author:
License: GPL
Github: rbrt/push/matrix colors attr.axo

Inlets

bool32.risingfalling toggle

Outlets

int32 color

Attributes

combo colorOn

combo colorOff

spinner onBrightness

spinner offBrightness

Declaration
uint8_t map[16] = {0, 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57};
uint8_t colorOn;
uint8_t colorOff;
uint8_t brightnessOn;
uint8_t brightnessOff;
Init
if (attr_colorOn) {
  if (attr_colorOn > 1)
    brightnessOn = (2 - (attr_onBrightness));
  else
    brightnessOn = attr_onBrightness;
} else
  brightnessOn = 0;

if (attr_colorOff) {
  if (attr_colorOff > 1)
    brightnessOff = (2 - (attr_offBrightness));
  else
    brightnessOff = attr_offBrightness;
} else
  brightnessOff = 0;
Control Rate
if (inlet_toggle)
  outlet_color = (map[attr_colorOn]) + brightnessOn;
else
  outlet_color = (map[attr_colorOff]) + brightnessOff;

Privacy

© 2024 Zrna Research