MIDI Note Numbers

The MIDI protocol identifies notes using a 7-bit number. Below are the musical notes and their corresponding MIDI note number.

Octave numbering is not standardized. Therefore, “C4″ on one device may correspond to “C5″ on another.

 

Musical Note Note Number
(decimal)
Note Number
(hex)
C(-1) 0 00
C#(-1) 1 01
D(-1) 2 02
D#(-1) 3 03
E(-1) 4 04
F(-1) 5 05
F#(-1) 6 06
G(-1) 7 07
G#(-1) 8 08
A(-1) 9 09
A#(-1) 10 0A
B(-1) 11 0B
C0 12 0C
C#0 13 0D
D0 14 0E
D#0 15 0F
E0 16 10
F0 17 11
F#0 18 12
G0 19 13
G#0 20 14
A0 21 15
A#0 22 16
B0 23 17
C1 24 18
C#1 25 19
D1 26 1A
D#1 27 1B
E1 28 1C
F1 29 1D
F#1 30 1E
G1 31 1F
G#1 32 20
A1 33 21
A#1 34 22
B1 35 23
C2 36 24
C#2 37 25
D2 38 26
D#2 39 27
E2 40 28
F2 41 29
F#2 42 2A
G2 43 2B
G#2 44 2C
A2 45 2D
A#2 46 2E
B2 47 2F
C3 48 30
C#3 49 31
D3 50 32
D#3 51 33
E3 52 34
F3 53 35
F#3 54 36
G3 55 37
G#3 56 38
A3 57 39
A#3 58 3A
B3 59 3B
C4
“Middle C”
60 3C
C#4 61 3D
D4 62 3E
D#4 63 3F
E4 64 40
F4 65 41
F#4 66 42
G4 67 43
G#4 68 44
A4 69 45
A#4 70 46
B4 71 47
C5 72 48
C#5 73 49
D5 74 4A
D#5 75 4B
E5 76 4C
F5 77 4D
F#5 78 4E
G5 79 4F
G#5 80 50
A5 81 51
A#5 82 52
B5 83 53
C6 84 54
C#6 85 55
D6 86 56
D#6 87 57
E6 88 58
F6 89 59
F#6 90 5A
G6 91 5B
G#6 92 5C
A6 93 5D
A#6 94 5E
B6 95 5F
C6 96 60
C#7 97 61
D7 98 62
D#7 99 63
E7 100 64
F7 101 65
F#7 102 66
G7 103 67
G#7 104 68
A7 105 69
A#7 106 6A
B7 107 6B
C8 108 6C
C#8 109 6D
D8 110 6E
D#8 111 6F
E8 112 70
F8 113 71
F#8 114 72
G8 115 73
G#8 116 74
A8 117 75
A#8 118 76
B8 119 77
C9 120 78
C#9 121 79
D9 122 7A
D#9 123 7B
E9 124 7C
F9 125 7D
F#9 126 7E
G9 127 7F

DIY 5x MIDI Thru / Repeater Circuit

The circuit below is a MIDI standard-compliant 5 x MIDI Thru Circuit. Each MIDI Thru port generates an exact replica of the MIDI signal on the MIDI In port.

MIDI connector pin numbering can be found here.

Parts List:

  • C1 – C3: 0.1uF Ceramic Chip Capacitor
  • C4: 47uF Electrolytic Capacitor
  • D1: 1N4148 Small Signal Diode
  • IC1: 7805 Voltage Regulator
  • IC2: 6N136 Opto-Isolator
  • IC3: 7414 or 7404 Hex Inverter
  • R1, R3-R12: 220Ω Resistor, 1/8-watt or 1/4-watt
  • R2: 10kΩ Resistor, 1/8-watt or 1/4-watt

 

Rock Band MIDI Drum Mod FAQ

What does the Rock Band MIDI Drum Mod allow me to do?

The mod allows you to play Rock Band using any electronic drum set that has a MIDI output.

Where can I find a how-to or guide for this mod?

What do I need to purchase?

Most customers have purchased the MSA-P to provide the MIDI functionality for the mod.

Is the MSA-P in stock?

Unless indicated otherwise on the product page or by the shopping cart, all products are in stock.

What special instructions do I need to give Highly Liquid when I place my order?

None.

Do I need special firmware for my MSA-P?

No. The current production firmware supports the mod.

Will the terminal blocks be mounted on my MSA-P before shipment?

If both an MSA Terminal Block Set and assembly service have been purchased, yes. No special instructions are required.

When will my order ship?

The shopping cart will calculate the shipment date for your order. Unless specified othersise, non-assembled orders ship within one business day, and assembled orders ship within two business days. You will receive a confirmation email with tracking information when your order ships.

How do I configure the MIDI response of my MSA-P?

MIDI configuration is described in the MSA firmware user manual, linked from the MSA-P product page. For more information about sending a SysEx configuration message from your computer, see the MIDI SysEx How-To.

What if I have other questions?

Post your questions at the forums.

MIDI SysEx Tools

Overview

Many MIDI-enabled devices can be configured via the MIDI interface. This is typically accomplished via a special type of message called “System Exclusive” or “SysEx.”A device’s SysEx message format is specified by the vendor. For Highly Liquid products, please see each product’s documentation for SysEx message formats.

SysEx Messages as Files

SysEx messages are typically stored in one of two file formats:

  • A plain text file (.txt)
  • A raw hex file (.syx)

Below is a simple 7-byte SysEx message with example file representations.

Message contents (hex): F0 00 01 5D 02 00 F7

Corresponding files:

Text files can be edited using any basic text editor such as Notepad or vi. Raw hex files require the use of a “hex editor.”

Note: text can now be converted to raw hex .syx file here.

Sending SysEx Messages from a Computer

A SysEx message can be sent from any computer with an installed MIDI interface.Many sequencing programs have built-in SysEx functionality. There are also stand-alone SysEx applications available for free download.Recommended stand-alone SysEx programs:

  • SendSX (Windows): Stores & loads SysEx messages as text files. SysEx data can also be manually entered directly into the application.
  • SysEx Librarian (Mac): Stores & loads SysEx messages as raw hex (.syx) files. Use this tool to convert your code to a .syx file. You can also edit the .syx file using a hex editor like HexEdit.

The Keyboard Matrix Explained

Overview

It is common for an electronic device to have a large number of input buttons (or “keys”). The device’s microprocessor (MPU) must monitor these inputs. Since any MPU has a limited number of I/O pins, it is often not practical to dedicate a separate pin to each button or keyswitch. This is especially true in the case of a musical keyboard. If each keyswitch were given a dedicated MPU I/O pin, a keyboard with 32 or 49 keys might not leave any I/O pins for other functions. To make efficient use of MPU I/O, keys are arranged in a matrix. Almost all non-velocity-sensitive musical keyboards use this approach. What follows is a description of the keyboard matrix circuit and its relation to the UMR2 MIDI retrofit. The UMR2 works with many matrix keyboards, but compatibility with all models is not guaranteed.

Example Key Matrix

The matrix is connected to the MPU by “select” or “common” lines, which are MPU outputs, and “data” lines, which are MPU inputs. To monitor the keyswitch states, the MPU sends a brief pulse to each select output, one-at-a-time. Each pulse “selects” a group of keys. Any closed keyswitches in the group will allow the pulse to pass thru to the data lines, which are “read” by the MPU. All of the keys are read continuously, many times per second. This allows the MPU to respond almost instantly to keyswitch state changes.

There are two categories of key matrix distinguished by the polarity of the select signal. In an “active-high select” keyboard, the state of each data line is low (0V) by default. The select signal is a 5V pulse. In a “active-low select” keyboard, the state of each data line is high (5V) by default. The select signal is a 0V pulse. Figures 1 and 2 below are examples of simple keyboard matrices. Each is a “2/2″ select/data configuration for a 4-key keyboard. In practice, keyboards will have a larger number of select & data lines. Typical 32-key configurations are 4/8, 8/4, or 6/6. 49-key keyboards often use a 9/6 matrix. The maximum number of keys supported by a matrix configuration is governed by the following equation:

k = s * d

Where k is the maximum number of keys, s is the number of select lines, and d is the number of data lines. Note that each keyswitch is accompanied by a series diode. This diode prevents a potentially damaging short-circuit between select outputs. It also allows the MPU to accurately detect the key states when multiple keyswitches are closed.

Figure 1: “2/2 Active-High Select” Keyboard Matrix and Select Signals

Figure 2: “2/2 Active-Low Select” Keyboard Matrix and Select Signals

 

Example Keyswitch States and Data Waveforms

Below are several keyswitch states and the resulting data waveforms for the simple 2/2 matrix. Note that any possible combination of keyswitch states will produce a unique combination of data waveforms.

Figure 3: “2/2 Active- High Select” Keyboard Matrix, Key A Depressed

Figure 4: “2/2 Active-High Select” Keyboard Matrix, Key B Depressed

Figure 5: “2/2 Active-High Select” Keyboard Matrix, Keys C & D Depressed

Figure 6: “2/2 Active-High Select” Keyboard Matrix, Keys B & D Depressed

 

MIDI Retrofit: “Faking” the Data

To trigger a note, the UMR2 monitors the select signals of the host keyboard’s MPU. When a select pulse occurs, the UMR2 injects a corresponding “faked” keypress signal into the data lines. To the host MPU, this signal is indistinguishable from a manual keypress.  Installing the UMR2 therefore involves identifying the select and data lines in the host keyboard, determining which select scheme is used (“active-high” or “active-low”), and connecting the UMR2 accordingly. For many keyboard models, the connections have already been tested and documented. For other models, installation may be possible after a bit of inspection as described below. Please visit the UMR2 forum for more information.

Figure 7: UMR2 Connections to Host Keyboard Matrix

 

Identifying a Keyboard’s Matrix Scheme

A keyboard’s select and data lines are typically connected from the main PCB to the keyswitch PCB via a ribbon cable. With a help of a continuity tester, the pins of the ribbon cable can be traced to the contacts of the keyswitches. Select lines are typically tied to groups of adjacent keys. Each data line will be connected to one keyswitch in each group. A few keyboard models differ from this convention.  When in doubt, it is wise to use an oscilloscope to identify the select and data lines with certainty.

The keyswitch PCB of the Casio MT-210 is used as an example below.  The diodes in Figure 9 serve the same function as the diodes in the schematics above. Their polarity provides a clue to the polarity of the select pulse used: review the connection of the diodes in figures 1 and 2, with respect to the data lines.  The keyswitch PCB of the Casio MT-210 is shown in figures 10-13 below. 8 select lines are connected to groups of 6 keys each. The 9th select line is connected to a single key. Note the keyswitch diodes on the underside of the PCB. The anodes are connected to the data lines. This indicates an active-low select configuration. If observed with an oscilloscope, the select waveforms will appear similar to those shown in Figure 2. The UMR2 is configured accordingly.

Figure 8: Casio MT-210 Keyboard Matrix Schematic

Figure 9: Casio MT-210 Keyswitch PCB—Top

Figure 10: Casio MT-210 Keyswitch PCB—Top, Detail

Figure 11: Casio MT-210 Keyswitch PCB—Bottom

Figure 12: Casio MT-210 Keyswitch PCB—Bottom, Detail