Skip to main content
Version: Next (dev)

Audio Events

An Audio Event is the unit of sound gameplay plays. Instead of referencing a raw .wav, gameplay fires an event, and the event decides which sample plays, how loud, at what pitch, how it is spatialized and where it is routed.

Create one with New → Audio Event, or by importing a sound file (right-click a .wav/.mp3 → Import → Audio_Event).


The Audio Event window​

The window is split into four areas:

AudioEvents.png

The timeline shows the shape of the event over time; the deck edits whichever instrument, parameter or automation is currently selected. The Event Macros dock on the right holds settings that apply to the event as a whole.


Instruments and playlists​

Instument.png

An event contains one or more instruments. Each is a track on the timeline and plays independently, so layering a gunshot from a body, a tail and a mechanical click is simply three instruments with different start delays.

Creating one​

  1. Click + Instrument. An empty track appears and becomes the deck's active instrument.
  2. In the deck's INSTRUMENT column click + Add Files… and select one or more sound files.

Selecting several files at once creates a multi sound: one instrument with several playlist entries that it picks between. If the instrument has no name yet, it is named after the files' common prefix (rifle_shot_01.wav, rifle_shot_02.wav, … → rifle_shot).

The playlist​

Each row in the INSTRUMENT column is one playlist entry:

ElementPurpose
File nameClick to select the entry (its properties appear in DETAILS).

| + Add Files… | Append more sound files. | | + Silence | Append a weighted silence entry — a chance that the instrument plays nothing. Useful for making repeated sounds feel less mechanical. |

An entry with no file is a silence entry and shows as — silence —.

Playback settings (PLAYBACK column)​

SettingMeaning
Playlist modeRandom (weighted pick, repeats allowed), Shuffle (no repeat) (weighted, avoids playing the same entry twice in a row), Sequential (round-robin through the list).
Volume randomizationApplied per trigger as ± dB around the instrument volume.
Pitch randomizationApplied per trigger as ± semitones. This is what stops repeated footsteps sounding identical.
LoopRe-triggers the playlist for as long as the event is active.
Start delayDelays this instrument relative to the event start.
Retrigger gapWith Loop on, waits a random time in this range between repeats. Zero-to-zero on a single-entry instrument loops seamlessly.

Three common recipes:

  • Footsteps — one instrument, several samples, Shuffle, ±1.5 dB and ±2 semitones.
  • Ambience bed — one instrument, one long sample, Loop on, retrigger gap 0–0 (seamless).
  • Scatterer (occasional bird calls, distant creaks) — one instrument, several samples, Loop on, retrigger gap e.g. 2–8 seconds.

Track headers: rename, mute, solo​

ActionResult
Click a track header or clipSelects that instrument for the deck. The selected row is tinted, gets an accent bar down its left edge and a white track name.
Drag a clip left/rightMoves the instrument along the timeline, changing its StartDelay. A badge shows the new start time while dragging, and the event's end (and therefore the stop-fade marker) follows live. Snaps to 10 ms; one undo step per move.
Double-click a track headerRename the track inline.
M buttonMute the instrument. This is saved with the asset and the instrument is skipped at runtime too — a genuinely disabled channel, not just an editor preview.
S buttonSolo. Editor-only and not saved; with anything solo'd, only solo'd tracks are auditioned.

Muted or solo-silenced tracks draw dimmed with a dashed outline, and their header reads muted or silenced (solo).

Clip length​

A clip's width is the decoded duration of the longest entry in its playlist, so the timeline is a true picture of how long the event runs. The track header prints the measured length (-> Master · 1.84s).

If a file cannot be decoded — usually a missing file or one outside the project's data directories — the header shows length ?, the clip falls back to a placeholder width and its right edge is marked with a dotted amber tick so it is never mistaken for a real measurement.


Timeline: loop region and fades​

The Logic row under the tracks holds the event's timing markers. All of them are draggable.

MarkerMeaning
Loop region (highlighted band)Only shown when LoopRegion is enabled in Event Macros. A looping event repeats this window instead of replaying from the beginning. Drag the edge handles — grab them in the ruler.
fade in (green)The event's FadeIn: every voice fades up over this time when it starts.
stop fade (orange)The event's StopFadeOut: how long voices take to fade out when the event is stopped. Anchored to the end of the event's audio.

A dashed end line marks where the last instrument stops sounding; the timeline's length always matches its contents, so moving a clip later extends the event and carries the stop-fade marker with it.

On short events the two fade labels shorten automatically, and if there is still no room the stop-fade label moves to the right of the end line rather than overlapping.

Instruments that start before the loop region play once and are not repeated — only instruments starting inside the window are re-armed each cycle.


Parameters and automation​

Parameters let gameplay shape a sound while it plays — a weapon that sounds different at distance, an engine that changes with speed.

Adding a parameter​

Click + Parameter in the tab strip. Each parameter has a name, a Min/Max range and a default. Clicking a parameter's tab selects it so you can edit those values in the deck.

The parameter named Distance is special: the engine feeds it the distance from the event's game object to the listener automatically, every update. You do not have to set it from script.

Automating a property​

In the deck's AUTOMATION column use + automate property… and choose e.g. Volume by Distance or Pitch by Intensity. The curve appears as a chip in the timeline's Automation row and opens in the curve editor.

The curve editor is interactive:

GestureResult
Drag a pointMoves it.
Double-click empty spaceAdds a point there.
Right-click a pointDeletes it (a curve always keeps at least two points).

The horizontal axis spans the parameter's authored Min…Max; the vertical axis is a multiplier applied to the event's volume or pitch, with a dotted line marking 1.0 (no change).

Setting parameters from gameplay​

A parameter can get its value in two ways: on one audio entity, or globally for every event.

On an entity. These values apply to the events of one game object's audio proxy:

  • Call SetEventParameter(ParamName, Value) on the plAudioTriggerComponent.
  • Or add a plAudioRtpcComponent next to the proxy, set its Rtpc to the parameter name and its InitialValue, and call its SetValue(Value, Sync) from script.

An entity value stays on the entity: events that start on it later get the value too, until it is reset. When an Audio RTPC component is deactivated, it drops its value from the entity, so the entity's events fall back to the global value or the authored default; when it is activated again, it sends its current value again.

Globally. A global value applies to every event that has a parameter of that name, on any entity, including events that start or load later. Typical uses are a game-wide Intensity, TimeOfDay or Health parameter.

  • Add a plAudioGlobalParameterComponent anywhere in the scene. Set Parameter to the name and InitialValue to the value it sets when the simulation starts. Call SetValue(Value) and GetValue() on it from script. Deactivating the component leaves the global value as it is, because a global parameter has no "unset" state.
  • Or, from a script, call SetGlobalParameter(Name, Value) and GetGlobalParameter(Name) in the Audio script class (visual scripts list them under Audio).
  • From C++, call plAudioSystem::GetSingleton()->SetGlobalParameter(sName, fValue, bSync). GetGlobalParameter(sName) returns the value last set (0 if none was) and TryGetGlobalParameter(sName, out_fValue) returns false for a name that was never set. Both answer on the main thread from the values the game set, not from the backend. Values set before the audio system starts are sent when it starts.
Component propertyDefaultDescription
ParameteremptyName of the global parameter. Nothing is sent while it is empty.
InitialValue0Value set when the simulation starts.

Precedence. A playing event takes each parameter's value from the first of these that has one:

  1. A value the engine computes itself, such as the reserved Distance parameter.
  2. The value set on the event's entity (SetEventParameter or an Audio RTPC component), until it is reset.
  3. The global value.
  4. The parameter's authored default.

Each event clamps the value to its own Min…Max; the stored value is not clamped, so the same global can feed events with different ranges. A name that no event uses is kept and ignored, and events loaded later pick it up. A value set on the global audio entity (the one fire-and-forget sounds use) counts as an entity value, not a global one. With FMOD, global parameters follow FMOD Studio's own rules instead.

See Scripting for the full script API.


Auditioning​

▶ Play plays the event in the editor immediately; ■ Stop silences it. The OUT meter in the toolbar shows the output level with a peak-hold marker and a dB readout.

Audition respects per-track M and S, picks playlist entries with their real weights, applies volume/pitch randomization and honours start delays — press Play repeatedly to hear the randomization.

Two deliberate differences from in-game playback:

  • Audition is a flat 2D mix: it does not route through the mixer, so bus volumes, insert effects, sends and snapshots are not applied.
  • Scatterer and multi-entry looping instruments play a single iteration rather than repeating forever.

To hear the full mixed result, play the scene.


Event Macros reference​

The right-hand dock holds settings for the event as a whole, grouped into sections.

Routing​

PropertyDescription
OutputBusName of the mixer bus this event plays into. Empty routes to Master. Must match a bus in the loaded mixer.

Polyphony​

PropertyDescription
MaxInstancesHow many copies of this event may play at once. 0 means unlimited.
StealingWhat happens when the limit is reached: Oldest stops the longest-playing instance, Quietest stops the least audible one, None refuses to start the new one.

Lifetime​

PropertyDescription
CooldownMinimum time between two starts of this event. Prevents machine-gun retriggering.
FadeInFade-up time applied to every voice when it starts.
StopFadeOutFade-down time when the event is stopped.
LoopRegionEnables the timeline loop window.
LoopStart / LoopEndThe window, in seconds. Only shown when LoopRegion is on; easier to set by dragging on the timeline.

Spatializer​

PropertyDescription
SpatializeOff makes the event 2D (UI, music, narration). The remaining properties only apply when on.
MinDistanceDistance up to which the event plays at full volume.
MaxDistanceOuter distance used for the attenuation range.
RolloffAttenuation exponent. The property row draws the resulting curve — drag inside it to shape the falloff.
DopplerFactorPitch shift from relative motion. 0 disables it.

See Spatial Audio for how these interact with occlusion and reverb zones.


Instrument property reference​

These appear in the deck and in DETAILS when an instrument is selected.

PropertyDescription
NameTrack name (also set by double-clicking the track header).
StartDelaySeconds after event start before this instrument plays.
PlaylistModeRandom / Shuffle / Sequential.
LoopRepeat the playlist while the event is active.
MuteDisable this channel entirely, in the editor and at runtime.
MinRetriggerDelay / MaxRetriggerDelayRandom gap between loop repeats.
VolumeInstrument volume in dB.
VolumeRandomization± dB applied per trigger.
PitchInstrument pitch in semitones.
PitchRandomization± semitones applied per trigger.
PlaylistThe entries (edited through the deck's playlist rows).

Playlist entry​

PropertyDescription
FileThe sound file. Empty = silence entry.
WeightRelative pick probability.