#Audio
Games play sounds, and a sound is made from an audio file. Pools, chains and cues combine sounds:
- Audio file: an MP3, OGG or WAV from your asset library. It's raw material; nothing plays it until a sound does.
- Sound: plays one audio file, on the SFX channel unless you set it to Music.
- Pool: a set of sounds; each time it plays, it picks one, at random or in order. Use it for clicks or footsteps that shouldn't sound the same every time.
- Chain: sounds and pools on a short timeline, each starting at its own time.
- Cue: a named list of audio commands, such as "fade the music out, play the win chain, bring the music back".
Buttons and other controls can play any of them; see buttons and actions.
#Audio mode
In the editor, switch Scene | Audio in the top bar. Audio mode replaces the scene panels with the game's audio; the stage stays loaded, so switching back is instant. Your changes save with the rest of the game, and Undo and Redo work in both modes. ▶ Play goes back to Scene mode and plays the game.
The left panel is the audio library:
- Audio files lists this game's audio files.
- Upload audio… uploads a file to your library and adds it to the game; it works like adding assets.
- Add from library adds an audio file you've already uploaded.
- Sounds, Pools, Chains and Cues list the game's items. Each list has + New and a search box.
- A new sound asks which audio file it plays.
- A new pool or chain starts with the selected sound (or the game's first one), so make a sound first.
- A new cue starts empty.
- Each row shows how many places use it: its uses count. Hover over it to see them, or select the row to list them on the right under Used by. A file's uses are the sounds made from it; a sound's are the pools, chains, cues, buttons, scene events and actions that play it.
- Sounds and files that came with a component are listed under From component name. They're read-only.
Select an item to see it in the middle and its uses on the right. The editors for each kind (trim and fades for sounds, the pool and chain editors, cue commands, and a mixer for the channels) are on their way.
#Listening
▶ next to any file, sound, pool, chain or cue plays it, and ■ stops it. The editor plays audio with the same audio engine your game uses, through the game's channel levels, so what you hear is what players hear. Only one item plays at a time.
Browsers allow sound only after you've clicked or pressed a key on the page, so the very first ▶ may take a moment.
The stage itself is always silent while you edit. To hear the game with its own sounds, use ▶ Play or Preview.