You are right in all assumptions! It is just my inability to explain thing well.
So, the configuration for Pad1, in the Actions list:
- - (Strip) WAI Track Mute
- - (Value) Toggle, timeout touch
- - (Monitor) Parameter Value Monitor (Ultra speed)
In the Feedback (for Pad1, it will be called "Pad1 : : Parameter Value Monitor"):
- 'Value: 0' - SysEx (send green to pad 1)
- 'Value: 127' - SysEx (send yellow to pad 2)
For Pad2-Pad4, it is different in "WAI Track +1...+3 Mute" and corresponding SysEx. I have just tested it with my MPK-Mini and it works as expected.
And a bit of "theory" now. We want that the control is toggling mute and its color is changed taking current Mute value from SONAR. These are 2 independent wishes since we can change Mute or WAI in Sonar. So, we first select "the parameter", Mute from some WAI dependent track. Here can be some state dependent logic, for example strip type, shift and so on processing. We use selected parameter (Mute from particular track) 2 ways: "Value" Action will work when we really engage the control and Monitor will periodically (Ultra means 13 times per second) check that the value is still the same. Once the parameter or its value is changed (by parameter I mean you change WAI and so the strip), the Feedback section will change the color.
In SONAR API, all parameter have values between 0 and 1. "Pad center" for example has value 0.5. Binary parameter like Mute have either 0 or 1 exactly. I map the range to MIDI standard range 0...127 inside system "Value" State Set. That is why you see "Value:0"/"Value:127" conditions in the feedback section.
Caution. On my MPK-mini, in case I press the pad it is highlighted and when I depress it, LED is switched off. So I had to prepend
- 'Note:Off' - (Monitor) Reset "Pad1 : : Parameter Value Monitor" (Now)
to the list of actions. That means, once I depress the pad, the monitor is triggered, setting the color.
In case your surface is also changing colors by itself, you also need that. I still have some flickering since there is 1/13 of second between LED is off and the command to switch it on again. In real life I add corresponding MIDI sending (in addition to monitoring) directly into the logic list to avoid that flickering.