What Values Do I Supply for makeCommandBinding for Selected Track > Selected?

Hi All,

In the new MIDI Remote API, there is a function that can output a MIDI message when a track is selected. This can be found in the Functions Browser under Selected Track > Selected. I would like to use this in a MIDI Remote Script, but I could not determine what values to supply for the makeCommandBinding function arguments for commandCategory and commandName :

page.makeCommandBinding(button.mSurfaceValue, ???, ???)

I tried looking through the documented functions but could not seem to find it:

Any help would be appreciated.

Cheers!
I

The command you are looking for does not exist in combination with makeCommandBinding.

Hello, command bindings are not that useful for sending feedback to a controller.
You can try:

page.makeValueBinding(button.mSurfaceValue,page.mHostAccess.mTrackSelection.mMixerChannel.mValue.mSelected).mOnValueChange=function(activeDevice,activeMapping,value,diff){
    if(value==0){
        console.log("unselected")
    } else {
        console.log("selected")
    }
}

What is the use case by the way? You need to show the track name?

If this is the case, you should add something like this:


button.mSurfaceValue.mOnTitleChange=function(activeDevice,title1,title2){
    console.log("track name="+title1)
}
2 Likes

Thank you! The value binding worked as expected.