you gotta go to the sound and check for time where specific beats happens and then do something ig
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)
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
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:
- 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)
- 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.
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
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?
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.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
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)
Thanks, i’m going to start coding it later, if I have any more questions/problems i’ll respond to this reply
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.
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.
I checked on the roblox API Reference,
What’s better between RunService.Heartbeat or RunService.RenderStepped for an intro like this ?
Hi does someone know how TimePosition counts ?
like is 0.001 actually 1 millisecond ?
or it runs on 60hz ?