Sound Effects - Sample Scripts
Here are some sample scripts to illustrate how scripts work. Once you learn scripting, the possiblities are virtually endless. You will find there are often several ways to achieve the same affect, some are more modular and reusable that others.
Sample Scenario -
In these samples, we show multiple ways to script a "Shot in the dark" scenario. In this scenario, the scene open to a dark stage. A window breaks. A chair is knocked over. The victim exclaims "Who is there?". Silence for 10 seconds to build suspense. Then gun shots ring out. Someone screams and the shooter runs out of the room.
Sample 1. Simple Sequence with Delay
Explanation: No Steps are timed in this script. Steps 1, 2 and 3 play in sequence. Steps 4 is a 10 second delay. Then Steps 5, 6 and 7 play in sequence. script ends.
Script summary
-----------------------------------
Script: 1. A shot in the dark
Repeat: 1
Steps:
1. Play (3. Breaking glass)
2. Play (4. Chair knocked over)
3. Play (5. Who's there)
4. Delay 10
5. Play (6. Gun shots)
6. Play (7. Scream)
7. Play (2. Foot Steps - running)
Sample 2. Timed Offset Steps
Explanation: Steps 1,2 and 3 play in sequence. The last 3 Steps are Offset Timed. Step 4 (
Gun shots) is timed to play 10 seconds after the script starts. Step 5 (
Scream) plays at the 11 second mark . Step 6 (
Foot Steps - running) plays at the 15 second mark. Script ends when all sounds have stop playing.
Script summary
-----------------------------------
Script: 2. A shot in the dark (timed)
Repeat: 1
Steps:
1. Play (3. Breaking glass)
2. Play (4. Chair knocked over)
3. Play (5. Who's there)
4. Play (6. Gun shots) , Offset: 10
5. Play (7. Scream) , Offset: 11
6. Play (2. Foot Steps - running) , Offset: 15
Sample 3. One Script Runs Another
Explanation: In this example, we Run Script 3 '
A shot in the dark (using Run Script Steps)'.
Steps 1, 2 and 3 play in sequence.
Then Step 4 runs the second script '
Shots and scream'. This script plays the
Gun shots Sound Item. And at the one second mark, it plays the
Scream. When the script ends, Step 5 runs script '
Shots and scream' one more time.
Then Step 6 plays the
Foot Steps - running and the script ends.
Note that in this case, we could have just marked script '
Shots and scream' to Repeat twice, rather than running it twice with Run Script Steps.
Script summary
-----------------------------------
Script: 3. A shot in the dark (using Run Script Steps)
Repeat: 1
Steps:
1. Play (3. Breaking glass)
2. Play (4. Chair knocked over)
3. Play (5. Who's there)
4. Run Script (4. Shots and scream)
5. Run Script (4. Shots and scream)
6. Play (2. Foot Steps - running)
-----------------------------------
Script: 4. Shots and scream
Repeat: 1
Steps:
1. Play (6. Gun shots)
2. Play (7. Scream) , Offset: 01
Sample 4. Script with Repeat
Explanation: Note that this script is has been set to repeat (using 1000 for repeat value). There will be a 5 minute delay between each run of the script. This is a useful technique for haunted mansion type setups where you want to continuously Run Scripts periodically over time. Or if you want to play a set of music selections continously.
Script summary
-----------------------------------
Script: 5. A shot in the dark (scheduled with repeat)
Repeat: 1000
Steps:
1. Run Script (1. A shot in the dark)
2. Delay 05:00
Sample 5. The Haunted Mansion
Explanation: The Haunted Mansion is a typical case of timing sequences of sounds that should play concurrently and repeat over a period of time. In this scenario, we want the constant sound of wind with a thunder clap every 45 seconds. Then every 1 minute 30 seconds, we want the sound of floor boards creaking, a door slam, foot steps running then a scream. There are multiple ways to achieve this. We will use a method that employs 3 Scripts.
The "Master Starter" Script simply starts the two worker Scripts running. You could manually start the worker Scripts by selecting each script and clicking the Run button. But by starting with this master script, exact timing between the scripts can be maintained.
The "Wind and Thunder" Script has two Play steps. Step 1 Plays the Thunder sound every 45 seconds. Auto Reset is enabled for this step which causes the step to continously play every time the Offset expires. Step 2 Plays the Wind sound. The Wind sound was set to
Loop in the Sound Item
Play Modifiers which causes it to continously replay. Since both steps are Offset timed steps, the program puts the steps on the Timer stack and does not wait for either step to finish processing. This is important since the program would otherwise wait until these Steps finish playing. And in the case of a Looping sound, it essentially never finishes until the Script is stopped.
The "Scream" Script has four sequential Play steps for the scream sequence. The
Repeat is set to a high enough number (9999) to make the Script repeat for more than 24 hours. It will effectively run until the Stop button is clicked. The
Repeats after Offset time is set to 1 minute 30 seconds ( 1:30). So this script will be restarted every time 1 minute 30 seconds expires. Note that you could create several of this type of Script, each with its own sounds, and time the Scripts to fire at different offsets.
Script summary
-----------------------------------
Script: 1. Master Starter
Steps:
1. Run Script (2. Wind and Thunder )
2. Run Script (3. The Scream)
-----------------------------------
Script: 2. Wind and Thunder
Steps:
1. Play (6. Thunder) , Offset: :45, Auto Reset
2. Play (7. Wind) , Offset: :00
-----------------------------------
Script: 3. The Scream
Repeat: 9999
Repeats after Offset: 01:30
Steps:
1. Play (2. Floor boards creaking)
2. Play (1. Door Slam)
3. Play (3. Foot steps running)
4. Play (5. Scream)