[net.music.synth] MIDI BNF

nivek@rover.ri.cmu.edu (Kevin Dowling) (11/20/85)

Someone asked a short while back for this:


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 <eox> f7h. 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> ::= 		<MIDI message> < MIDI Stream>
2.	<MIDI message> ::= 		<system message> | <channel message>
3.	<channel message> ::= 		<channel 1byte message> |
					<channel 2byte message>
4.	<channel 1byte message> ::= 	<channel status1 byte> <data singlet>
					<running singlets>
5.	<channel 2byte message> ::=	<channel status2 byte> <data pair>
					<running pairs>
6.	<channel status1 byte> ::=	<channel voice status1 nibble>
					<hex nibble>
7.	<channel status2 byte> ::=	<channel voice status2 nibble>
						<hex nibble>
8.	<channel voice status1 nibble> ::= ch|dh
9.	<channel voice status2 nibble> ::= 8h|9h|ah|bh|eh
10.	<hex nibble> ::=		0h|1h|2h|3h|4h|5h|6h|7h|
					8h|9h|ah|bh|ch|dh|eh|fh
11.	<data pair> ::=			<data singlet> <data singlet>
12.	<data singlet> ::=		<realtime byte> <data singlet> |
					<data byte>
13.	<running pairs> ::=		<empty> | <data pair> <running pairs>
14.	<running singlets> ::=		<empty> | <data singlet>
					<running singlets>
15.	<data byte> ::=			<data nibble> <hex nibble>
16.	<data nibble> ::=		0h|1h|2h|3h|4h|5h|6h|7h
17.	<realtime byte> ::=		f8h|fah|fbh|fch|feh|ffh
18.	<system message> ::=		<system common message> |
					<system exclusive message> |
					<system realtime message>
19.	<system realtime message> ::= 	<realtime byte>
20.	<system exclusive message> ::=	<system exclusive data byte>
					<data singlet> <running singlets>
					<eox byte>
21.	<system exclusive status byte> ::=	f0h
22.	<eox byte> ::=	f7h
23.	<system common message> ::=	<song position message> |
					<song select message> | <tune request>
24.	<tune request> ::= f6h
25.	<song position message> ::=	<song position status byte>
					<data pair>
26.	<song select message> ::=	<song select status byte>
					<data singlet>
27.	<song position status byte> ::=	f2h
28.	<song select status byte> ::= 	f3h



				nivek

Aka :	Kevin Dowling		Bell:	(412) 578-8830
Arpa:	nivek@cmu-ri-rover	Mail:	Robotics Institute
					Schenley Park
					Pgh, PA 15213
					

an@orstcs.UUCP (an) (12/07/85)

/***** orstcs:net.music.synt / rover!nivek / 11:46 am  Nov 20, 1985*/
Someone asked a short while back for this:


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 <eox> f7h. 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> ::= 		<MIDI message> < MIDI Stream>
2.	<MIDI message> ::= 		<system message> | <channel message>
3.	<channel message> ::= 		<channel 1byte message> |
					<channel 2byte message>
4.	<channel 1byte message> ::= 	<channel status1 byte> <data singlet>
					<running singlets>
5.	<channel 2byte message> ::=	<channel status2 byte> <data pair>
					<running pairs>
6.	<channel status1 byte> ::=	<channel voice status1 nibble>
					<hex nibble>
7.	<channel status2 byte> ::=	<channel voice status2 nibble>
						<hex nibble>
8.	<channel voice status1 nibble> ::= ch|dh
9.	<channel voice status2 nibble> ::= 8h|9h|ah|bh|eh
10.	<hex nibble> ::=		0h|1h|2h|3h|4h|5h|6h|7h|
					8h|9h|ah|bh|ch|dh|eh|fh
11.	<data pair> ::=			<data singlet> <data singlet>
12.	<data singlet> ::=		<realtime byte> <data singlet> |
					<data byte>
13.	<running pairs> ::=		<empty> | <data pair> <running pairs>
14.	<running singlets> ::=		<empty> | <data singlet>
					<running singlets>
15.	<data byte> ::=			<data nibble> <hex nibble>
16.	<data nibble> ::=		0h|1h|2h|3h|4h|5h|6h|7h
17.	<realtime byte> ::=		f8h|fah|fbh|fch|feh|ffh
18.	<system message> ::=		<system common message> |
					<system exclusive message> |
					<system realtime message>
19.	<system realtime message> ::= 	<realtime byte>
20.	<system exclusive message> ::=	<system exclusive data byte>
					<data singlet> <running singlets>
					<eox byte>
21.	<system exclusive status byte> ::=	f0h
22.	<eox byte> ::=	f7h
23.	<system common message> ::=	<song position message> |
					<song select message> | <tune request>
24.	<tune request> ::= f6h
25.	<song position message> ::=	<song position status byte>
					<data pair>
26.	<song select message> ::=	<song select status byte>
					<data singlet>
27.	<song position status byte> ::=	f2h
28.	<song select status byte> ::= 	f3h



				nivek

Aka :	Kevin Dowling		Bell:	(412) 578-8830
Arpa:	nivek@cmu-ri-rover	Mail:	Robotics Institute
					Schenley Park
					Pgh, PA 15213
					
/* ---------- */

an@orstcs.UUCP (an) (12/07/85)

/***** orstcs:net.music.synt / an /  6:20 pm  Dec  6, 1985*/
/***** orstcs:net.music.synt / rover!nivek / 11:46 am  Nov 20, 1985*/
Someone asked a short while back for this:


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 <eox> f7h. 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> ::= 		<MIDI message> < MIDI Stream>
2.	<MIDI message> ::= 		<system message> | <channel message>
3.	<channel message> ::= 		<channel 1byte message> |
					<channel 2byte message>
4.	<channel 1byte message> ::= 	<channel status1 byte> <data singlet>
					<running singlets>
5.	<channel 2byte message> ::=	<channel status2 byte> <data pair>
					<running pairs>
6.	<channel status1 byte> ::=	<channel voice status1 nibble>
					<hex nibble>
7.	<channel status2 byte> ::=	<channel voice status2 nibble>
						<hex nibble>
8.	<channel voice status1 nibble> ::= ch|dh
9.	<channel voice status2 nibble> ::= 8h|9h|ah|bh|eh
10.	<hex nibble> ::=		0h|1h|2h|3h|4h|5h|6h|7h|
					8h|9h|ah|bh|ch|dh|eh|fh
11.	<data pair> ::=			<data singlet> <data singlet>
12.	<data singlet> ::=		<realtime byte> <data singlet> |
					<data byte>
13.	<running pairs> ::=		<empty> | <data pair> <running pairs>
14.	<running singlets> ::=		<empty> | <data singlet>
					<running singlets>
15.	<data byte> ::=			<data nibble> <hex nibble>
16.	<data nibble> ::=		0h|1h|2h|3h|4h|5h|6h|7h
17.	<realtime byte> ::=		f8h|fah|fbh|fch|feh|ffh
18.	<system message> ::=		<system common message> |
					<system exclusive message> |
					<system realtime message>
19.	<system realtime message> ::= 	<realtime byte>
20.	<system exclusive message> ::=	<system exclusive data byte>
					<data singlet> <running singlets>
					<eox byte>
21.	<system exclusive status byte> ::=	f0h
22.	<eox byte> ::=	f7h
23.	<system common message> ::=	<song position message> |
					<song select message> | <tune request>
24.	<tune request> ::= f6h
25.	<song position message> ::=	<song position status byte>
					<data pair>
26.	<song select message> ::=	<song select status byte>
					<data singlet>
27.	<song position status byte> ::=	f2h
28.	<song select status byte> ::= 	f3h



				nivek

Aka :	Kevin Dowling		Bell:	(412) 578-8830
Arpa:	nivek@cmu-ri-rover	Mail:	Robotics Institute
					Schenley Park
					Pgh, PA 15213
					
/* ---------- */
/* ---------- */