I will list the snippets here that lead to a working Remote Control. You don't have to follow this exactly and can of course use the other functions available, only the cursorDevice creation seems to be crucial:
Code: Select all
In Init:
//the selected track in arranger
cursorTrack = host.createArrangerCursorTrack(8,8);
followMode = CursorDeviceFollowMode.FOLLOW_SELECTION;
//Using this form to create the cursorDevice seems to be crucial!
cursorDevice = cursorTrack.createCursorDevice("YourID", "YourName", 8, followMode);
// Cursor pages for the Remote Controls:
cursorPage1 = cursorDevice.createCursorRemoteControlsPage("CursorPage1", 8, ""); // I use no filter here
You can then set the cursor page with:
cursorPage1.selectedPageIndex().set(0); // here I select the first one.
In onMidi you can then set a value with:
cursorPage1.getParameter(0).set(data2,128);
I hope this helps!
Cheers,
Tom