source: buchla-68k/orig/lib/INCLUDE/INSTDSP.H@ 9bf0f86

Last change on this file since 9bf0f86 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
File size: 7.7 KB
Line 
1/*
2 =============================================================================
3 instdsp.h -- instrument editor definitions
4 Version 37 -- 1988-08-30 -- D.N. Lynx Crowe
5
6 Uses definitions from: "graphdef.h", "midas.h", "vsdd.h"
7 =============================================================================
8*/
9
10/* --------------- Miscellaneous Instrument display definitions ------------- */
11
12#define ICURX 256 /* initial cursor x location */
13#define ICURY 175 /* initial cursor y location */
14
15#define INSTOBJ 8 /* instrument display object number */
16#define INSTPRI 8 /* instrument display object priority */
17
18#define TCURS 0 /* text cursor object number */
19#define TCPRI 15 /* text cursor priority */
20
21#define INSTFL (V_RES3) /* instrument display object flags */
22#define TCURFL (V_RES3) /* text cursor display flags */
23
24#define CBORD 9 /* color of border */
25#define TGRID 2 /* color of level grid titles */
26#define LGRID 0 /* color of level grid */
27#define ID_LVLC 6 /* color of level background plot */
28#define ID_CLVL 2 /* color of level lines as reference */
29#define ID_CLIN 14 /* color of function lines */
30#define ID_CPNT 11 /* color of normal point */
31#define ID_NCUR 1 /* color of normal graphic cursor */
32#define ID_TCUR 1 /* color of text cursor */
33#define ID_CHGD 3 /* color of voice # for changed data */
34#define ID_INST 2 /* color of funcs started at def time */
35#define ID_ENTRY 10 /* color of new data being entered */
36#define ID_SELD 3 /* color of selected point and cursor */
37#define ID_ACTP 15 /* color of point with action or source */
38#define WSAFC 8 /* color of waveshape A final values */
39#define WSBFC 4 /* color of waveshape B final values */
40
41/*
42
43*/
44
45/* ------------- Foreground colors for instrument display windows ----------- */
46
47#define CFBX00 11 /* Freq 1 */
48#define CFBX01 11 /* Freq 2 */
49#define CFBX02 11 /* Freq 3 */
50#define CFBX03 11 /* Freq 4 */
51#define CFBX04 11 /* Filter / Resonance */
52#define CFBX05 11 /* Location */
53
54#define CFBX06 11 /* Index 1 */
55#define CFBX07 11 /* Index 2 */
56#define CFBX08 11 /* Index 3 */
57#define CFBX09 11 /* Index 4 */
58#define CFBX10 11 /* Index 5 */
59#define CFBX11 11 /* Index 6 */
60
61#define CFBX12 11 /* Level */
62
63#define CFBX13 11 /* Source Mult */
64#define CFBX14 11 /* Point */
65#define CFBX15 11 /* Time */
66#define CFBX16 11 /* Value */
67#define CFBX17 11 /* Action */
68
69#define CFBX18 11 /* Algorithm */
70#define CFBX19 11 /* Voice & Inst */
71#define CFBX20 11 /* Oscillators */
72#define CFBX21 11 /* Waveshapes */
73#define CFBX22 11 /* Variables */
74#define CFBX23 11 /* Name and comments */
75/*
76
77*/
78
79/* --------- Background colors for instrument display windows --------------- */
80
81#define CBBX00 5 /* Freq 1 */
82#define CBBX01 5 /* Freq 2 */
83#define CBBX02 5 /* Freq 3 */
84#define CBBX03 5 /* Freq 4 */
85#define CBBX04 5 /* Filter / Resonance */
86#define CBBX05 5 /* Location */
87
88#define CBBX06 7 /* Index 1 */
89#define CBBX07 7 /* Index 2 */
90#define CBBX08 7 /* Index 3 */
91#define CBBX09 7 /* Index 4 */
92#define CBBX10 7 /* Index 5 */
93#define CBBX11 7 /* Index 6 */
94
95#define CBBX12 ID_LVLC /* Level */
96
97#define CBBX13 7 /* Source Mult */
98#define CBBX14 7 /* Point */
99#define CBBX15 7 /* Time */
100#define CBBX16 7 /* Value */
101#define CBBX17 7 /* Action */
102
103#define CBBX18 5 /* Algorithm */
104#define CBBX19 6 /* Voice & Inst */
105#define CBBX20 6 /* Oscillators */
106#define CBBX21 5 /* Waveshapes */
107#define CBBX22 7 /* Variables */
108#define CBBX23 6 /* Name and comments */
109
110/*
111
112*/
113
114/* -------------- pendant function list entry structure definition ---------- */
115
116struct pflent { /* pendant function list entry structure */
117
118 struct pflent *nextpf; /* next entry pointer */
119 unsigned pftrig; /* trigger number */
120 unsigned pfvpval; /* voice / parameter number */
121 long d1reg; /* D1 register contents */
122 long d2reg; /* D2 register contents */
123 long d4reg; /* D4 register contents */
124 char *a1reg; /* A1 register contents */
125 char *a2reg; /* A2 register contents */
126 char *a3reg; /* A3 register contents */
127};
128
129/*
130
131*/
132
133/* -------------- function point structure definitions ---------------------- */
134
135struct instpnt { /* function point definition */
136
137 short iptim; /* time (packed) */
138 short ipval; /* value */
139 short ipvmlt; /* value multiplier */
140
141 char ipvsrc; /* value source */
142 char ipact; /* action code */
143
144#define AC_NULL 0 /* null action */
145#define AC_SUST 1 /* sustain (hold here while key is down) */
146#define AC_ENBL 2 /* enable (hold here while key is up) */
147#define AC_JUMP 3 /* unconditional (continuous) jump */
148#define AC_LOOP 4 /* jump (loop) n times */
149#define AC_KYUP 5 /* jump if key up (enable jump) */
150#define AC_KYDN 6 /* jump if key down (sustain jump) */
151#define AC_UNDF 7 /* -- undefined - treated as AC_NULL -- */
152
153 char ippar1; /* action parameter 1 (point) */
154 char ippar2; /* action parameter 2 (count) */
155
156 char ippar3; /* action parameter 3 (counter) */
157 char ippad; /* padding for even boundary */
158};
159
160/*
161
162*/
163
164/* ------------- function header structure definitions ---------------------- */
165
166struct idfnhdr { /* function header */
167
168 short idfpch; /* pitch (used for freq1 only) */
169 short idfmlt; /* overall value multiplier (-1 .. +1) */
170
171 char idfsrc; /* overall value source */
172 char idfpif; /* points in the function */
173
174 char idfpt1; /* index of first point (0..NIPTS) */
175 char idftmd; /* trigger mode and control bits */
176
177#define I_TM_KEY 0x01 /* trigger on key closure */
178#define I_ACTIVE 0x02 /* function active */
179#define I_NRATIO 0x04 /* not ratio mode (matches hardware) */
180#define I_NVBITS 0x18 /* new value select bits (matches hardware) */
181#define I_VNSUBN 0x08 /* new value sub-n bit (matches hardware) */
182
183 char idfcpt; /* index of current point (0..NIPTS) */
184 char idfprm; /* parameter associated with this function */
185
186 short idftrg; /* trigger that started the function */
187};
188
189/*
190
191*/
192
193/* ---------- instrument definition structure definitions ------------------- */
194
195struct instdef { /* instrument definition */
196
197 short idhflag; /* flags */
198
199 char idhname[MAXIDLN+1]; /* instrument name */
200 char idhcom1[MAXIDLN+1]; /* first line of comments */
201 char idhcom2[MAXIDLN+1]; /* second line of comments */
202 char idhcom3[MAXIDLN+1]; /* third line of comments */
203
204 char idhcfg; /* configuration byte */
205 char idhplft; /* points unused */
206
207 char idhwsa; /* waveshape A library number */
208 char idhwsb; /* waveshape B library number */
209
210 char idhos1c; /* oscillator 1 controls */
211 char idhos2c; /* oscillator 2 controls */
212 char idhos3c; /* oscillator 3 controls */
213 char idhos4c; /* oscillator 4 controls */
214
215#define OC_MOD 0x0003 /* oscillator mode mask */
216
217#define OC_INT 0x0000 /* oscillator in interval mode */
218#define OC_RAT 0x0001 /* oscillator in ratio mode */
219#define OC_FRQ 0x0002 /* oscillator in frequency mode */
220#define OC_PCH 0x0003 /* oscillator in pitch mode */
221
222#define OC_SYN 0x0004 /* oscillator in sync mode */
223
224 short idhos1v; /* oscillator 1 value */
225 short idhos2v; /* oscillator 2 value */
226 short idhos3v; /* oscillator 3 value */
227 short idhos4v; /* oscillator 4 value */
228
229 struct idfnhdr idhfnc[NFINST]; /* function headers */
230
231 struct instpnt idhpnt[NIPNTS]; /* point table */
232
233 short idhwvaf[NUMWPNT]; /* waveshape A final values */
234 short idhwvao[NUMWPNT]; /* waveshape A offset values */
235 short idhwvah[NUMHARM]; /* waveshape A harmonic values */
236
237 short idhwvbf[NUMWPNT]; /* waveshape B final values */
238 short idhwvbo[NUMWPNT]; /* waveshape B offset values */
239 short idhwvbh[NUMHARM]; /* waveshape B harmonic values */
240
241};
Note: See TracBrowser for help on using the repository browser.