Simple adaptive audio plugin for Godot 4.
- Download and extract the 'adaptive-audio' folder under the 'addons' directory.
- Switches the main tab to the Adaptive Audio view.
- Stops playing the current track.
- Adds a new track.
- Saves the current audio setup as an autoload.
- Loads a saved audio setup into the view.
Press 'Add Track':
- Set the track's name
- Assign the transition fade time (preview only)
- Drop the audio file in ogg, mp3 or wav format
- Optionally select the audio file using the file viewer
- Plays the track
- Removes the track and all it's layers from the view
Press 'Add Layer' from the bottom:
- Transitions to a single layer. If it's in the same track, the base track keeps playing and the previous layer fades out. If it's pressed from a different track, the current track stops and the next track is player with the current layer.
- Blends in the layer. If it's in the same track, the current layer adds up. Same behavior as 'Transition' if it's pressed from a different track.
- Removes the current layer.
Add as many tracks and layers as you like:
Also assign audio files, set fade times and test trantitions; play around...
Save the current setup:
It creates an AdaptiveAudio.tscn file and automatically adds it as an autoload in the current project.
If you close and reopen Godot you can load your saved saved setup:
Use the AdaptiveAudio
autoload singleton to call the methods from anywhere in your project.
The script has multiple methods but only the following ones are intended to be used:
play_track
: plays the BaseTrack. It can start playing using a single layer.transition_to
: transitions to a specific track.blend_layer
: blends a layer to a specific track.stop_track
: stops playing the current track and all its layers.
The rest of the methods are intended for the plugin's internal use.