How to make a music synchronized game intro?

Hi I was wondering how to make a music synchronized game intro, let me show you what I mean :

I’m really good at making videos but not really scripting so that’s why i’m asking.

I’m planning to use TweenService for the animations but I have no idea how to measure precisely time to show the visualm effects, also I have no idea on how to make the bpm beats :sweat_smile:

I’ve searched on the devforum and no one has done something like this lol
Any help is appreciated !

Timings:

1.15s song starts
3.08s first letter A
3.12s second letter T
3.15s third letter M
3.22s 4th and 5th letter OS
4.08s logo disseapears
4.13s Menu appears

4 Likes

Anyone here ? Maybe i’m asking too much

you gotta go to the sound and check for time where specific beats happens and then do something ig

3 Likes

I think its just a matter of timing the gui to match the song it shouldnt be to hard but im a beginner scripter and havent touched on gui that much yet.

Off topic

(whats this song)

1 Like

Yea maybe I could use Heartbeat but i’ve never used this, and it’s so strange, I think i’ve seen some game have an animated intro, but there’s litterally no one talking about this on the devforum…

Btw the music is Calamity fortune by LeaF

Measuring the time per note depends on what note it is and the BPM. I think it’s 60 second through BPM to get one whole note.

The music is 200bpm, is there any way to count those BPM’s ??

I think this is possible with Playback Loudness API, but Im not sure how it would detect it

But there is a solution that might be help you, here a reply of a Solution from a post similar to your problem

2 Likes

You will have to manually get the timings unless you want to do some over-complicated analysis of PlaybackLoudness at run time (which isn’t worth the effort in your case.)
I would scrub through the sound file on a program like Audacity and write down in seconds where each beat occurs. Then put these timings in an array and compare the TimePosition of the sound to them as it plays.

As for the text appearing effect you could either:

  1. Make each letter an individual gui element and tween one in after the other in correspondence to your timings (if you wanted them to fade in)
  2. For a more simple effect you could just have one text label and increase the MaxVisibleGraphemes value after each beat, giving an easier typewriter effect.
1 Like

Thanks but I already have the BPM value (it’s 200BPM), this song is also a map from osu! and it’s a rythm game, but I have to find a way to use the bpm value

1 Like

Thanks ! I’ll use the first method, I already have the timings in that video but how can I be sure that the timing in roblox is perfect ? I was planning to use Heartbeat but it’s relying on framerates and if someone plays in 30hz / 144hz it will mess up the animation

If a song is 200 beats per minute then a beat occurs every
200/60 = 0.3 seconds

How about adding a new letter every 0.3 seconds?

1 Like

Oh yea I already have the timings but they’re not exact with the BPM, 200BPM is the BPM of the entire song

btw 1 sec i’mma get my timings

1 Like

1.15s song starts
3.08s first letter A
3.12s second letter T
3.15s third letter M
3.22s 4th and 5th letter OS
4.08s logo disseapears
4.13s Menu appears

its all about the start and the end of the song, you have to see when the beats start and end and script the UI at the time the beats happen

i sound one of those teacher who teaches in the most hard way possible but this is the easiest way i can think of it

1 Like

If you want timings to be perfect, instead of counting frames you could save the current tick() when the song is played (which is the epoch time in seconds) and on every RunService.RenderStepped check to see if the difference between the new and old ticks is enough to trigger a timing, then reveal a letter if so. (use a debounce)

1 Like

Thanks, i’m going to start coding it later, if I have any more questions/problems i’ll respond to this reply

1 Like

Maybe a simple, and not so effecient way is to connect a function when the song starts, then wait(3.08) and here maybe Tween:Play() then wait(0.4) and so on. You can test this as I’m not sure if it’s really efficent or not.

1 Like

Could be a solution but wait() is not precise enough ( I heard that on a thread)

I think the easiest way for me is to find a way to count milliseconds precisely

And therefore I don’t think it’s really that efficent. Wait() is only 30/sec. So if you were to put some code that would run for 1 second in a loop and put wait(), it would only run it 30 times. The minimun of time you can wait is 0.03 seconds, but when it happens on the client and not the server, it should probably be effecient enough. Else, RunService.RenderStepped is another way.

1 Like