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

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

Started to rework include files.

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