/*
 * MIDIPARS.H - definitions to be included by users of midipars.c
 */


/*
 * Device codes to pass to Bconstat(), Bconin() and Bconout().
 * These shouldn't be here.
 */
#define CON 2	/* Console (ie screen and keyboard) */
#define MIDI 3

/* Send a byte out of the midi port */
extern int lastocmd;	/* from midipars.c */
#define midiout(c)	(Bconout(MIDI, (c)), lastocmd = 0)

/* Receive a byte from the midi port */
#define midiin()	(Bconin(MIDI) & 0xFF)

/* Is there any midi data waiting to be read? */
#define mididatap()	(Bconstat(MIDI) != 0)

/* Has a key been pressed on the keyboard? */
#define kbddatap()	(Bconstat(CON) != 0)

/* Is this byte the first one of a midi command */
#define iscmd(x)	((x)&0x80)

/* Compile-time parameter for midipars.c reduces size of output by using the
 * running-status hack. */
#define OPTOUT
