API ReferenceGE Extensionsflowgraphnodesaudio
Audio Channel Fade (Flowgraph Node)
- **Node Name:** `Audio Channel Fade`
Overview
- Node Name:
Audio Channel Fade - Icon:
audiotrack - Category: (default - no explicit category)
- Tags:
sound,audio,volume - File:
extensions/flowgraph/nodes/audio/fade.lua
Fades the volume for a given audio channel with detailed controls for direction, duration, and volume range.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
flow | flow | - | Main flow input |
fadeDown | flow | - | Start fading down to silence |
fadeUp | flow | - | Start fading up to previous volume |
duration | number | 1 | Duration of fade in seconds |
channel | string | AudioChannelMaster | Audio channel to fade |
volumeMin | number | 0 | (Hidden) Minimum volume (0–1) |
volumeMax | number | 1 | (Hidden) Maximum volume (0–1) |
Output Pins
| Pin | Type | Description |
|---|---|---|
fadeDone | flow | Fires when fade completes |
volume | number | Current volume value |
Legacy Pin Mappings
fadeTime→duration,fadeIn→fadeDown,fadeOut→fadeUp
Behavior
work()- Requiresflowto be active. Detects changes betweenfadeDown/fadeUptriggers and starts a timer-based interpolation.fadeDownlerps from current volume tovolumeMin.fadeUplerps from current volume tovolumeMax(or channel's base volume).- Uses
Engine.Audio.setChannelVolume()with override flag. - Sets
fadeDonetotrueonce the timer exceeds duration.
_executionStopped()- Restores the channel's override volume to its current actual value, then resets.
Notes
- Uses
self.mgr.dtRealfor timer updates (real time, not sim time). - Manipulates channel volume via a self-timer for backwards compatibility.
See Also
- Audio Fade In (Flowgraph Node) - Related reference
- Audio Fade Out (Flowgraph Node) - Related reference
- Play Sound (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide