source: buchla-68k/include/score.h@ 4b63bf3

Last change on this file since 4b63bf3 was fa38804, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Removed form-feed comments.

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