Variable resolution problems

OpenStageControl4reaper_18.json (1.1 MB)

Hi!
In this rather big template i have the problem that i need an identification letter in the id of knobs.
In the TAB Kemper, when setting STOMPA to “Wah Wah #WAH” under kempFxDetA the knob “FXKNOB_A_0” should be shown. The ID / visible / interaction property is “computed” correctly.

But the knob is just a few pixels…?
When changing the id from “FXKNOB_@{parent.variables.stomp}_0” to “FXKNOB_A_0” everything is working fine again.

Why is this behaving this way? Would it be better in terms of performance to get rid of as much @{parent.variables…} as possible? (i have done as much cloning as i could).

Version 1.7.5, updating to the new version shortly…

Thanks!

Looks like a little bug that should be fixed soon.

Yeah! Glad it is a bug :slight_smile: (maybe that is also the cause why the clone objects do not work propertly). Is the heavy use of @{parent.variables…} a performance bottleneck (can’t really reduce the widgets here) ?

Thanks!

The main problem is how you linked all your widgets together : selecting a value in the modal triggers an enormous amount of work because many widgets have their id depending directly or indirectly on this value (all these widgets are rebuild be when their id change). Honestly I think the only solution to get something light here is to start over and keep the UI part as simple as possible and do the dynamic things from the custom module. On my side I’ve identified a few changes I can make to optimize things a little but it won’t make a big difference.

Thanks for your comments, the problem is that, as far as i know it is not possible to set “visible”, “interaction” and the html property (and the “props” property for the clones of the knobs) from a custom module.

(when an fx is selected i know which knob to show and how to label these by the address value and preargs).

For now i try to remove as much as “@{xxx…}” variables as possible , if that does not help i need to find other possiblities…

You can use the OSC{} syntax to allow modifying any property with an osc message (which the custom module can send), or you can use the /EDIT command.

thank’s again and sorry for being annoying, could you give me the example to hide a knob with the OSC{} syntax from a custom module (preargs e.g. ‘00 01A’)?

id: FXKNOB_0

Here is a generic example instead.

Set a widget’s visible property to OSC{foo, false, true}. This will create a listener on osc address /widget_address/foo and return the default value false until a different value is received; the last argument (true) indicates the widget’s preArgs are to be passed to the listener and must be matched in order to change the listener’s value. It’s now possible to change the listener’s value by sending the appropriate osc message to open-stage-control or directly from the custom module:

receive('/widget_address/foo', 1)

Note: the osc listener’s syntax can be seen as a shorthand for a variable widgets whose value would be retrieved with the @{} syntax.

A few simple custom module examples can be found in the docs to get started. You’ll need to learn some Javascript to understand what you’re doing though.

Thank you that seems to work (unfortunatly my knob which i clone from is still 1 pixel in size even if i delete it.. )

how can i do this with cloned knobs ?
When setting a cloned knobs visible property(OSC{hide,false,true}) it throws this error...

Error while setting visible to: "OSC{hide,false,true}".
It's probably a bug, please open a new bug ticket with the followigin informations athttps://github.com/jean-emmanuel/open-stage-control/issues
Uncaught TypeError: Cannot read property 'length' of undefined
at strict";require (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2837:841)
at strict";require (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2837:440)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2843:14561)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2843:14246)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2843:15907)
at incrementWidget (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2657:624)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2663:2224)
at strict";require("core-js/modules/es.array.index-of"),require("core-js/modules/es.array.slice"),require (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2675:582)
at s (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2774:4105)

When trying in the props...

JS{{
var props = {
}
props.id = 'FXKNOB_1';
props.visible = OSC{hide,false,true};
return props
}}

Error while setting props to: "JS{{ \nvar props = {\t\n} \nprops.id = 'FXKNOB_1'; \nprops.visible = OSC{hide,false,true};\nreturn props\n}}".
It's probably a bug, please open a new bug ticket with the followigin informations athttps://github.com/jean-emmanuel/open-stage-control/issues
Uncaught TypeError: Cannot read property 'length' of undefined
at strict";require (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2837:841)
at strict";require (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2837:440)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2843:14561)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2843:14246)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2843:10669)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2843:7595)
at strict";require("core-js/modules/es.array.index-of"),require (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2834:187)
at ownKeys (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2846:1772)
at strict";require (http://127.0.0.1:9000/client/open-stage-control-client.js?version=1.7.5:2723:950)

Still on Version 1.7.5

Unfortunatly i had to use a variable on the knobs id, because i need to bypass preargs validiation (i would need to send a string and the exact value of the switch back with the preargs and requesting a lot of values is a bad tradeoff IMHO).

That's a first, the clone widget itself doesn't support this syntax since it doesn't have any address/preArgs properties of its own; I didn't see it coming. That's something I'll need to unmangle...

Meanwhile, you can very well put the OSC{} part in the original widget and it will duplicate and take into account address/preArgs overrides.

unfortunatly my knob which i clone from is still 1 pixel in size even if i delete it

It's fixed in sources already, the release will come shortly.

It's now fixed in sources: the osc listener syntax will act in clone widgets as if it has an address set to "auto".

Edit: v1.7.8 is available now

Thank you very much, this is working very well, and really fast now!!! :slight_smile:
In case someone else did not catch that, when setting the third paramter in the OSC{xxx,false,true} command "true" to check the preargs, you have to PRE-pend them in the receive command in the custom module ->

receive('/addy/xxx,'preargs',1)

Another question remains, does this also work if i use the same OSC command on other widgets?

in the custom module i do

receive('/FXKNOB_x/showFxControls,'A',0); //knob clone x with preArg 'A'
receive('/FXKNOBVAL_x/showFxControls,'A',0); //text clone x with preArg 'A'

the text clones (FXKNOBVAL_x) i got in the visibilty Property a computed Value

["A",0]

the "original" Text widget shows 0, but is not hidden.

I guess there is another id needed, due to the other widget.

I think the issue here is that you're still writing OSC{} in the clone's props property which makes the block ignore the cloned widget's preArgs (the OSC{} is resolved at the clone widget's level which has no preArgs). Hence my previous suggestion:

Meanwhile, you can very well put the OSC{} part in the original widget and it will duplicate and take into account address/preArgs overrides.

It's the only way to ensure the OSC{} is resolved at the cloned widget's level.

Nope, i don’t have the OSC{} Syntax in the props property…

At startup nothing is shown(like it should, StompA “kempFxDetA”), when selecting the first fx, the knobs and text widgets are shown like they should, when switching back to “off” the text widgets are still there. (FXKNOBVAL_0 has a computed value of “0”, so i guess the preArgs are not right somehow). The receive command in the custom module is at line 370…

OpenStageControl4reaper_redesign_v1.json (1.1 MB) openstagecontrol4reaper_redesign_v1.js (47.7 KB)

I’m sorry but I don’t think can afford taking the time to track the issue in such a big project. If you manage to create a very minimal setup to reproduce the error I’ll debug it gladly.

Of course!I have deleted everything not needed, thank you for the support!
(JS file is the same as before).sample.json (304.0 KB)

At startup nothing is shown(like it should, StompA “kempFxDetA”), when selecting the first fx, the knobs and text widgets are shown like they should, when switching back to “off” the text widgets are still there.

I just did that with sample.json, the text widgets disappear as expected, I'm afraid the problem comes from something else in your session.