After checking the documentation and analyzing you use case, simple parametric PSS is not going to help till is it too specific for your (current) use case. Not nice.
Please correct me in case I am wrong, but you try to highlight 2 strip pad based on fader value. You have 2 pads, 2+2bits=16 colors per pad ^2=256 color combinations. The mapping is not linear, since bitwise it will Red->Green->Amber->Green->Amber. And Green->Amber->Red sounds more logical for me. But at some point you (or someone else) would like to change the scale or use different scales for different cases.
Also it is better to send both colors in one SysEx to save time (there is some indication that can be slow, they mention up to 0.1sec to update all LEDs and I have the feeling that is not maximum).
So, I think about extending SysEx action to allow build it in peaces. That way the list of actions is going to be:
- 2 State Sets: "_LowerColor" and "_UpperColor", with 128 states each which text correspond to the proper color value in hex for particular input value (can be up to 256 states but also lower then 128, so can be any number of states from 2 up to 256).
- 1 State Set "_StripIndex" with 8 states, text is the hex value for Index of lower set of pads
- In the Fader Value Monitor, we just do:
- Set State _StripIndex to <whatever is correct for the strip state>
- Call _UpdateStripColor
- _UpdateStripColor (only one for all strips, can also be used later for "smooth" indication mentioned in my previous post) is going to be:
- Set State _LowerColor <from value>
- Set State _UpperColor <from value>
- SysEx BEGIN (F0) 00 20 29 02 11 78 and either hardcoded Template or some State Set
- SysEx APPEND _StripIndex name +0
- SysEx APPEND _LowerColor name +0
- SysEx APPEND _StripIndex name +<fixed number difference between lower and upper pad ids>
- SysEx APPEND _UpperColor name +0
- SysEx END (F7)
Not controller specific, not current wishes specific, support arbitrary number of colors and arbitrary color values, reasonable in size for all that wishes and opens a way for similar operations. Looks cool for me
Unfortunately, we have long holidays there and I will dedicate my time to the family. So that is not going to work next days, sorry.
My background is actually Computer Information Systems and Management of Information Systems, so it's really fun trying to understand the thought process involved in this kind of programming.
I have caught the end of time when System Programmers was looking at userland coders like the god on worms. First could find broken memory module from the system dump in hex, second was happy when "print 2+2" was working. Good old times...
But now everyone is a "programmer", at least in HTML.
Behind AZ Controller are around 30000 lines of C code. I have tried to explain how that works as far as I could, but complete explanation will take at least another 30k lines. In big blocks, it has MIDI parsing engine, custom "language" interpreter and GUI part which is more or less IDE for that language. The ideas have roots in many systems/languages/interpreters I have worked with. The primary inspiration and basic concept of self-contained programming system is for sure
FORTH. For me, more usual concepts like Lisp (CAL in SONAR) do not have that simplicity, flexibility and power. It was clear for me that anything above my
Programming for Musicians is not going to work at all. Most user heads are exploded even by that. And such things like reverse Polish notation and stacks can "reboot" some "programmers". Still I could not avoid some complicated concepts like state specific object execution (compilation, interpretation and immediate) have "leaked" into AZ Controller (Actions have Logic, Monitoring and Feedback execution methods). But I have tried to wrap them into "natural" effects. Originally I have planned to avoid even "functions", but I see that in complicated configurations (like your) that is not practical. In case you have some specific questions, I can try to answer