This adds a singleton Node to your project that plays music, even across scene changes.
- Install the plugin through the Godot asset manager.
- Enable the plugin
- Add the node to the Autoload
- Music is loaded by default from "res://music". This can be changed with:
MusicController.TRACKS_LOCATION = "res://your/path/to/music"
MusicController.load_tracks()
This does not read in tracks from subfolders.
- Start a track with
MusicController.switch_track("trackname.ogg|mp3|wav")
Tracks loop forever until switched. Need an example? See github for a simple example project.
Right now, the player just plays a single track in a loop. Future plans include
- Next/Previous track movement
- Loop/Shuffle/Ordered playthough
- Track playlists