Hey everyone, I have recently updated soundmarker and fixed its desync issues! Sorry it took so long to get around to. I have also updated the color scheme to be more neutral, so hopefully that is better! Let me know if there are any other issues. Thanks!
Original post
SOUND MARKER
Say hello to Sound Marker, a plugin designed to make adding sounds to animations much faster and easier.
It offers intuitive and easy to understand keyframe marker editing, with real time sound playback, so you dont have to playtest everytime to get it right.
Sound clips can be added to the animation timeline at specific keyframes. Each sound clip has properties that can be edited to better suite your animation. (StartTime, Volume, PlaybackSpeed)
All of the sound effects you’d like to use will be placed in a sound folder, which loads them all into the media pool for convenient access. Clicking these will allow you to place sound clips in the timeline.
Loading your animation with sounds is easy. All you need to do is export the animation, keep the sound folder, and use some code from the provided template. (Some of the template code is only required if you intent to load and use the extra audio settings.)
WHERE DO I SIGN UP?
If you think you’d like to try this plugin out, you can get it for FREE here: https://www.roblox.com/library/14139030488/Sound-Marker
To learn how to use it, continue reading!
TUTORIAL
When the plugin is first opened, you will be greeted with this prompt.
Select your animation or keyframe sequence, and your rig. It can be in any order, doesnt matter.
(I recommend duplicating your rig in case of unpredictible behavior!)
Once this is done, the plugin should fully open to reveal the full editor.
Clicking the play button (large button at bottom center with a right pointing arrow) will toggle the animation playback. Hitting space bar with the viewport in focus does the same thing.
If you selected an animation, and not a keyframe sequence, the plugin should have created a keyframe sequence, and parented it to the animation you selected. Like so.
The keyframe sequence is the purple one!
As you can see, there is also a sound folder within the keyframe sequence. This is where you will drag your sound effects into. After doing so, all sounds should appear in the media pool.
Alternatively, you can drag directly from the toolbox into the media pool.
Now that there are sounds in our media pool, we can click on them to generate a sound clip to add to our timeline.
Now, if you playback the animation from the beginning, we can hear the sound. You can do this by hitting the button below, or by clicking on the first keyframe in the timeline, and then pressing the play button.
MAKE SURE YOUR IN-GAME VOLUME IS NOT OFF! IF IT IS, YOU WILL NOT HEAR THE SOUNDS.
Great! Now you can playback the audio clip with your animation, and find that sweet spot.
If we click on the little edit button on a sound clip, we can adjust 3 settings.
These are optional settings that will be used in the animation later, if the specific code is used. These settings reflect in the live playback as well.
To move an existing sound clip, click on it and place it again.
To delete a clip, either right click it, or move it into the garbage can.
Once your animation sounds are how you like them, click on the publish icon, which looks like this.
This will open the export menu, so you can publish the animation to Roblox. Alternatively, you can right click on the KeyframeSequence, and click Save To Roblox.
Congratulations! You now have an animation with sound markers! Now, how do we use them? Well, we need some code, and the sound folder we used.
The code below is an example of what we’ll need to play the sounds.
-- this is used to get the extra information about the sound you are playing
-- at that particular keyframe. (starting point, volume, speed)
local function readSoundString(soundString)
local dataArray = string.split(soundString, "%")
return dataArray[1], tonumber(dataArray[2]), tonumber(dataArray[3]), tonumber(dataArray[4])
end
local animationTrack = --your loaded animation track.
-- connect marker events for each sound name.
for _, sound in soundFolder:GetChildren() do
animationTrack:GetMarkerReachedSignal(sound.Name):Connect(function(soundString)
local soundId, start, volume, speed = readSoundString(soundString)
local sound = Instance.new("Sound")
sound.SoundId = soundId
sound.TimePosition = start
sound.Volume = volume
sound.PlaybackSpeed = speed
sound.Parent = character.PrimaryPart
sound:Play()
sound.Ended:Wait()
sound:Destroy()
end)
end
We are setting up keyframe marker events for keyframe markers with the names of our sounds in the sounds folder. Each one of these keyframe markers stores data about the sound, which we need a function to decipher. That is what readSoundString does.
TUTORIAL CONT.
If you’d like to try an example of using an animation with sounds, get this script and open it: https://www.roblox.com/library/14148499621/Footsteps
You can follow along with this video to help: https://www.youtube.com/watch?v=_An5CqImAeo
CLOSING
This is my first plugin, so I hope you find it useful!
If you find any issues, let me know in the replies. I made it free so I am not obligated to maintain it, but I will do my best to fix any big annoyances and problems if they arise.
Plugin: https://create.roblox.com/store/asset/14139030488/Sound-Marker
Thanks, and enjoy Sound Marker.