Midi remote Direct Access and Process Value

I just discovered the existence of the Direct Access (a very powerful and hidden tool I guess). Just to have a quick preview you can get the number of tracks in your project, their name and their visibility status with any trigger

var page = deviceDriver.mMapping.makePage('Default')
  
var hostMixConsole = page.mHostAccess.mMixConsole
var directAccess = page.mHostAccess.makeDirectAccess(hostMixConsole)
page.mOnActivate = function(activeDevice, activeMapping) {
directAccess.activate(activeMapping)
}

page.mOnActivate = function(activeDevice, activeMapping) {
    var mixConsoleID = directAccess.getBaseObjectID(activeMapping)
    var childnumber = directAccess.getNumberOfChildObjects(activeMapping, mixConsoleID)
    console.log('Number of Children : ' + childnumber.toString())
    for(var i = 0; i< childnumber; i ++) {
        var childID = directAccess.getChildObjectID(activeMapping, mixConsoleID, i)
        var childTitle = directAccess.getObjectTitle(activeMapping, childID)
        var childVisibility = directAccess.isMixerChannelVisible(activeMapping, childID)
        var childPosition = directAccess.getMixerChannelIndex(activeMapping, childID)
        console.log(i + ' : ' + childTitle + ' | ' + childVisibility.toString() + ' | ' + childPosition)
    }
}

This script gave me this result :

For now, I don’t understand why there is 26 children but only 25 tracks and why the last track is duplicated.

You can imagine the power of this tool : a button to always select the first track wherever the bank zone is, an easy feedback on which tracks are hidden… and so much more possibilities

var childparameter = directAccess.getNumberOfParameters(activeMapping, childID) 
    for(var i = 0; i < childparameter; i ++) {
        var a = directAccess.getParameterTagByIndex(activeMapping, childID, i)
        console.log(i + ' = ' + page.mHostAccess.makeDirectAccess(hostMixConsole).getParameterTitle(activeMapping, childID, a, 10))
    }

Adding this, we have this a lot of parameters which could be edited by using this setParameterProcessValue() method I guess. But I’m struggling and can’t find a way to edit them with this method. Does anyone manage to did this ?

@m.c I saw you posted several posts on this topic

Do you have any advice ?

A look of the project (can’t put several images on a post) :

And the parameters with the second script :

Welcome to this forum.

The last track should be your audio input (if any). I consider this a bug. Nevertheless, not a big one, since we can (and probably have to) store these children properties to an object (map), so we won’t worry for duplicates.

What did you try so far?

That’s what I think but adding a getMixerChannelZone did not show the right position (not very concerning, i’m just trying to understand)

Last number for the channel bank zone

This, expecting my 3rd track muted on button press

var page = deviceDriver.mMapping.makePage('Default')

  var IDstorage = deviceDriver.mSurface.makeCustomValueVariable('ID storage')
  
  var hostMixConsole = page.mHostAccess.mMixConsole
  var directAccess = page.mHostAccess.makeDirectAccess(hostMixConsole)
  page.mOnActivate = function(activeDevice, activeMapping) {
      directAccess.activate(activeMapping)

      var mixConsoleID = directAccess.getBaseObjectID(activeMapping)
      var childnumber = directAccess.getNumberOfChildObjects(activeMapping, mixConsoleID)
      //console.log('Number of Children : ' + childnumber.toString())

      var childID = directAccess.getChildObjectID(activeMapping, mixConsoleID, 3)
      IDstorage.setProcessValue(activeDevice, childID)
      console.log(directAccess.getObjectTitle(activeMapping, childID))

      var childparameter = directAccess.getNumberOfParameters(activeMapping, childID)
      for(var i = 0; i < childparameter; i ++) {
          var a = directAccess.getParameterTagByIndex(activeMapping, childID, i)
          console.log(i + ' = ' + page.mHostAccess.makeDirectAccess(hostMixConsole).getParameterTitle(activeMapping, childID, a, 10))
      }
  }

  page.makeValueBinding(potsAndPads.upperPads[0].mSurfaceValue, page.mHostAccess.mTransport.mValue.mCycleActive).setTypeToggle().mOnValueChange = function(activeDevice, activeMapping) {
    var ID = IDstorage.getProcessValue(activeDevice)
    console.log(ID.toString())
    directAccess.setParameterProcessValue(activeMapping, ID, 8, 1)
    console.log(directAccess.getParameterProcessValue(activeMapping, ID, 8).toString())
  }

But also using the same script except I change to a trackselection

Your setParameterProcessValue is wrong. You enter the parameter index, while this method needs the tag.

var paramTag=directAccess.getParameterTagByIndex(activeMapping,ID,8)
directAccess.setParameterProcessValue(activeMapping, ID, paramTag, 1)

That was exactly that !

Thanks so much ! And thank you for all your responses in all the other topics.

I have observed track are changing ID when you close and reopen a project, do you know if it’s the same with parameter Tags ?

Do you have a way to copy the console log ?

And other question but list time I checked it was impossible to move a track in the project with the midi remote. Do you know if someone found a way to achieve this ?

Parameter tags stay the same, unless of course, there’s an update in a VST (I mean the software) or even Cubase, which can mess them. Not probable at all.

Yes, Steinberg did :slight_smile: Have a look at these commands:

Nope. Still, you can send the logs using MIDI (SysEx) to the outside. You then need a utility to parse the sysEx messages to ordinary text. I will be back shortly with a snippet for this in a dedicated thread.

Perfect !

I had this idea too but no time to do it for now, I’m waiting for it

Thanks a lot

I made a feature request for it a while back if you’d like to support the idea.

1 Like

I know it’s nowhere near to be perfect, but here’s a work around:

1 Like

Another workaround would be the use of an OCR tool like owlocr.com which I use a lot and it´s free…

Cheers, Emre