
Publisher
freekds
Audio Events
Audio Events provides a simple custom node that you can use to generate events at specific times when playing a sound. Simply create an AudioEventPlayer and attach an AudioEvents resource to it. In the AudioEvents resource, you can specify an audio file and the times at which an event (=signal) needs to be fired.
Godot Audio Events
A simple solution to generate events while playing a sound resource.
Ever wanted to recreate the silly koopa dance that is timed with the music (BAH BAH)?
With this solution that is possible!
Installation
AudioEvents is available from the offical asset library!
- Open Godot
- Navigate to
AssetLib
on the top - Search for
AudioEvents
- Download!
Alternatively, clone the repository and copy the addons/AudioEvents
to your own addons/
directory in the project.
Do not forget to enable the plugin in the Project settings!
How to use?
Create an `AudioEventPlayer`
Attach an `AudioStreamPlayer`. (alternatively, add the `AudioEventPlayer` as child to the `AudioStreamPlayer`)
Create an `AudioEventStream` resource under the `AudioStreamPlayer`.
Give the `AudioEventStream` resource an audio file as resource and (optionally) a name.
Fill the `Event Times` array with float numbers that indicate the time at
which an event needs to be fired. TIP: use the Audio preview feature on the audio source to have an idea of the timings.
Connect to the
soundEvent
signal from theAudioEventPlayer
Example
Open example.tscn
for a simple example.
Contributing
If anything is not working, please open an issue via the issue tracker on GitHub. Feel free to create a pull request with suggestions/bug fixes!
License
This project is MIT licensed, you can do whatever you want with it :)