MIDI Key Signature meta message

4.1

The MIDI key signature meta message specifies the key signature and scale of a MIDI file.

This message belongs to the category of MIDI meta messages. Since this is a meta message the MIDI event that carries this message may exist in MIDI files, but it is not sent over MIDI ports to a MIDI device.

This message consists of five bytes of data. The first byte is the status byte 0xFF, which shows that this is a meta message. The second byte is the meta message type 0x59, which shows that this is the key signature meta message. The third byte is 0x02, which shows that there are two remaining bytes. The fourth byte has values between -7 and 7 and specifies the key signature in terms of number of flats (if negative) or sharps (if positive). The fifth and last byte of the message specifies the scale of the MIDI file, where if this byte is 0 the scale is major and if the byte is 1 the scale is minor.

The following is an example of a key signature meta message.

0xFF 0x59 0x02 0x04 0x00

The status byte is 0xFF, which shows that this is a meta message. The meta message type is 0x59, which shows that this is the key signature meta message. The third byte is 2, which shows that there are two remaining bytes. The fourth byte 0x04 signifies four sharps and the last byte signifies that this is a major key. Thus, this message specifies that the MIDI file is in the key of E major (the major scale in E is E, F#, G#, A, B, C#, D# and has four sharps).

If there is no events with the key signature message, C major is assumed, which is equivalent to the message 0xFF 0x59 0x02 0x00 0x00.

The following is an example of the number of flats and sharps in the major scales. Each row is a different major scale and the first column contains the root notes of each of these scales.


CbDbEbFbGbAbBb7 flats
GbAbBbCbDbEbF6 flats
DbEbFGbAbBbC5 flats
AbBbCDbEbFG4 flats
EbFGAbBbCD3 flats
BbCDEbFGA2 flats
FGABbCDE1 flat
CDEFGABno flats or sharps
GABCDEF#1 sharp
DEF#GABC#2 sharps
ABC#DEF#G#3 sharps
EF#G#ABC#D#4 sharps
BC#D#EF#G#A#5 sharps
F#G#A#BC#D#E#6 sharps
C#D#E#F#G#A#B#7 sharps

The flats and sharps in the minor scales are as follows.


AbBbCbDbEbFbGb7 flats
EbFGbAbBbCbDb6 flats
BbCDbEbFGbAb5 flats
FGAbBbCDbEb4 flats
CDEbFGAbBb3 flats
GABbCDEbF2 flats
DEFGABbC1 flat
ABCDEFGno flats or sharps
EF#GABCD1 sharp
BC#DEF#GA2 sharps
F#G#ABC#DE3 sharps
C#D#EF#G#AB4 sharps
G#A#BC#D#EF#5 sharps
D#E#F#G#A#BC#6 sharps
A#B#C#D#E#F#G#7 sharps

See also:
Musical Instrument Digital Interface (MIDI)



  Rating
Rate This Page: Poor Great   |  Rate Content |
Average rating:  4.1   
20017
12345
Number of Ratings : 10
  Comments
Add Comment
No Comments Yet


Copyright 2006 by Kaliopa Publishing, LLC