1001Ferramentas
🎼Converters

Note to MIDI Number

Convert a musical note (like A4 or C#3) into its MIDI note number. Handy when programming synths, sequencers and virtual instruments.

MIDI nº

From note names to MIDI numbers

Sequencer, plugin or library: sooner or later everything asks for the note number rather than the note name. You want to play middle A and the field expects 69. Type A4 here and the number shows up right below, updating on every keystroke. It is handy for filling a note array quickly, checking what a controller is sending, or moving a bar of sheet music straight into code.

The arithmetic is plain: pitch class is 0 for C, 2 for D, 4 for E, 5 for F, 7 for G, 9 for A and 11 for B; a sharp adds one, a flat removes one; then you add the octave plus one, multiplied by twelve. That locks in the convention where C4 is 60 and A4 is 69, the same one Ableton and most plugins use. C-1 gives 0 and G9 gives 127, the exact ends of the MIDI range.

The accepted format is strict: an uppercase letter from A to G, an optional # or b, and the octave as a whole number with a minus sign when negative. Typing a4 in lowercase, F## or the sharp and flat symbols returns a dash instead. The range is not checked either: C10 shows 132, a number no MIDI gear accepts, so verify yourself that the result sits between 0 and 127. The maths runs in your browser.

Frequently asked questions

Is middle C 60 or 72 here?
It is 60. The tool uses the convention where middle C is C4, so A4 is 69. If your software calls middle C C3, subtract 12 from the result.
How do I write a flat?
An uppercase letter followed by a lowercase b: Bb3 returns 58, and Cb4 returns 59, the same as B3.
Can it go the other way?
No. This page only goes from note name to MIDI number, with a single input field.

Related Tools