/* globals for myms */ #define MIDI 3 #define CON 2 #define TRUE 1 #define FALSE 0 #define WI_KIND (SIZER|MOVER|FULLER|CLOSER|NAME) #define NO_WINDOW (-1) #define MIN_WIDTH (2*gl_wbox) #define MIN_HEIGHT (3*gl_hbox) #define RBOTTON 0x02 /* timer defines */ #define MyApp 0 /* my application */ #define Control 7 /* divide by 200 prescale */ #define Data 0 /* Countdown from */ /* 1 byte, 1, 2, ... 254, 255, 0 = 256 */ #define Off 0 #define MAXITER 100 /* Iterations */ #define MAXTICKS 10 /* Maximum timer count-down events */ /* Music Studio TOKENS */ #define EVENT_END 0x0 #define KEY_SIGNATURE 0x80 #define TEMPO 0x81 #define BAR 0x82 #define TIME_SIGNATURE 0x83 #define LOUDNESS 0x84 #define REPEAT_START 0x85 #define REPEAT_STOP 0x86 #define END 0xFF #define CMAJ 0x01 #define GMAJ 0x02 #define DMAJ 0x03 #define AMAJ 0x04 #define EMAJ 0x05 #define BMAJ 0x06 #define FSMAJ 0x07 #define CSMAJ 0x08 #define FMAJ 0x09 #define BFMAJ 0x0a #define EFMAJ 0x0b #define AFMAJ 0x0c #define DFMAJ 0x0d #define GFMAJ 0x0e #define CFMAJ 0x0f #define SHARP 0x80 #define FLAT 0xc0 #define INKEY 0x00 #define NATURAL 0x40 /* data structures */ typedef struct { char chan1_name[10]; char chan2_name[10]; char chan3_name[10]; char chan4_name[10]; char chan5_name[10]; char chan6_name[10]; char chan7_name[10]; char chan8_name[10]; char chan9_name[10]; char chan10_name[10]; char chan11_name[10]; char chan12_name[10]; char chan13_name[10]; char chan14_name[10]; char chan15_name[10]; char chan_range[15]; /* array contains data that coresponds to channel and range */ char patch[15]; long lyrics[5]; char name[32]; }MIDI_INFO; typedef struct { int channel; /* Midi Channel Number */ int duration; /* Event Duration */ int note; /* Note */ char tie_beg; /* Is note tied */ char tie_end; int in_use_flag; /* This event location in use */ int velocity; /* velocity of event */ int rest; int track; }EVENT_BUFFER; typedef struct { char junk[21]; char fattr; int ftime; int fdate; long fsize; char name[14]; }DTA; typedef struct { int channel; int octave; int octave_num; int patch; int velocity; long junk1; int junk2; }ASSIGNMENT; /* ** message handler constants */ #define SONG_DONE 0x100