Sound Mill - User's Guide
Automation Overview
How automation works
You can automate playing Sound Items by building automation Scripts. A script is composed of one or more command Steps which execute in sequence or steps can be timed to fire at a specified time. You can run a script manually by pressing Run Script button in the Automator window (Figure 1.). Or scripts can be run at a specific time of day by starting them with the Scheduler. When you run a script, a script execution "thread" is created. If child scripts are spawned by Run Script steps, they will all belong to the same parent thread.
To get started with scripts, read this page , then look at the script samples .
Automation scripts have the following functions:
Automation Scripts
-
They execute step commands in sequence or by timing.
-
They can be run repeatedly any number of times.
-
They can be run other scripts by executing a Run Script step command.
-
They can be run manually from the Sound List window. ( via a Run Script Sound Item ).
-
They can be scheduled to execute at a specified time of day. (Schedule Time)
Script Step Types
Automation commands steps can be any of the following types:
-
Play step: Plays a Sound Item.
-
Run Script step: Runs another Script. This script is added to the parent thread.
-
Delay step : Adds a time delay time between two sequential steps.
-
Stop All step : Stops the current running Script thread which includes any Scripts that were spawned via Run Script steps.
-
Clear Announcements step : Removes any announcements currently in the announcements stack.
-
Start ExtProgram step : Runs an External Program
specified in a Sound Item. When the Start External Program step executes in automation, the automation script processor does not wait for the program to complete its operation. It starts the External Program then goes on to execute the next automation step immediately.
Affect of Pause on Delay Times
If you click Pause while a Delay step is in effect, the delay time will suspend (stop draining) until Resume is clicked. So for example, consider a 20 second Delay. If you click Pause after 5 seconds of the delay has expired, there will be 15 seconds of delay remaining once you click Resume.
Step Time Controls
Script steps execute in one of these modes:
-
Sequential order: Each step executes in sequence, waiting for the previous step to complete. (when no time control is enabled) .
-
Offset Time: The step executes after a specified delay (offset) from the instant that the containing script starts to run. Offset Times can be set to Auto Reset causing its timer to be reset everytime the step executes. Timer auto-resets continue until the script is stopped.
-
Scheduled Time: The step executes at a specified time of day. This is only used by the Scheduler.
Using time controls and time behavior
-
Offset Time: A step will execute after a specified amount of time from the instant its containing script starts to run. This is the best method for making sounds play concurrently. For example, set Offset Time to 2 seconds then the step will execute 2 seconds after the script starts to run.
-
Schedule Time: A Scheduled step will execute at its specified time of day. It is ONLY executed by the Scheduler. It is not added to the Scheduler Plan until its containing script starts to run. It is ignored when you run the script manually.
-
A step is treated as a simple sequential step, when neither Offset Time nor Schedule Time are enabled.
-
Steps with equivalent Offset Times will start to execute simultaneously.
-
Steps with an Offset Time of zero (0) will execute immediately when the script starts.
-
Pausing a script that has Offset Timed steps, will cause timing of those steps will be invalidated. The timing of step execution is not recalculated for the pause duration. When a Script is 'Paused', any Offset timed steps that time out (Offset expires) are lost (not executed) Unexpected results are likely but the Script will continue to run when 'Resume' is clicked.
-
A Delay steps are always executed as sequential steps.
-
Play step (looping): Playing a Sound Item that is setup to Loop (in the Play Modifiers) is a special case. A looping sound never finishes until you manually hit the Stop button. So it will prevent any subsequent steps from executing. If you use a Looping sound, you will need to Stop the script manually.