Scripts
A script is a collection of variables and routines written in a scripting language such as Visual Basic Scripting Edition or the simplified form of VBScript supported by the DirectMusic run-time library. Scripts are used in conjunction with a compiled application to play sounds and perform other basic tasks within the performance created by the application. An application can load a script, set and retrieve variables defined in the script, and call script routines.
The purpose of scripts is to give you, the sound designer, more immediate control over the soundtrack in an application.
For example, suppose you have created a segment of background music for a scene in a game where the level of tension can rise and fall. You want the music to reflect the level of tension by changing tempo. If you're not using scripts, you work with the developers to ensure that the application code sets an appropriate tempo in various situations. But when you test the game, you discover that the tempo is not fast enough when the game hero is in an exciting situation. You then have to ask the application developers to put in a new tempo value for that situation, then wait for a new build of the product so you can test it.
With a script, things work differently. As the project is being developed, you ask the developers not to set the tempo directly, but instead to set one or more variables in your script and then call routines that use those variables.
For example, you might have a variable called ExcitementLevel that specifies the type of situation, and a routine called MakeExcitement that sets the tempo based on the value in that variable. If you discover that the tempo is not fast enough when the situation is most intense, simply change how MakeExcitement deals with the maximum value in ExcitementLevel. You might even decide to change the response completely—for example, by playing a different segment. Whatever changes you make are reflected immediately in the current build of the application, because nothing in the application itself has changed.
More information