Audio Events, New Animation Events but for sounds

Events

Introduction

"Hmm, what we have Animation Events but no Sound Events? :thinking: "
~ ItzMrRatsP

Alright, But really, why we don’t have something like “Sound Events”? Well… It doesn’t matter anymore!
Because I’ve made something that could replace this cool feature for now :cool:

Introducing Audio Events !!
An alternative for the Sound Events, Which we don’t have on roblox, yet…

How To Use

  • First, And most importantly… Import the module :smile_cat:
  • Alright now put the module in ReplicatedStorage
  • Now, listen carefully, or watch carefully… Now create LocalScript or Script and then you simply require the Module you just imported.

Here is an example of how to use this module

local Sound : Sound = path.to.Sound
local TimeEvents: {[string]: {Time: number, Value: string}} = {
	["Test"] = {Time = 5, Value = "Test"},
	["Play"] = {Time = 10, Value = "Play"},
	["Argue"] = {Time = 15, Value = "Test"}
}

local AudioEvents = require(path.to.Module).new(Sound, TimeEvents)

AudioEvents:GetMarkerReachedSignal("Argue"):Connect(function(Value: any)
     print(Value)
end)

Roadmap

Early 2025

  • Create Plugin for the Module so Its easier to use and Its more of automated process than manual process.

  • Improve on the Module, Also find better way to do Events instead of having table of Time Events.

Resource

Plugin (Early 2025)
Get Module

Socials

Follow ItzMrRatsP on Twitter
Follow ItzMrRatsP on Roblox

Credits

  • Data Orientated House for LemonSignal
14 Likes

Forgot to add this in, But you can use Destroy to destroy the events, Meaning after using Destroy nothing will be called, Because all of the events will be cancelled and all the connections will be disconnected.

Update 1.1 will come with plugin, So you won’t have hard time timing stuff :cool:

1 Like

Aren’t the sounds supposed to be linked to other things, such as animations, as opposed to the other way around? Is there a specific use case you had to make this?

1 Like

Yes, For example your music have some thunder sfx in it but you don’t have that specific sound effect as an separated audio format.

So you will check what time the thunder happens and boom, You make the screen go :sun_with_face:

2 Likes

Bro, thank you so much! I’ve been looking for something like this forever. :sob:

1 Like

No problemo, Have fun using it!

Would it be possible to store an event to a sound?

For example instead of finding a specific sound instance then setting the events to that specific instance, I can instead have code that runs when X event is reached but that X event is at different points for different sounds.
So if Sound1 has X event at 5 seconds, but Sound2 has X event at 10 seconds, I don’t need to

["Event"] = {Time = 5, Value = "X"}

Rather I can just

["Event"] = {Time = Sound.Time, Value = Sound.Value} --With Sound being a variable
1 Like

I think you could, But i need to try it myself.
Edit: You can try using attributes for it

Update:
I rewrote the AudioEvents module,
So here are the changes for the new update:

  1. For now, I removed the extra parameter called Markers, Instead you have to do module:addMarker(name, timeToHappend, value)

  2. Rewrote the whole module to work better, And easier for me to make plugin for, So i keep you updated on the progress for the plugin.

  3. Here is how to use the updated module: require(path.to.module)(soundInstance)

  4. I’ll upload a example when i have the time to do so