Sound tracks can be added to sequences, together with audio effects on that track. The simplest way to do this is by dragging a sound asset into the Canvas at the position where you want the sound to play.
This page covers the following topics:
You can add a sound track to a sequence in the following ways:
Every sound track in a sequence gets an audio emitter as well as an audio bus. You can move the audio emitter around on the sequence canvas to Position it.
You can also change the Volume and Pitch. The volume and pitch are that of the emitter (see Audio Properties Overview).
An audio emitter is shown on the sequence canvas using the emitter icon:
NOTE The position will influence how loud and from which direction the sound is heard. For this to work correctly, you also need to set an appropriate audio falloff model and update the listener position and orientation to where you want the sound to be heard. See Audio Emitters for more details.
You add all Audio Effects, except for the equaliser effect, as parameter tracks to audio asset tracks.
All audio effects that you add to an audio track are processed on an audio bus created for that track. You can configure the audio bus itself by adding it as a parameter track and changing the properties of that track.
An audio bus track can be added only once to an audio track, while effect tracks can be added multiple times.
NOTE You can add a maximum number of 8 audio effect tracks, as limited by the number of effect slots of the AudioBus Struct.
In The Inspector you can edit all general sound and emitter properties of a sound track as well as the settings of all its effects.
You can make changes to the Rotation here but it has no effect in-game as this isn't a property that can be set for an emitter.
NOTE All properties shown above apply to the emitter except the Loop Mode, which is a property of the sound instance.
All effects that you add to the audio track are listed under "Audio Effects" in the Inspector. You can change their parameters here, however their order can only be changed in the Track Panel.
Audio effects on an audio bus are applied in order and therefore the order of the tracks is important. The effect track at the top corresponds to the first audio effect to be applied to the bus and the effect tracks below the subsequent ones.
To reorder audio effects, click and hold the left mouse button on an effect track to drag it to its new position:
NOTE Dragging parameter tracks only works for audio effect parameter tracks, not the bus track or any other type of parameter track.
Once your sequence is finished, you can add it to an asset layer in The Room Editor, creating one or more instances of it. A sequence instance will include an audio emitter for each sound track in the sequence, positioned relative to the instance's position.
For example, if you added an audio emitter to your sequence at position (0, 0) and you add an instance of that sequence to a room at a position (100, 200) then GameMaker will place the audio emitter at (100, 200), or (100 + 0, 200 + 0). If you have another audio emitter in another sequence at position (10, -30) and you add an instance of this sequence at (400, 50), this emitter will end up at the position (410, 20), or (400 + 10, 50 + (-30)). If you animated the emitter's position in the sequence, GameMaker will update its final position accordingly.
By adding the sequence position (and possibly also rotation) to the emitter position it is moved from "local" space (its position defined relative to the sequence) into "global" space (its position defined relative to the room origin).
So you can place two instances of the same sequence in a room and the audio emitter in one will be heard on one side and the other one on the other side (despite the two emitters both having the same "local" position).