source: buchla-68k/include/instdsp.h@ 5fa506d

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

Include file cleanup.

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