# Musical note durations in milliseconds

To find the duration of a musical note use the following formula: $\tau(n) = \frac{60000 \times 4 \times n}{\text{BPM}}$ where $\text{BPM}$ is the beats per minute of your song and $n$ is the note fraction, i.e. $n \in \big\{\frac{1}{1}, \frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \frac{1}{16}, \cdots \big\}$.

The “beat” in “beats per minute” refers to a quarter note: a tempo of 120 bpm will give you 120 quarter notes to a minute. There are 60’000 milliseconds in a minute, meaning each quarter note will take $\frac{60000}{120}$ or 500 milliseconds. If you want half-notes, double it — 1000 milliseconds. If you want eighth notes, divide it by two — 250 milliseconds.

Incidentally, you can also see why 120 bpm is such a popular choice for electronic music and a default setting on most DAWs: the millisecond durations of notes down to sixteenth are nice round numbers.

This is important because quite often you want to set the parameters of your instruments or effects in such a way, that they play nicely with the entire song. You can set your delays to eighths or sixteenths for a nice rhythmic delay effect.

It is super important in compression. The release knob on a compressor was a mystery to me. My usual approach was: set it to “auto” if possible, or fiddle about with the release duration until it sounds decent and the VU meter jumps in rhythm with the music. Well, not anymore: set it to a multiple for a sixteenth note, and you will quickly get that nice compression pump.

Lastly, you can also get durations for dotted notes (great for decay applications) using this formula. Just remember that a dotted note’s duration is 1.5-times longer than of the not dotted note.

So for example:

\begin{align*} \text{dotted}(n) &= n + \frac{n}{2} \\ \tau(\text{dotted}(1/4)) &= \frac{60000 \times 4 \times (\frac{1}{4} + \frac{1}{8})}{\text{BPM}} \\ \tau(\text{dotted}(1/4) | \text{BPM} = 120) &= \frac{60000 \times 4 \times (\frac{1}{4} + \frac{1}{8})}{120} \\ &= 750 \end{align*}