Partager via


Audio Scripts Sample

The Audio Scripts sample demonstrates how an application and a DirectMusic script work together. The script reads and writes to variables in the application, and the application calls routines in the script that play segments.

The sample also demonstrates how waveforms can be played as variations in a segment.

Path

Source: (SDK root)\Samples\C++\DirectMusic\AudioScripts

Executable: (SDK root)\Samples\C++\DirectMusic\Bin

User's Guide

Select ScriptDemoBasic.spt from the Script File list box. Play a segment by clicking Routine 1. Click Routine 2 to play an ending and to stop playback. Play the segment again and click Routine 3 several times. Note how Variable 1 reflects the number of times the button has been clicked, and how the music changes in response to each click.

Select ScriptDemoBaseball.spt from the Script File list box. Click Routine 1 to play various calls from a vendor. Click Routine 2 to play various musical motifs. Change the score by entering different values in the Variable 1 and Variable 2 text boxes. Click Routine 3 to hear the score.

See Also

© 2004 Microsoft Corporation. All rights reserved.