Hi everyone,
I’m developing a MIDI Remote API script for Cubase Pro 15 (v15.0.21) and I’m having trouble getting followPluginWindowInFocus() to work as expected when the focused plugin belongs to a different track than the currently selected one.
Expected behaviour (how it worked in Cubase 14)
In Cubase 14, I had a JSON-based MIDI Remote mapping that used HostInsertEffectFilterExcludeEmptySlots and HostInsertEffectFilterFollowPluginWindowInFocus together on an InsertEffectViewer anchored to SelectedTrackChannel. The 32 knobs mapped to the Remote Control Editor would always follow whichever plugin window had focus, regardless of which track was selected.
Current behaviour in Cubase 15
With the equivalent JS script using the same architecture:
var viewer = selectedTrack.mInsertAndStripEffects
.makeInsertEffectViewer('RCEFocusViewer')
viewer.excludeEmptySlots()
viewer.followPluginWindowInFocus()
The knobs follow the focused plugin correctly as long as the focused plugin belongs to the selected track. But if I bring a plugin from a different track to the front, the knobs stay locked to the selected track’s plugin.
Steps to reproduce
-
Select track A, open plugin A → knobs control plugin A ✓
-
Select track B, open plugin B → knobs control plugin B ✓
-
With track B still selected, bring plugin A’s window to the front
-
Expected: knobs switch to plugin A
-
Actual: knobs stay on plugin B (the selected track)
Test script
I’ve written a minimal standalone script that isolates the issue. You can drop it into your MIDI Remote scripts folder and use any IAC virtual port (change the port name at the top):
var midiremote_api = require('midiremote_api_v1')
var deviceDriver = midiremote_api.makeDeviceDriver('Test', 'RCE Focus Test', 'jordikt')
var midiInput = deviceDriver.mPorts.makeMidiInput()
var midiOutput = deviceDriver.mPorts.makeMidiOutput()
deviceDriver.makeDetectionUnit().detectPortPair(midiInput, midiOutput)
.expectInputNameEquals('IAC Driver Bus 1')
.expectOutputNameEquals('IAC Driver Bus 1')
var surface = deviceDriver.mSurface
var page = deviceDriver.mMapping.makePage('Default')
var knobs = []
for (var i = 0; i < 32; i++) {
var knob = surface.makeKnob(i % 8, Math.floor(i / 8), 1, 1)
knob.mSurfaceValue.mMidiBinding
.setInputPort(midiInput)
.setOutputPort(midiOutput)
.bindToControlChange(0, i + 1)
knobs.push(knob)
}
var selectedTrack = page.mHostAccess.mTrackSelection.mMixerChannel
var viewer = selectedTrack.mInsertAndStripEffects
.makeInsertEffectViewer('RCEFocusViewer')
viewer.excludeEmptySlots()
viewer.followPluginWindowInFocus()
var paramBank = viewer.mParameterBankZone
paramBank.setWrapAround(false)
var params = []
for (var i = 0; i < 32; i++) {
params.push(paramBank.makeParameterValue())
}
for (var i = 0; i < 32; i++) {
page.makeValueBinding(knobs[i].mSurfaceValue, params[i])
}
What I’ve tried
I also tried anchoring the viewer to a dedicated MixerBankChannel from a separate MixerBankZone instead of SelectedTrackChannel, but the behaviour was identical.
Question
Is followPluginWindowInFocus() intentionally scoped to the selected track’s inserts in Cubase 15? If so, is there any way to make the 32 knobs follow the focused plugin window globally — across any track — without changing the track selection?
Thank you.
Calling @m.c as always…![]()