[f40a309] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | score.h -- score storage definitions
|
---|
| 4 | Version 31 -- 1988-10-17 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #define MAX_SE 32768L /* number of longs for score storage */
|
---|
| 9 |
|
---|
| 10 | #define N_SCORES 20 /* number of scores */
|
---|
| 11 | #define N_SECTS 20 /* number of sections per score */
|
---|
| 12 | #define NNEVTS 32 /* number of note entry events */
|
---|
| 13 |
|
---|
| 14 | struct nevent { /* note event entry list structure */
|
---|
| 15 |
|
---|
| 16 | struct nevent *nxt;
|
---|
| 17 | short group;
|
---|
| 18 | short note;
|
---|
| 19 | };
|
---|
| 20 |
|
---|
| 21 | struct s_time {
|
---|
| 22 |
|
---|
| 23 | short sflags;
|
---|
| 24 | char smpte[10];
|
---|
| 25 | };
|
---|
| 26 |
|
---|
| 27 | /* |
---|
| 28 |
|
---|
| 29 | */
|
---|
| 30 |
|
---|
| 31 | /* score list structures */
|
---|
| 32 |
|
---|
| 33 | struct s_entry { /* event entry structure */
|
---|
| 34 |
|
---|
| 35 | long e_time; /* time, in frames */
|
---|
| 36 | char e_size; /* size of entry, in longs */
|
---|
| 37 | char e_type; /* type of entry */
|
---|
| 38 | char e_data1; /* 1st 8 bits of data */
|
---|
| 39 | char e_data2; /* 2nd 8 bits of data */
|
---|
| 40 |
|
---|
| 41 | struct s_entry *e_bak, /* backward pointer */
|
---|
| 42 | *e_fwd, /* forward pointer */
|
---|
| 43 |
|
---|
| 44 | *e_dn, /* down pointer or 4 bytes of data */
|
---|
| 45 | *e_up, /* up pointer or 4 bytes of data */
|
---|
| 46 |
|
---|
| 47 | *e_lft, /* left pointer or 4 bytes of data */
|
---|
| 48 | *e_rgt; /* right pointer or 4 bytes of data */
|
---|
| 49 | };
|
---|
| 50 |
|
---|
| 51 | struct n_entry { /* note entry structure */
|
---|
| 52 |
|
---|
| 53 | long e_time; /* time, in frames */
|
---|
| 54 | char e_size; /* size of entry, in longs */
|
---|
| 55 | char e_type; /* type of entry */
|
---|
| 56 | char e_note; /* note number */
|
---|
| 57 | char e_group; /* group */
|
---|
| 58 |
|
---|
| 59 | struct s_entry *e_bak, /* backward pointer */
|
---|
| 60 | *e_fwd; /* forward pointer */
|
---|
| 61 |
|
---|
| 62 | short e_vel; /* velocity */
|
---|
| 63 | short e_data4;
|
---|
| 64 | };
|
---|
| 65 |
|
---|
| 66 | /* |
---|
| 67 |
|
---|
| 68 | */
|
---|
| 69 |
|
---|
| 70 | /* constant definitions */
|
---|
| 71 |
|
---|
| 72 | #define E_NULL (struct s_entry *)0L
|
---|
| 73 |
|
---|
| 74 | #define E_SIZE1 5 /* event size 1 -- 5 longs -- 20 bytes */
|
---|
| 75 | #define E_SIZE2 6 /* event size 2 -- 6 longs -- 24 bytes */
|
---|
| 76 | #define E_SIZE3 8 /* event size 3 -- 8 longs -- 32 bytes */
|
---|
| 77 |
|
---|
| 78 | #define TO_BAK 240 /* offset from current time to left edge */
|
---|
| 79 | #define TO_FWD 258 /* offset from current time to right edge */
|
---|
| 80 |
|
---|
| 81 | #define D_BAK 1 /* display backward */
|
---|
| 82 | #define D_FWD 0 /* display forward */
|
---|
| 83 |
|
---|
| 84 | #define GS_DSBL 0 /* group status: off */
|
---|
| 85 | #define GS_ENBL 1 /* group status: on */
|
---|
| 86 |
|
---|
| 87 | /* |
---|
| 88 |
|
---|
| 89 | */
|
---|
| 90 |
|
---|
| 91 | /* event types (number in comment field is event size) */
|
---|
| 92 |
|
---|
| 93 | #define EV_NULL 0 /* 1 - null event */
|
---|
| 94 | #define EV_SCORE 1 /* 1 - score begin */
|
---|
| 95 | #define EV_SBGN 2 /* 2 - section begin */
|
---|
| 96 | #define EV_SEND 3 /* 2 - section end */
|
---|
| 97 | #define EV_INST 4 /* 2 - instrument change */
|
---|
| 98 | #define EV_NBEG 5 /* 1 - note begin */
|
---|
| 99 | #define EV_NEND 6 /* 1 - note end */
|
---|
| 100 | #define EV_STOP 7 /* 1 - stop */
|
---|
| 101 | #define EV_INTP 8 /* 2 - interpolate */
|
---|
| 102 | #define EV_TMPO 9 /* 2 - tempo */
|
---|
| 103 | #define EV_TUNE 10 /* 2 - tuning */
|
---|
| 104 | #define EV_GRP 11 /* 2 - group status */
|
---|
| 105 | #define EV_LOCN 12 /* 2 - location */
|
---|
| 106 | #define EV_DYN 13 /* 2 - dynamics */
|
---|
| 107 | #define EV_ANVL 14 /* 2 - analog value */
|
---|
| 108 | #define EV_ANRS 15 /* 2 - analog resolution */
|
---|
| 109 | #define EV_ASGN 16 /* 2 - I/O assign */
|
---|
| 110 | #define EV_TRNS 17 /* 3 - transposition */
|
---|
| 111 | #define EV_REPT 18 /* 1 - repeat */
|
---|
| 112 | #define EV_PNCH 19 /* 1 - punch in/out */
|
---|
| 113 | #define EV_PRES 20 /* 1 - polyphonic pressure */
|
---|
| 114 | #define EV_FINI 21 /* 1 - score end */
|
---|
| 115 | #define EV_CPRS 22 /* 1 - channel pressure */
|
---|
| 116 | #define EV_BAR 23 /* 1 - bar marker */
|
---|
| 117 | #define EV_NEXT 24 /* 1 - next score */
|
---|
| 118 |
|
---|
| 119 | #define N_ETYPES 25 /* number of event types (1 + last type code) */
|
---|
| 120 |
|
---|
| 121 | /* |
---|
| 122 |
|
---|
| 123 | */
|
---|
| 124 |
|
---|
| 125 | /* event header types */
|
---|
| 126 |
|
---|
| 127 | #define EH_INST 0 /* instrument change */
|
---|
| 128 | #define EH_GRP 1 /* group status */
|
---|
| 129 | #define EH_LOCN 2 /* location */
|
---|
| 130 | #define EH_DYN 3 /* dynamics */
|
---|
| 131 | #define EH_ANRS 4 /* analog resolution */
|
---|
| 132 | #define EH_TRNS 5 /* transposition */
|
---|
| 133 | #define EH_INTP 6 /* interpolate */
|
---|
| 134 | #define EH_TMPO 7 /* tempo */
|
---|
| 135 | #define EH_TUNE 8 /* tuning */
|
---|
| 136 | #define EH_ASGN 9 /* I/O assign */
|
---|
| 137 | #define EH_SBGN 10 /* section begin */
|
---|
| 138 | #define EH_SEND 11 /* section end */
|
---|
| 139 |
|
---|
| 140 | #define N_TYPES 12 /* number of event header types */
|
---|