Visual Productions forum

Author Topic: Use a variable value as parameter  (Read 8730 times)

2025 December 29, 14:00:20
Read 8730 times

marck

  • Member
  • *
  • Posts: 6
I would like to use a variable value here.
Is that possible somehow? What will the syntax be?
http://gls.mj-k.nl/example.png

2026 January 06, 12:23:19
Reply #1

François Lonnee

  • Administrator
  • Member
  • *****
  • Posts: 362
  • Visual Productions Tech Support
    • Visual Productions
hi Marck

What you want to do is send a value with your message, and then use the 'control' function instead of the 'set'.
Either that, our you route your message to a variable, and then make an action where the variable controls the playback.

I hope that makes sense for you.

Let us know if you need a more in depth answer.

Cheers!
François Lonnee
VisualProductions BV

2026 January 07, 14:34:24
Reply #2

marck

  • Member
  • *
  • Posts: 6
hi François,

I understand what you mean but this isn't working for the way I want to use it.

I'll try and explain a bit further.
So for example, variables 1 thru 6 represents playbacks 1 thru 6.
Each playback has 10 cues in them.
I want to "pre program" the variables without it affecting the playbacks. so let's say:
1 = 3
2 = 2
3 = 5
4 = 10
5 = 1
6 = 8

Then I want to use like an incoming OSC message to trigger an action, and inside this action there will be 6 tasks:
Playback Jump Set PB1 VAR1
Playback Jump Set PB2 VAR2
Playback Jump Set PB3 VAR3
and so on

This allows for even more flexibility in programming, and since a variable already is a number, it should be quite easily to use it for stuff like this.

If you have more questions, please let me know.

2026 January 07, 16:29:53
Reply #3

François Lonnee

  • Administrator
  • Member
  • *****
  • Posts: 362
  • Visual Productions Tech Support
    • Visual Productions
Thank you for that elaborate explanation. I understand how you would like this bit to work.

Could you give a use case where this type of programming could be more useful over having direct jump-to-cuenumber?
And through what means the variables would be changed?

Thanks in advance!
François Lonnee
VisualProductions BV

2026 January 31, 13:30:17
Reply #4

marck

  • Member
  • *
  • Posts: 6
hi François,

There can be multiple advantages when it is possible to be more flexible with variables.

Example 1: (what I initially wanted to achieve)
The customer has one (or multiple) B-Stations and a touch screen.
The B-Stations are for the very simple actions, and the touch screen is a bit more advanced for experienced users.
It is going to control front and top lights for a stage with tunable white fixtures.
The stage is set up in 3 segments, left center and right.
There are 6 playbacks and each playback contains multiple fixtures:
1> Front Left
2> Front Center
3> Front Right
4> Top Left
5> Top Center
6> Top Right
The B-Station uses 5 buttons:
1> Release PB 2, 3, 5 and 6 and turn on PB 1 and 4 (Turn on Left)
2> Release PB 1, 3, 4 and 6 and turn on PB 2 and 5 (Turn on Center)
3> Release PB 1, 2, 4 and 5 and turn on PB 3 and 6 (Turn on Right)
4> Turn on PB 1 thru 6 (Turn on All)
5> Release all (Turn off)

Inside the Playbacks are 8 Cues which determine the color of the fixtures (from cold to warm)
The customer can use the touch screen to select which color they want for each group.
They need to be able to change the color at all times, when a PB is currently on, it needs to follow and when a PB is off it can not turn on (the color needs to be preset.
So how I initially wanted to achieve this:
Arrange the variables:
Var 1 thru 6 represents the preset cue numbers for PB 1 thru 6
Var 11 thru 16 represents the current state for PB 1 thru 6 (0 = Off, 255 = On)

From Toucscreen to CueCore:
It will uses the API command to directly set the correct variable
core-va-1-set=1 (set Front Left to Cold)
core-va-6-set=8 (set Top Right to Warm)

When PB = On, change the color:
(6 times in this Actionlist)
Actionlist = "Playback" > Action 1 > Trigger Type = "Playing" > Trigger Value = "1" > Trigger Flank = "Change" >
Task Type = "Variable" > Feature = "Set Value" > Function = "Control" > Param 1 = "11"

(6 times in this Actionlist)
Actionlist = "Variable" > Action 1 > Trigger Type = "Channel" > Trigger Value = "Variale1" > Conditions > Variable = "Variable 11" > Operator = "> (Higher)" > Value = "0" >
Task Type = "Playback" > Feature = "Jump" > Function = "Control" > Param 1 = "Playback01"

Now for the B-Station buttons, let's say the buttons sends a custom UDP string.
Action UDP receives "Lights Left":
1. PB 1 Jump to Var 1
2. PB 2 Release
3, PB 3 Release
4. PB 4 Jump to Var 4
5. PB 5 Release
6. PB 6 Release
(you get the point for UDP "Lights Center", "Lights Right", "Lights All" and "Lights Off")


Example 2:
I want to give a customer a simple on-off button but I want to keep all the values (the cue number) so when a customer turns it on again it will be the exact values was turned off with.
Let's say I have a CC3 where PB 1 thru 4 are used in room 1, and 5 thru 8 are used in room 2.
The customer want to turn off room 1, then I want to store the current cue numbers for PB 1 thru 4 in variables 1 thru 4 and then preform a release action for those PB's
So I want to make an action with the following tasks:
1. Store Cuenr for BP 1 in Var 1
2. Store Cuenr for BP 2 in Var 2
3. Store Cuenr for BP 3 in Var 3
4. Store Cuenr for BP 4 in Var 4
5. PB 1 Release
6. PB 2 Release
7. PB 3 Release
8. PB 4 Release
When the customer wants to turn on the lights again I want to jump to the variables which are stored.
My action will have the following tasks:
1. PB 1 Jump to Var 1
2. PB 2 Jump to Var 2
3. PB 3 Jump to Var 3
4. PB 4 Jump to Var 4
This can be very useful for things like event spaces where, for example, the same occupant is there for several days and want the exact same lighting settings for each day.

Example 2 could also work when you can store and recall the Intensitys of the PB's.


Example 3: (with another feature I would love to see being added)
When I have a big show inside PB 1 where cue 1 thru 50 are like the "show" cues and cue 51 thru 56 are "specials"
I have a show where I want to go at any moment to one of the "special" cues
So I want to make an action with the following tasks:
1. Store Cuenr for PB 1 in Var 1
2. PB 1 Jump to 53
3. Add a wait time and set it to 2 seconds
4. PB 1 Jump to Var 1


More flexibility with variables can be beneficial in even more scenario's when you can use them inside tasks, by adding the feature you also allow for a lot cleaner and less confusing programming.
« Last Edit: 2026 February 01, 14:56:58 by marck »

2026 February 04, 12:57:57
Reply #5

François Lonnee

  • Administrator
  • Member
  • *****
  • Posts: 362
  • Visual Productions Tech Support
    • Visual Productions
Thank you for the extensive answer, Marck!
François Lonnee
VisualProductions BV

 

SMF spam blocked by CleanTalk