Story Machine supports sound files in wav, mp3, and flac format. Sounds can be dragged from the Project pane to the Stage to create a Looping Sound, or from the Project to the Play Sound action or similar actions.

Categories

When a sound is played it can be assigned to a sound “category”: Sound Effect, Music, or Voice. Additionally sounds can be played in custom categories that are defined by you (see the Play Sound documentation).

Music, Voice, and custom categories are “mutually exclusive,” meaning that they only allow one sound in the category to be playing at a time. For example, if you play a sound as Music, and then later play a different sound as Music, the second sound will replace the first (with a cross fade). Similarly, a Voice sample will replace any other playing voice samples when it is played. You can define your own mutually exclusive sounds by creating custom categories.

The default Sound Effects category is not mutually exclusive. Multiple sound effect samples may be played at once, and are independent of each other.

Categories can also be used to stop sounds that are already playing. The Stop Sound action cann be used to end playback of a particular category without knowing exactly what sound is currently playing.

Volume

You may specify a volume (between 0 and 1) for sounds when you play them. The actual volume produced by Story Machine is a combination of three volume variables: the Master Volume, the Category Volume, and the sound volume. The Master and various Category volumes can be adjusted with the Set Volume action.

The purpose of this system is to allow for user-facing volume controls, for example in an in-game settings screen. A user may wish to lower the volume or mute just the background music, or increase the volume of voice acting relative to everything else.

Mixing

Story Machine automatically mixes sound and music into stereo output. It handles cross-fades, fades in and out, and volume management. The maximum number of sounds that may be simultaneously playing is 32.