L
L
LittleBob2022-03-08 18:33:29
Java
LittleBob, 2022-03-08 18:33:29

How to convert beats per minute (bpm) to milliseconds?

I need to do something like a metronome in Java.
The bottom line is that the user enters the number of bpm (beats per minute), and the method that creates a delay in the sound playback loop takes the number in milliseconds. I need to proportionally convert bpm to delay in milliseconds.
I don’t understand how to do this, because the number systems are completely different.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Karabanov, 2022-03-08
@LittleBob

There are 1000 milliseconds in one second.
There are 60000 milliseconds in one minute
. Let's say there are 120 bpm, then 60000 / 120 = 500 , that is, one beat every 500 milliseconds.

R
Rsa97, 2022-03-08
@Rsa97

What is the number system?
Different units of measurement - minutes and seconds, but nothing prevents you from converting from one unit to another.
1 beat per minute = 1 beat per 60 seconds = 1 beat per 60,000 milliseconds.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question