Monitoring cycleHow fast you can check parameters in the DAW? Do you able to read number when they are changing once per second? What about 10 times per second? Keep the answers in mind while interpreting following numbers. Also note that it is not about the audio discretization frequency, not even about reaction on your keys/controls (the REACTION is executed is "semi real time").
Monitoring happens PERIODICALLY. It happens every 75ms (or whatever set in Sonar preferences, with lower limit of 50ms. But PLEASE do not change the default. That can confuse ALL Control Surface plug-ins). When you define a Monitor, you also specify its "speed". The "Fastest" speed is "Ultra", so every 75ms or ~13 times per second. Lets call such period a
monitoring cycle.
Each cycle, AZ Controller checks either its time to execute OBSERVATION/FEEDBACK for each defined Monitor. All Monitors except "Timer once" (executed on special request with "Reset monitor" and defined delay) and "State monitor" (executed at next possible occasion in case the Current State of the specified Software Set is changed) have the "Speed" parameter. "Ultra" means every cycle. All other "speeds" are slower. In reality, with modern computers and what we do with control surfaces, that is negligible compare to any single FX in your project. So in the preset you can see that all Monitors are defined with "Ultra" speed.
If it is time to execute the monitor, AZ Controller start the OBSERVATION execution of the Logical Control Action List where the Monitor is define, till the Monitor Action in question is reached. Then
monitor conditions are checked and the Monitor Feedback Action List is executed when desired (using FEEDBACK execution mode).
For each Monitor the OBSERVATION execution happens in "sane" environment, reverting changes in the Temorary Current States (Text/Location) may be made by observations/feedbacks already checked Monitors to the current Permanent Current States (Text/Location).
Each Monitor is checked/executed only ONCE during one "cycle". So if some Monitor is already checked (and may be executed), it will not be checked again during the same cycle, even in case its "monitoring conditions" are changed. So the next important topic is:
Monitor priorityThis parameter defines in which order monitors will be checked/executed during ONE CYCLE. Again, the "speed" defines how often (in cycles) the monitor is executed and the priority order monitors within one cycle.
All Monitors with priority "0" are checked/executed before Monitors with priority "1", and so on. You would normally organize Monitor Priority depending from which Software Sets are used during Monitoring and either these Sets can be changed by other Monitors.
F.e. in the preset we are monitoring currently focused in Sonar strip type. And we save the result into "Strip" Set (permanently!). This monitor has priority "0" since there are no dependencies. Then we use "Level" monitor to set "Level(_Ch)" Set. Which strip we look at depends from "Stip" Set, so this monitor has priority "1". Finally, "BtnX" Monitor depends from "Strip" (in Mute/Solo mode) AND from "Level(_Ch)" (in the Level mode) Sets, so we should set its priority to "2".
Monitors with equal priority are executed in "random" order. If you do not set the priority correctly, sometimes your preset will work correctly and sometimes not. Think about side-chaining wrong track, when it is almost in sync with intended (but not always).
Monitor CHECK procedureSo far I have described that when its time to check the Monitor (depending from its Speed in cycles and the Priority withing a cycle), Logical Control Action List where the Monitor is defined is executed up to the Monitor Action using OBSERVATION mode. What happens as next?
The system should decide either we should execute Monitor's Feedback Action List or not, depending from the observation results and the Monitor specification.
First of all, Action Conditions for the Monitor Action are checked. Actions during the OBSERVATION could change current States for Sets in question (as explained before, these changes are TEMPORARY and DISCARDED after monitoring). If some condition is not met, the Monitor CHECK is not executed. The procedure ends (for this Monitor) like the OBSERVATION was not executed at all, so nothing is "saved".
If the Action Conditions are OK, the Monitor enters the CHECK procedure. What is really checked is define in the Monitor options:
* for "Timers" nothing is checked, the decision is always "EXECUTE FEEDBACK".
* other Monitors check specified values, either parameter values, names or Automation flags, the text (for Command Monitor) or strip level. The check is done for CHANGES. If the value in question is CHANGED (compare to the last time it was CHECKED), the decision is "EXECUTE FEEDBACK". If it not CHANGED, the FEEDBACK is not executed.
CHANGED means the following:
1) if that is the first time the Monitor is CHECKED, the value IS CHANGED. That correspond to the "initialization". The Monitor can be "reset" at any time (with Monitor Reset Action) to "forget" the result of previous checks.
2) if Sonar parameter in question is different, the result IS CHANGED. Even in case the value is the same. F.e. if you monitor focused track Solo and you switch focus to another track, with the same status for Solo, the result is still IS CHANGED. The same in case ACT Dynamic Mapping focus is change to different plug-in.
3) if the type of the Monitor is changed (used in the example preset), the result is always IS CHANGED.
4) finally, if the the value is different, the result is also IS CHANGED.
Reversed: the CHECK is negative and the FEEDBACK is not executed in case the type of the Monitor, the Parameter (including originating Strip/FX/etc) and the value are the same as during the last CHECK.
Monitor FEEDBACK executionIf the decision during the CHECK was "EXECUTE FEEDBACK", Monitors Feedback Action List is executed in FEEDBACK mode. Note that Temorary Current States / Text / Location are NOT reverted between OBSERVING and the FEEDBACK. They are reverted AFTER the FEEDBACK.
Are you puzzled by my monitoring explanation? Please take a break, may be read the text one more time next day. Read the rest, check the example preset.
Dependent Software SetThe last "advanced" feature used in the preset. Simple Sets have only "one Current State". Dependent Sets have different "Current State" for each State in another Set.
For programmers: these are one dimensional arrays

For other: let say you want define "Plugged" Set with States "Yes" and "No", which describe either you instrument is plugged or not. You can do this by defining different Sets: "GuitarPlugged", "MicPlugged", "'KeyboardPlugged". Each from these Sets can have own current State. But you also can define the Set "Instruments", with "Guitar", "Mic" and "Keyboard" and say the (one) "Plugged" set depends from the Instrument. So you can then use:
Insturment -> Guitar
Plugged -> Yes
Instrument -> Mic
Plugged -> No
That approach reduce the number of Sets and simplify function definitions, as you can see in the example preset.
Continued in the next post...