Virtual Triggers
While a component can generate triggers, sometimes you might want to trigger something based on an external event, such as a parameter change on one of your switchers. To facilitate this, Reactor can generate a trigger based on:
- Conditions
- Time
- Value Changes
Modes
Virtual triggers can operate in one of the following modes:
Change: Trigger when an external value changes
In Change mode, you can select any parameter. When the parameter changes or updates, the trigger is fired, simulating a button press (similar to Binary mode).
Analog: Simulate a fader move
In Analog mode, the selected parameter becomes an Analog Trigger (simulating a fader). Every time the value changes, 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 for when your trigger will be executed using cron-like syntax. Every time the specified time is reached, the Virtual trigger sends a Binary trigger (simulating a button press) to the defined behavior.
See below for how to configure the time format.
HoldGroup
Special Virtual Trigger type designed for use cases like a Joystick Hold Group with multiple RCPs 1.
Creating and Configuring Virtual Triggers
Like many other elements, VirtualTriggers are part of the tree and are defined on a layer. To keep things simple, it is recommended to create VirtualTriggers on the base configuration layer of your configuration. You can select this using the layer icon next to the Section Selector.
To create a VirtualTrigger, follow these steps:
After creation, click on the name to edit it. You will see this in your inspector:
- When adding a Virtual Trigger, first 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.
- Click on the Behavior to configure a behavior that will be used for the Virtual Trigger.
Configuring 'Schedule' Virtual Triggers
Schedule Virtual Triggers use a configuration format called Cron. Cron is a Linux application that schedules commands or scripts to run automatically at specified times and dates.
The syntax works as follows:
* | * | * | * | * | * | |
---|---|---|---|---|---|---|
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 six fields are required.
Allowed special characters explained:
-
Asterisk ( * ) The asterisk indicates that the cron expression will match all possible values of the field. For example, using an asterisk in the 5th field (month) would indicate every month.
-
Slash ( / ) Slashes 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 tofirst-last/...
, meaning an increment over the largest possible range of the field. The formN/...
is accepted as meaningN-MAX/...
, starting at N and using the increment until the end of the specific range. It does not wrap around. -
Comma ( , )
Commas separate items in a list. For example, "MON,WED,FRI" in the 5th field (day of the week) would mean Mondays, Wednesdays, and Fridays. -
Hyphen ( - )
Hyphens define ranges. For example,9-17
would indicate every hour between 9am and 5pm inclusive. -
Question mark ( ? )
A question mark may be used instead of*
to leave either the day-of-month or day-of-week field blank.
Alternatively, we also allow the following 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 currently have 3 videos on our YouTube channel documenting Virtual Trigger Configuration: