Midi Remote scripts do not behave is I would expect

Below you see some callbacks I tried. But the mTransportLocator is the only one, that does what I expect, it logs the current locator time.

All the other functions somehow behave in a way I do not understand. When reloading the script or when changing the track, they get called, but always with the value 0.
But when you click on start, stop, record, cycle, there is no log in the console window. Furthermore, even when there is a log e.g. on selecting another track, it always states the value 0.


Aren’t these callbacks intended to report when the user click the respective buttons in Cubase?

page.mHostAccess.mTransport.mTimeDisplay.mPrimary.mTransportLocator.mOnChange = function(activeDevice, activeMapping, time, unit) {
    console.log("mTransportLocator "+time + " "+ unit)

page.mHostAccess.mTransport.mValue.mRecord.mOnProcessValueChange = function(activeDevice, activeMapping, number) {
    console.log("mRecord "+number.toString())

page.mHostAccess.mTransport.mValue.mStart.mOnProcessValueChange = function(activeDevice, activeMapping, number) {
    console.log("mStart "+number.toString())

page.mHostAccess.mTransport.mValue.mStop.mOnProcessValueChange = function(activeDevice, activeMapping, number) {
    console.log("mStop "+number.toString())

page.mHostAccess.mTransport.mValue.mCycleActive.mOnProcessValueChange = function(activeDevice, activeMapping, number) {
    console.log("mCycleActive "+number.toString())

Did you bind start/stop/cycle to a control? If not, the above events won’t get triggered except from when changing track (and some other events as well) as you correctly mention.
The way I understand it is that process value changes get triggered when we have a control to care for these changes.

1 Like

No, I did not define controls. I thought when you use mHostAccess you can directly get events without controls. I mean, if I use the controls value change, does the following line make any sence? Wouldn’t I use mOnProcessValueChange directly on the control? (Didn’t check jet if this is possible)


The mTransportLocator works without a control attached to it. That is, what makes me wonder.

You really have to bind controls.
The transport locator is not to be binded, notice that you have an mOnChange instead of mProcessValueChange in this case.

Is there any documentation that describes what you explained to me. From where do you have this information. Or was it trial and error to find out. I really would like to use Midi Remote to its full potential, but with this single website is really hard to understand the details.

mOnProcessValueChange does not even appear in the API Reference, only in the examples. Or is there another source of information?

I started by having a close look at the examples given.
Then, inside Visual Studio Code, I browse items’ methods and properties (they all come up when you write a dot after an object). Also, I search at the API’s file (midiremote_api_v1.js) for whichever thing I suppose is there.
Sometimes I have questions, I try here at the forum.
Finally, I’m always logging arguments of functions in order to see what they really stand for.

1 Like