Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
Break it up 60 BPM means 60 beats will play in one minute. In your application, 4 steps = 1 beat therefore 240 steps play each minute. 120 BPM means 120 beats per minute, 480 steps per minute. Use BPM/60 With this math you can easily do it now ;) To make it play at certain times, use a delay such as setTimeout, fake fetch, or use requestAnimationFrame and limit/delay the frames. SetTimeout is the easiest IMO since your timing wont rely on any animations.
21st Mar 2022, 8:00 PM
「HAPPY TO HELP」
「HAPPY TO HELP」 - avatar
+ 2
you're welcome!
21st Mar 2022, 8:03 PM
「HAPPY TO HELP」
「HAPPY TO HELP」 - avatar
+ 1
Make the design responsive. It goes off screen in phones.
21st Mar 2022, 9:47 PM
Bob_Li
Bob_Li - avatar