MIDI Remote feedback from command

Thank you Martin but don’t swear by it :slight_smile: In the snippet I’ve posted above, I have two errors (on purpose):

  1. Inside the mOnValueChange, we really have to check for the value before toggling the mixer state:
page.makeCommandBinding(yourSurfaceValue,'Devices', 'Mixer').mOnValueChange=function(activeDevice,activeMapping,value,diff){
   
   if(value==1){

      mixerState=1-mixerState
      console.log("mixer State="+mixerState)
   
   }

}

This is because I assume the usage of a gate button. And then, there’s a second error:

  1. Exactly the assumption that we have a gate button. If for example we have a button that sends just a 1 (i.e. without sending a 0 afterwards) this implementation will fail, since the mOnValueChange will fire just once. This was something reported (NOT a bug), but eventually since it can be easily workaround by using the mOnProcessValueChange that you used instead, the case is closed :slight_smile: