Chester Jankowski

Calculating MIDI note numbers in your head

I can think of a few reasons why you might want to be able to translate between scientific pitch notation, or SPN, staff notation, and MIDI note numbers quickly, in your head, without looking at a table. Maybe you’re a composer doing algorithmic composition, maybe you’re working with a MIDI roll in a DAW, maybe you’re a computational musicologist, or maybe you just want to impress your students (:eyeroll:). To do this, two things are required: 1) know the multiples of 12 (either by rote memorization, or with a quick mental calculation); 2) instant recall of pitch class numbers.

Scientific pitch notation vs MIDI

The key thing to note is that SPN and MIDI note numbers both work on assigning the different octaves of pitch class C to multiples of 12. The hitch is that they are off by 12 with respect to each other. Middle C in SPN is designated as C4, while in MIDI, middle C is note number 60, or 5×12, or the 5th octave.

C1 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
0 12 24 36 48 60 72 84 96 108 120

So, to translate a C from SPN to MIDI, just add 1 to the octave. C2 becomes 12×3, or MIDI note 36. Now, to translate any note name in SPN to MIDI, we just need to add the pitch class number of the note to the number for C in the correct octave, and we are done.

Some examples:

To find the MIDI note for G3, we need to know that the pitch class number for G is 7, which we add to the next higher multiple of 12 :

G3=(12×4)+7=55

To find E9, we need to add 3, the pitch class number for E, to the 10th multiple of 12 :

E9=(12×10)+3=123

Now, let’s do the reverse. For MIDI note number 89, we see that it is between 84 and 96, so that it is the 7th MIDI octave. That means it will be in the C6 octave in SPN. 89=84+5 , so the pitch class is 5 , which is the pitch class F . So the SPN name for this note is F6 :

89=(12×7)+5=F6

Memorizing, or quickly calculating, multiples of 12

OK, that is straightforward, but what if you don’t have pitch class numbers or multiples of 12 memorized? In the case of pitch class numbers, there’s no way around it. These need to be memorized in order to work effectively with music theory past, say, the 1960s. As for multiples of 12? I did a quick poll on Mastodon, and over half the respondents indeed had their “12 times tables” memorized since school days. So where does that leave the rest of us?

Let’s take a look:

0 1 2 3 4 5 6 7 8 9 10
0 12 24 36 48 60 72 84 96 108 120

The first thing we might notice is that the last digit follows a repeating sequence: 0,2,4,6,8,0,2, . This on its own is a fact worth remembering, and it may even be enough of a hint for you to easily remember this whole list!

Now, let’s look at the sequence 12,24,36,48. Notice that the second digit is always twice the first digit. And in fact, that pattern keeps going, but, while we have the numbers twenty-four, thirty-six, forty-eight, we don’t have the numbers fifty-ten, sixty-12, seventy-fourteen, etc., so at that point, we need to perform addition, like so:

12=(1×10)+(1×2)24=(2×10)+(2×2)36=(3×10)+(3×2)12m=(m×10)+(m×2)

So now, even if you don’t have the table memorized, you can quickly do the math in your head.