Virtual Triggers
While a component can generate triggers sometimes you might also want to trigger something based on an external event, eg the change of a parameter of one of your switchers. To facilitate this reactor can generate a trigger based on
- Conditions
- Time
- Value Changes
Modes
Virtual triggers can use one of the following modes:
Change: Trigger when a external value changes
In change mode you can select any parameter. When the parameter changes or updates in any way the trigger is fired and simulate a button press (like Binary)
Analog: Simulate a fader move
In Analog mode the selected parameter becomes an Analog Trigger (basically imitating a fader). Every time the value is changed a new Analog Value is sent to the defined Behavior
Schedule: Use a fixed time schedule to trigger something
In Schedule mode you can configure a schedule of when your trigger will be executed using cron like syntax. Every time the specified time is reached the Virtual trigger will send a Binary trigger (basically a buttonpress) to the defined behavior
See below on how to configure the time format
HoldGroup
Special VirtualTrigger type to facilitate usecases like a Joystick HoldGroup with multiple RCPs 1
Creating and configuring Virtual Triggers
Like many other things VirtualTriggers are an element of the tree. They are usually defined on a layer. To keep things simple we recommend to create VirtualTriggers on the configuration layer related to your panel. You can select it using the layer icon next to the Section Selector.
Then go ahead and add a VirtualTrigger
After creation click on the name to edit it. You will see this in you inspector:
-
When adding a virtual trigger you first need to select its mode using the dropdown
-
After creating a trigger select either a Condition, Parameter Reference or time schedule.
-
Click Create to create a Behavior. Make an edit
-
Click on the Behavior to configure a Behavior that is used for the Virtual Trigger
Configuring 'Schedule' Virtual Triggers
Schedule Virtual triggers use configuration format called Cron Cron is a Linux ppplication that schedules a command or script on servers to run automatically at a specified time and date.
The syntax works in the following way
* | * | * | * | * | * | |
---|---|---|---|---|---|---|
Field name | Seconds | Minutes | Hours | Day of month | Month | Day of week |
Allowed values | 0-59 | 0-59 | 0-23 | 1-31 | 1-12 or JAN-DEC | 0-6 or SUN-SAT |
Allowed special characters | * / , - | * / , - | * / , - | * / , - ? | * / , - | * / , - ? |
All 6 points of information is required.
Allowed special characters explained:
-
Asterisk ( * ) The asterisk indicates that the cron expression will match for all values of the field; e.g., using an asterisk in the 5th field (month) would indicate every month.
-
Slash ( / ) Slashes are used to describe increments of ranges. For example 3-59/15 in the 1st field (minutes) would indicate the 3rd minute of the hour and every 15 minutes thereafter. The form "*/..." is equivalent to the form "first-last/...", that is, an increment over the largest possible range of the field. The form "N/..." is accepted as meaning "N-MAX/...", that is, starting at N, use the increment until the end of that specific range. It does not wrap around.
-
Comma ( , ) Commas are used to separate items of a list. For example, using "MON,WED,FRI" in the 5th field (day of week) would mean Mondays, Wednesdays and Fridays.
-
Hyphen ( - ) Hyphens are used to define ranges. For example, 9-17 would indicate every hour between 9am and 5pm inclusive.
-
Question mark ( ? ) Question mark may be used instead of '*' for leaving either day-of-month or day-of-week blank.
Alternatively we also allow these inputs:
Entry | Description | Equivalent To |
---|---|---|
@yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 * |
@monthly | Run once a month, midnight, first of month | 0 0 0 1 * * |
@weekly | Run once a week, midnight between Sat/Sun | 0 0 0 * * 0 |
@daily (or @midnight) | Run once a day, midnight | 0 0 0 * * * |
@hourly | Run once an hour, beginning of hour | 0 0 * * * * |
Videos
We have currently 3 videos over on youtube channel documenting Virtual Trigger Configuration: