Is there a plan to add support for custom variables, expression variables, local variables in fields for the various actions in the RCP modules?
In the attached screenshot, I have created a custom variable for my various talkback channels and made it an array so that I could potentially set the value as $(custom:TB)[0] or $(custom:TB)[1]. Then I can just have one custom variable for the various values I need. And then for the ToMix option, I would like to be able to set that up as $(this:column)+1 on button 0/0/0 so that I can then just begin copying and pasting the buttons to different columns and it will already be mapped to the correct channel. I hope this makes sense! Thank you!
I haven’t implemented local variables or expressions just yet, because there’s a big change coming in the way that input fields are going to be dealt with, and I want to wait until that’s done so I can do the change once and leave it.
But, in the RCP module, the fields do allow for custom variables already. The inCh and ToMix values can be custom or module variables.
Additionally, variable values can be set by feedback, by checking the “auto-create variable” box in the feedback, or by using the @(custom:MyVar) syntax, which is how I implemented my own “local variables” before there were any, back in v3.
Can you let me know where you’re getting stuck specifically and I’ll try and help figure out a way to do it currently?
Oh great! Can’t wait to see what that is going to be!
Right now, where I am getting stuck is when setting the “ToMix” option in the “InCh/ToMix/On” action, I am trying to set it to be the value of the row or column it is on by using $(this:column), The main “issue” (it’s not really an issue currently) is if I set it to the very first button and used $(this:column), it would read the mix as “0” and it won’t allow me to add $(this:column)+1. And it won’t let me use the custom variable “array” option.
So none of this is really an issue (it’s all working as I currently have it set up), was just brainstorming and daydreaming about ways I could implement the new features into my setup.
I have added local variable support without much (any?) testing to see if it breaks things…
This might also allow for expression variables, I’m not sure, so let me know if you try it.
Oh man! I had notifications off for this and missed this! I will test this later this evening!
Is the new stable (4.3.0) the update you were referring to?
Expressions in Any Action or Feedback Field
The connection module API has had a major revision in this release. The main change is to make it possible for any action or feedback input field to support expressions. Where supported, a toggle button next to the input field lets you switch it into expression mode.
Unfortunately, this requires modules to update to the latest version of the module-api making this opt in. We hope to see many modules start to support this in the coming months — it greatly increases the flexibility of Companion.
Your image didn’t show up, but yeah, those features have been there in the 4.3 beta for some months now.
In looking at the RCP module, it’s gonna need quite a bit of help I think to get it updated for these new capabilities. For now, value feedbacks are there, but they’re not really useful. Expressions aren’t supported yet as again this will be a lot of work to sort out. Hopefully I can do it in stages.
Do you have a use case for expressions ATM, that would help me decide where to focus.
Oh sorry about that. Must not have attached. The only thing that I currently have run into is what I mentioned at the beginning of this thread. For some modules, when needing lots of buttons, I’ve positioned them on the page in such a way that I would use (this:column or this:row) and then just add one to it, then copy and paste and it would make that quicker. It’s not a big deal at all, mostly just curious. I will test out the local variables though for sure and see what I can do with it. Thank you for your work on this though. It has been a super solid part of my workflow for a long time now.