/* midi.h */ /* * ---------------------------------------------------------------------- * Copyright 1986 Greg Hendershott. Permission is hereby granted to * use and distribute this material for non-commercial purposes. This * code may not be sold to others, nor used to develop a program which * will be sold to others. * ---------------------------------------------------------------------- */ #ifndef _MIDI_H_ #define _MIDI_H_ #define KIND(b) ((b) & 0xF0) /* extract event kind from status byte */ #define CHAN(b) ((b) & 0x0F) /* extract channel from status byte */ #define NOTE_OFF 0x80 /* note-off */ #define NOTE_ON 0x90 /* note-on */ #define NOTE_PRESS 0xA0 /* note pressure / after-touch */ #define CONTROL 0xB0 /* control change */ #define PROGRAM 0xC0 /* program change */ #define CHAN_PRESS 0xD0 /* channel pressure / after-touch */ #define PITCH_WHEEL 0xE0 /* pitch wheel */ #define SYSX 0xF0 /* system exclusive */ #define EOX 0xF7 /* end of system exclusive */ /* A pair of ctype.h variety macros... */ #define isstat(b) ((b)&0x80) /* is argument a status byte? */ #define isdata(b) (!((b)&0x80)) /* is argument a data byte? */ #endif