Dialog in the Dark with SFX, Part 2.
By Carlton Guc

Last issue we reviewed the technical system used for the Dialog in the Dark project, Kansas City. In brief review, take four touring racks and pack them with 128 channels of amp channels, mix in 96 SFX Outputs, 400+ sound cues and a number of external triggers. Apply power. You can read about it in the last issue here.

Now what really makes this installation special is the new scripting language available in SFX 6.   Basically this is the glue that allowed for an easy solution to some pretty complex triggering issues.   The startup process is initiated by turning a key switch to power all four racks.   This process once complete will relinquish key control from the ETA power conditioners over to the SFX Input/Output relay boards to prevent the key from unconditionally turning off the system.   Turning the key off will signal SFX that it is OK to begin the shut down process in an order that SFX will selectively turn off equipment.  

Not to spoil the character of the exhibit or the surprises that await guests, Ill cover scripting concepts as they apply to SFX and how they might relate to some common challenges.    Lets jump in.

The Basics

So, what is SFX script?   Glad you asked. It's the programming language built into SFX that is similar to VB Script or other scripting languages.   With it you can create variables, ask for users input, test conditions but most importantly, you can talk directly to the internal SFX engine.   Anything you can do through the interface you can do in through the scripting language including creating an entire production.  An example of this is our SFX 5.6 to SFX 6.x file convertor which will read an existing 5.6 file, then create a script that when executed will build your entire show.

Where you can access the SFX Script processor

  • Command Interface (View | Command Interface).

  • In a Script Cue

  • External input from Telnet

  • External input from RS-232

Command Interface

Navigate to the Command Interface in SFX from the View | Command Interface menu to see all logged events and to enter SFX script to execute.    Try it by typing in:

display "Hello SFX!" [Press ENTER]

Script Cue [SFX Deluxe]

Drag a Script Cue into a cue list and enter the cue property window.    (Right click)  Type in and save:

display "Hello again!"

Click on the cue you just created and press GO.



Use Telnet and connect to LOCALHOST 3801. You'll have to first enable Telnet in File | System Properties in SFX.  After you establish your connection, type in:

display "This is getting old" [Press ENTER]

Shut Me Down

Lets say you have a number of SFX systems that you would like to shut down remotely.   You could just cut the power, but computers tend to like going away gracefully.    Well assume you have the computers networked together and that SFX is listening to Telnet on all the slaved systems.   From the master, create a Telnet command that will send Exit Shutdown to each listening computer.    SFX Script will process that command, exit SFX and shut down the computer.

Example Cue

Telnet Command:   Exit Shutdown sent to SFX System 1
     Wait 0
Telnet Command:   Exit Shutdown sent to SFX System 2
    Wait 0
Telnet Command:   Exit Shutdown sent to SFX System 3
    Wait 10
Script Command:  Exit Shutdown

This cue will send the shutdown command to system 1, 2, 3, wait 10 seconds, and shut itself down.

You could get a bit fancier using the scripting language to listen for each system to respond to the shutdown command, set flags and if a system didn't respond have SFX Script send out an email to the system administrator. I'll leave that exercise for you to play with.

Fire!  Fire!  Fire!

Take a look at this script to monitor a switch for an alarm condition:

// RelayManager
// This script is called by the SR RelayManager. To call it manually:
// e.g. For Device ID 1, Switch 2, ON
// EXEC SCRIPT "RelayManager" (1, 2, 1)
// Store the three parameters as more readable names.

private ASSIGN @DeviceID = @ARGS0
private ASSIGN @Switch = @ARGS1
private ASSIGN @State = @ARGS2

IF @State == 1 THEN
     IF @Switch == 8 THEN
         GO LIST "A" CUE "FIRE"

I bet that's pretty easy to figure out.   If switch 8 is pushed, play the cue FIRE in list A.

Example FIRE Cue

Volume Change:  Fade all cues out in 2 seconds
     Wait 3
Sound:  "Please do not panic but exit so you do not get burned by the raging fire."

If you just wanted to kill the show control system you could have modified the script to look like this:

IF @State == 1 THEN
     IF @Switch == 8 THEN

The name of this SFX Script is RelayManager and is executed from the Relay Manager monitoring the physical Stage Research USB Input device.    When connections are made, the Relay Manager sends these commands via Telnet to any SFX system listening to that port in SFX Script format.   Even without hardware you can test the response to these triggers by running the SFX Script manually.    Just type in:   EXEC SCRIPT "RelayManager" (1,2,1) in the Command Interface and press [ENTER].

Same Show, Different Cues

What if you have a show that has a different pre-show announcement for the matinee performance, or what about a show where a role or roles are played by different actors for different performances and you have sound effects dependent on the actors?  Or, how about a show that is sometimes run in English and at other times in Spanish?  In the past, most people just duplicated the entire show and swapped out the cues that were special except that if you changed something in one workspace, you had to remember to change in the others. Scripting gives us a cleaner solution.

In the following example, we have a show where a role is sometimes played by one actor and at other times by another actor.  So, what happens is that before the show the sound operator is told which actor is in the role for that evenings performance.  The operator starts SFX and opens the production and is immediately prompted with a box that says, Who is playing The President tonight?  There are two (or more) choices.  In this example, the choices are George Washington and Thomas Jefferson.  The operator selects the appropriate actor and then runs the show normally while SFX automatically selects the proper, special cues to play that belong to either George Washington or Thomas Jefferson.

How it Works

Start with your main cues list with all your effects.  Then, create an additional list for each actor (or performance or language). Title those additional lists exactly what your choices will be when you prompt the operator. For example: George Washington, Thomas Jefferson, English, Spanish, Matinee, Evening, or whatever.  In these special lists you will put the specific sound cues.

Now, create the following scripts:

1. First, a script is created called AfterOpen which holds special significance to SFX.  AfterOpen is automatically executed once a  Production is loaded:


ASSIGN @President = PROMPT "Who is playing the role of The President tonight?" CHOICE ("George Washington", "John Adams")

This statement prompts the user then stores the response in the @President variable.

2. Create a base script is that accepts a single parameter representing a cue number.  This script is not directly executed, but is actually execute from yet another script.

// PlayPresident


3. In your main list, at the point where you need to play the first specific cue, create a Script command and include the following statement:

EXEC SCRIPT "PlayPresident" (1)

The above script will execute the PlayPresident script and will automatically assign @ARGS0 to 1.  Below are examples for cues 2 and 3, so at the points where they need to play, create a new script command.

EXEC SCRIPT "PlayPresident" (2)

EXEC SCRIPT "PlayPresident" (3)

So, for each actor/language/show specific you need to play, you just create a script command in the main cue list with the above command and change the parameter.

Back to the Exhibit

There are numerous triggers through the exhibit that users unknowingly interact with providing a more realistic environment.   Some of these triggers even run random cues when fired!   While the show programming and design is pretty complex, the end results are worth every line of code.

Questions?   Take a look at the SFX Script Guide installed in the SFX folder and play.    Other resources are the Knowledge Base at our website, the SFX Users Group and support@stageresearch.com.  

Happy Scripting!