Midi remote disconnects on first unless Track Selection changed in Cubase and back before use

Hi Folks,

Wondering if any midi-remote scripters can shed some light on this. I’m new to javascript but not programming but I can’t seem to isolate this problem.

I have Knob bound to Send 1 on the Selected Track.
When the Midi remote is first activates (e.g. when you reload the script) The surface fires up and looks all colourful and correct.
As soon as the Send 1 Knob is turned the Remote goes Grey on screen even though the surface is showing a changed value on the knob, the Remote is grey and nothing happens in Cubase

If you click a track in Cubase and then Click back to midi remote then the Midi remote will fire be active again and you can turn Send 1. In fact it will continue that way until you quit.

This doesn’t occur on all knobs/buttons - many remain active. I had noticed thought that using the Select Button (bound to track Select) will cause this problem as well - with the same cure.

Note that you can reload the script and simply Select a different track in Cubase with the mouse and the midi remote will go grey, then select the original track (or any other) and it will activate again.

My guess is some variable isn’t initialized correctly but there are no Logs in the midi remote log messages so I can’t find any guidance as to what is wrong.

Anyone have any suggestions on how to debug this?

The Icon Platform M+ script is here if you want to see my bad javascript is…(develop branch)

I am no closer to figuring out a solution to this issue but have observed the following which I will describe in sequence:

  1. With the midi-remote script loaded got to the Selected Channel page and Select a channel above the first 8, so its outside the first bank.
  2. Reload the script - everything will show correctly on the Select Channel page
  3. Switch to the Mixer page - The Mixer will show the FIRST BANK of 8 tracks. Any Selected Channel controls on the Mixer page will STILL be controlling the original selected track
  4. Select a track in the first 8 via Cubase or the Midi Remote suface select button - The Midi remote will immediately disconnect anything associated with the Mixing surface - the Transport buttons are still active. Pressing one will reconnect the Mixing surface.
  5. Click another track in Cubase - everything will burst back into life.
  6. Switch to the Selected Channel Page - everything will show correctly. Adjust QC assigned to Faders in my case will work. Turn a Knob attached to Send will initially work then midi remote disconnect (its almost like time out). I tried this with a Fader QC attach to the same Send. The fader and knob both turn to the new value then midi remote disconnects.

I’ve beginning to think this is a bug in midi remote and that by pressing any still working button (those not related to the midi remote disconnect) causes a set of variables to be initialised which were otherwise not initialised. The disconnect between the Bank and the Selected channel on the initial reload is pointing me this way. That and pretty much removed all the code back to one of the basic mixer examples and it showed the same behaviour.

It may still be something I am doing wrong in the Surface code - guess at the documentation for the scripting is challenging to say the least. Looking forward to seeing that improve in due course.
Even with this niggle my midi controller is doing more than it could in Mackie mode before in the way I want to do it. So its a great start.

@Martin.Jirsak I’m curious if you are seeing this issue with your Behringer X Touch script since they are both MCU devices?

ANyone know of a way to get javascript exceptions or such like out of Midi remote?