/* *** sir.h: SIR program common header *** */ #include /* _U, _L, etc */ #include /* NULL, size_t, etc */ #include /* stdio prototypes */ #include /* multibyte prototypes */ #include /* tm struct */ #include #include #include #include #define VMAX 127 /* max. velocity */ #define VMIN 0 /* min. velocity */ struct NOTE { int pitch; int offset, span, duration; /* optional */ int measure, beat, boffset; int velocity; /* MIDI */ int track, channel, instrument; }; struct SEQUENCE { int nn; struct NOTE *notes; struct DEGREE *chromatic; struct DEGREE *diatonic1; }; struct DEGREE { int value; int magnitude, direction; /* value decomposed */ int inflection; }; struct KEY { int root, mode; int acc, fs; int score; }; struct PIECE { int key, ntime, dtime; int lbeat, lmeasure; int cumtime; int nn; struct NOTE *notes; }; struct MIDITRACK { int time_quantum, tracks; int key, ntime, dtime; int nn[16]; struct NOTE *notes[16]; }; #define NTRACK 16 struct MMLTRACK { // mml2dat int used, track, channel, instrument; int cumtime, poffset, notelen, velocity; char name[100]; }; /* resource.c */ extern struct NOTE *note_alloc(); extern struct DEGREE *degree_alloc(); /* utility.c */ /* extern void print_notes(); extern void print_note(); extern void print_pitch_stat(); extern void print_keycand(); extern void print_sequence(); */ /* pitch.c */ /* extern struct DEGREE *pindex_chromatic(); extern struct DEGREE *pindex_diatonic1(); extern void pitch_stat(); extern void find_key(); extern int pstat[3][12]; extern struct KEY *keycand[2][12]; */ /* mml2dat.c */ extern struct PIECE *mml2dat(); /* mid2dat.c */ /* extern struct MIDITRACK miditrack; extern void mid2dat(); */ /* midtoseq.c */ extern int midtoseq(); /* cgi */ extern char smffile[100], srcfile[100], datfile[100]; extern char UID[100];