/* @(#)midi.h	1.1 (mg@ukc.ac.uk) 2/11/90 */
/*
 *	MIDI.H - header file giving definitions for MIDI data.
 */

/*
 *	Defines for the various command bytes
 */

/* Command 80 - E0 have the channel number in the bottom 4 bits */
#define KEYOFF	0x80		/* we map this into KEYON, velocity = 0 */
#define KEYON	0x90
#define CONTROL 0xB0
		/* subcodes for control commands */
#define		MODWHEEL	1	/* tremolo depth on PF80 */
#define		BREATH		2	/* breath controller */
#define		FOOT		4	/* tremolo speed on PF80 */
#define		DATAENTRY	6	/* data entry knob on DX7 */
#define		VOLUME		7
#define		SUSTAIN		64
#define		PORTAMENTO	65
#define		KEYHOLD		66
#define		SOFT		67
#define		TREMOLO 	92
#define		CHORUS		93
#define		DATAPLUS	96
#define		DATAMINUS	97

#define PROGRAM 0xC0
#define AFTERTOUCH 0xD0
#define PITCHBEND 0xE0

/* F0 - FF are separate commands. Those which need channel info encode it
 * elsewhere in the arguments */
#define SYSEXCL	0xF0		/* system exclusive data follows */
#define EOX	0xF7		/* end of system exclusive data */
#define ACTIVE 	0xFE		/* Idle handshake */

#define iscmd(x) ((x) & 0x80)
