How do I set a Property to a specific value from a button

Here’s how to use a button to set a device property to a specific value. In this example we’ll use a button to reduce the audio level on channel1 of a Ross Xpression by -6dB.

Our example panel


So we’ve got our Ross Xpression device and we’ve added a button named Dim_A1. Now let’s see how we put it to use.

Select the button to display it’s properties


clicking on the button in the work area selects it and the Property Editor shows the various properties of the button.

Set the buttons Group Index to -1


This makes it a latching button i.e. click-on, click off

Open the OnClickOn script


When you double-click on the OnClick event script in the Property Editor it opens the Script Editor window.

Choose Xpression_1 from the Device dropdown menu


Each script command targets a device. So first we have to select the device.

Select the Action to perform


In this case we want to set a property, so we choose Set from the Action dropdown. There’s a brief explanation of each action next to it’s name to help you decide what action to choose. In this case it says “Set property to value” which is what we want.

Choose the Property to set


When you chose the Set action some new dropdown lists appeared below. These let you choose the Property you want to set and the value to set it to. In this case we’l pick AudioAIn:Gain1.

Set the value


Here we’ve set a value of -6 to dim the audio level by -6dB. You can set the value either by typing it directly into the box, or by using up and down arrows to change the value.

Press the Update button to add the command to the script


Now you press OK to exit the Script Editor and run the panel, the button will set the audio gain on A In ch 1 to -6db when the button is clicked On. This is fine, but obviously you’ll want to restore it to zero when the button is click Off. You can do this in exactly the same way editing the OnClickOff script.

Edit the OnClickOff script


Double click the OnClickOff event script in the Property Editor.

Create a script for OnClickOff


The script to reset the level to zero is almost exactly like the script to dim the audio level except this time we set the value of the property to 0.

Another way to set a property using lua script


Here’s exactly the same command expressed in lua, the programming language embedded within Helm. You set properties using the helm.set command and the parameters go in quotes because they are strings.

Run the panel and see how it works !