I’d like to make some led blinking.
the most efficient way : doing that in the firmware (and not with an artificial note-on note-off message from the software interface to the device via midi…)
I searched, I looked for that: http://www.midibox.o…index.php/topic,8456.msg60753.html#msg60753
1st question: can I mix asm and C naturally? I’m not sure. if yes, how I could put that in my code?
2nd question: how should I code that? I mean, should I use a particular value of a midi note on byte (velocity=xx) to make the led blinking?
my matrix coding is:
// we create a 1-dimensional array with 64 entries for led color storage for the clip matrix controller part
// each entry consists of 1 byte coded like that:
// 0x00 = OFF
// 0x10 = RED
// 0x20 = GREEN
// 0x40 = BLUE
// 0x30 = RED + GREEN = YELLOW
// 0x60= GREEN + BLUE = CYAN
// 0x50 = RED + BLUE = MAGENTA
// 0x70 = WHITE
// The meaning of the bytes can be found in the MIDI spec
// (-> http://www.harmony-central.com/MIDI/Doc/table1.html)
// (-> http://www.harmony-central.com/MIDI/Doc/table2.html)
// (-> http://www.harmony-central.com/MIDI/Doc/table3.html)
//
// structure is matrix[COLUMN + 8*ROW]=COLOR
static unsigned char matrix[64] = {
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
0x50,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10
};
it is the lookup table parsed every SRIO cycle.
I could use another matrix as a kind of masking blinking state.
if value is 0, the led is solid state
if value is 1, the led is blinking (OFF/COLOR/OFF/COLOR etc etc)
how could I do that?