i managed to get all dynamically. cubase track names (from HUI device in cubase), articulations (from json files) and the buttons for the articulations (thanks to Mihkel Zilmer).
no need of plugins and cc's and generic remote.
you can add tracks in cubase on the fly and the track name will show up immediately in OSC. no hard coding of track names any more. here's the link to my custom module:
i hope there's something for the cubase users. if you have questions feel free to ask. i'm giving my best to answer them.
you have to convert your expression maps to json. this is the least dynamic part of it. you have OSC to say which json belongs to which expression maps. but the articulations are now pulled dynamically from the json files. in the custom module i say if this track is selected use this json to pull from.
i think it's amazing
sorry i'm just really excited now.
if you have ideas and inputs for optimization i'm open.
The json files could be loaded in a single operation by scanning the content of the folder. Extracting the articulation seems to always follow the same procedure, here is a blind attempt to get rid of 100s of lines of code (will need adjustments of course):
@Sub3OneDay
i realized only the first 18 chars are transmitted. i guess this is a hui limitation. if i have time i‘ll have a look into mackie.
but for now i‘m just happy the way it is now
The way to go would be to install a node library such as this one in the custom module's directory (by running npm install xml2json in a terminal in that directory, this should create a folder called node_modules with the install modules inside it*), then you'll be able to use it like this
const fs = requireNative('fs');
const xml2json = requireNative('xml2json');
var xmlFile = fs.readFileSync( './data.xml', 'utf-8')
var json = JSON.parse(xml2json.toJson(xmlFile))
I assume you only need to install the node library once on a machine and you don’t need to get the custom module to do it each time you open the OSC panel and “load” the custom module?
18 character limitation not a massive problem as you can limit the track name length in cubase settings to 18 so that will make sure you don’t lose data into OSC but it does limit flexibility for me as I regularly use over 18 characters and tag my track names with a load of extra things at the end of the name to allow for searching etc in macros and logical editor in cubase - for example:
@Sub3OneDay what i also noticed regarding track names: if consecutive tracks have the same amount of chars from beginning to first space, the chars after the space get cut. as in your screen shot nearly all would get cut, but only if you select them in order. a workaround is to select a track with different chars amount and switch back to the desired track. i have no idea why this happens. maybe it's a cubase thing. i don't know.
and was going to tag each track name with the cc number at the end so would end up with a track name like this:
If I do this the data would be lost so would need to put the tag at the start of the track. Nnot ideal as this would also be reflected in the cubase mixer so you can't see the instrument names, just the tags.