Okay using a matrix (that is what we are talking about here? or is a vector a different kind of 2d array?), I see how to use it as a table and store the data for each channel in it, modifying the address based on channel. So from there, reading the data off to output it, I don't see a way to replace doChan() with doChan(), the way I will sortData(), but then again shortening sortData() to a single function will slim my code a bit. The biggest thing I am worried about, and why I am looking to shorten the code, is speed. I don't care if my code is ugly (just being honest!) But some songs are 200bpm! In audio mode, I figure if I can get the whole loop to run greater than 1000 times/sec, I will never miss an audio pulse. I realize a serial counter would slow down that figure, and not give me an accurate rate, but as long as no input, or ouput is missed, I'll be happy. Right now seeedstudio is throwing a fit about my boards, so this whole thing (all of my spare time this past 14 months) may be for nothing...
PS. I asked in the comments in the code, I read that while() can freeze/slow the TLC5940 library somewhere, should I read Uart with If()?
Is this what I am looking to do, and have "chan' specify the row?::
// Defining Storage and Manipulation here (addresses)
// Column row
// red green blue mode audc audb auds
// chan0 0,0 0,1 0,2 0,3 0,4 0,5 0,6
// chan1 1,0 1,1 1,2 1,3 1,4 1,5 1,6
// chan2 2,0 2,1 2,2 2,3 2,4 2,5 2,6
// chan3 3,0 3,1 3,2 3,3 3,4 3,5 3,6
// chan4 4,0 4,1 4,2 4,3 4,4 4,5 4,6
out to:
red value (0-4095)
green value (0-4095)
blue value (0-4095)
mode (0-?)
audio channel (0-1[L-R])
audio band (0-5)
audio sensitivity (0-31)