# Time between beats in a 60 bpm song [closed]

I am a software developer and I have no knowledge of music theory, and I'm bad at maths..

I'm developing a very simple music production software which allows users to customise the bpm - I'm trying to calculate the period of time between two beats in a, for instance, 60 bpm song. How can I calculate this?

## closed as unclear what you're asking by Tim, user19146, Dom♦Apr 30 '17 at 3:36

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• This shows no effort at all has been made to provide any research at all by the OP. – Tim Apr 29 '17 at 19:55
• Welcome to Music Stack Exchange. The site welcomes focused and well thought out answers and questions. I am informed that this is your first question here, though from the fact that you have already earned some points you have evidently already done some answering. Your question above is a bit vague, as in some sense there is no time "between" beats. Each beat lasts till the next one. You'll probably get a variety of replies. Hang in there! – L3B Apr 29 '17 at 22:17
• @L3B Actually, you can stalk a user in horrifying detail. In this case, his points are from this question alone, as can be seen in the complete reputation history! Not that it is of any relevance, but it can be useful to know. :) – pipe Apr 29 '17 at 23:48
• Why, as someone with no music theory, are you doing this? – JimM May 1 '17 at 10:37

I am not sure I got your question right, but BPM actually means Beats Per Minute. So I suggest using this to get the seconds between two beats :

In your case it makes sense that with 60 beats per minute you have 60/60 = 1 second between each beat.

Technically, a beat in music lasts from the beginning of the beat to the beginning of the next beat. So there is NO time between beats.

However, that's being nit-picky. What you probably mean is how far is it from the beginning of one beat to the beginning of the next beat. In which case 60bpm means exactly one second per beat.

If your programming language measures time in milliseconds — as most languages do, with functions such as delay(period), sleep(period), wait(period), setTimeout(what,period), setInterval(what,period) and so on — and you want to calculate the `period` between beat onsets for `bpm` beats per minute:

`period = 60000.0/bpm`

That’s sixty thousand milliseconds per minute divided by the number of beats per minute, to get the number of milliseconds per beat.

For 60 bpm, this works out to `period = 60000.0/60 = 1000` milliseconds, amounting to a neat second for each beat.

For 70 bpm, in comparison, it would be `period = 60000.0/70 = 857.142857` milliseconds, or 6/7 of a second per beat.