Tempo
Usually the tempo is given as BPM — beats per minute.
Where the tempo indication is shown as:
"a note symbol that has the length of a beat, equal-sign, number (BMP)"
By definition the BPM is the number of beats per minute. Putting this into an equation:
"BPM" = "beats" / "time in minutes"
Rearranging the equation:
"time in minutes" = "beats" / "BPM"
But if you'd rather have time measured in seconds, you'll have to multiply by 60 (seconds / minute):
"time is seconds" = 60 x "beats" / "BPM"
[1]
Time Signature
Simple
The upper number in a simple time signature is equal to the number of beats per bar. The lower number is equivalent to the note symbol that is the length of a beat.
"upper number of simple time signature" = "beats" / "bars"
Rearranging this equation:
"beats" = "upper number of simple time signature" x "bars"
[2s]
Compound
However, in a compound time signature the upper number is equal to the number of pulses per bar. The lower number is equivalent to the length of a pulse.
"upper number of compound time signature" = "pulses" / "bars"
Rearranging:
"pulses" = "upper number of compound time signature" x "bars"
In a compound time signature three pulses is equal to one beat; so the number of beats is equal to the number of pulses divided by three:
"beats" = "pulses" / 3 = ("upper number of compound time signature" / 3) x "bars"
[2c]
Results
Putting [eqn 2s], and [eqn 2c], into [eqn 1] we get:
"time in seconds" = 60 x "upper number of simple time signature" x "bars" / "BPM"
[3s]
&
"time in seconds" = 60 x ("upper number of compound time signature" / 3) x "bars" / "BPM"
[3c]
In Symbolic Notation
Considering N
bars of (a simple time signature) Y/Z
, @ Z = X BPM
:
"time in seconds" = 60 x Y x N / X
[3s]
Considering N
bars of (a compound time signature) W/Z
, @ Z = X BPM
:
"time in seconds" = 60 x (W/3) x N / X
[3c]
Concrete examples
Considering 1 bar of 4/4, @ quarter note = 120 BPM (eqn 3s):
"time in seconds" = 60 x 4 x 1 / 120 = 2
Considering 2 bars of 3/4, @ quarter note = 120 BPM (eqn 3s):
"time in seconds" = 60 x 3 x 2 / 120 = 3
Considering 4 bars 6/8, @ dotted quarter note = 120 BPM (eqn 3c):
"time in seconds" = 60 x (6/3) x 4 / 120 = 4
Considering 1 bar of 4/16, @ sixteenth note = 120 BPM (eqn 3s):
"time in seconds" = 60 x 4 x 1 / 120 = 2
So what went wrong with the last example?
Some DAWs will prefer to show the tempo as:
"*quarter note*, equal-sign, number (BMP)"
But the correct tempo indication has a note symbol that is the length of a beat:
"a note symbol that has the length of a beat, equal-sign, number (BMP)"
With the time signature 4/16, a beat is not a quarter note; a beat is clearly a sixteenth note.
(Some DAWs will be able to get away with this sloppiness because most of the users will usually use the time signature 4/4, where a quarter note is a beat.)
Better readability
Here is a paste bin with the above formulas for better readability
https://mathb.in/77587