MIDI Considered in Backus-Naur Form


The latest issue of the IMA bulletin had an article on BNF for MIDI.  The
article points out that this syntax is what can be TRANSMITTED and the
actual RECEIVER implementation may differ slightly from this grammer. This
may allow greater error tolerance. The example given is that of tranmitting
a system exclusive message without the termination byte  F7. A channel
status byte could also be used to terminate a system exclusive in the event
the eox byte is lost due to error or power down etc...

Definitions 3-17 define running status and realtime data insertion as well as
the various channel messages.

1.   ::=            < MIDI Stream>
2.   ::=               | 
3.   ::=               |
                                | 
4.   ::=         
                                  
5.   ::=         
                                  
6.   ::=       
                                  
7.   ::=       
                                  
8.  ::= C | D
9.  ::= 8 | 9 | A | B | E
10.  ::=             0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
                                | 8 | 9 | A | B | C | D | E | F
11.  ::=              
12.  ::=            |
                                | 
13.  ::=          |  
14.  ::=       |
                                |  
15.  ::=              
16.  ::=              0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
17.  ::=         F8 | FA | FB | FC | FE | FF
18.  ::=                |
                                |  |
                                | 
19.  ::=      
20.  ::=             
                                   
                                  
21.  ::=       F0
22.  ::=              F7
23.  ::=         |
                                |  |
                                | 
24.  ::=          F6
25.  ::=     
                                  
26.  ::=       
                                  
27. ::=F2
28.  ::= F3