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

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

No more warnings in vlib.

  • Property mode set to 100644
File size: 7.5 KB
RevLine 
[f40a309]1/*
2 =============================================================================
3 instdsp.h -- instrument editor definitions
4 Version 37 -- 1988-08-30 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[f7428b1]8#pragma once
[5fa506d]9
[f7428b1]10#include "midas.h"
[5fa506d]11#include "stdint.h"
12#include "vsdd.h"
[f7428b1]13
[f40a309]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
[f7428b1]25#define INSTFL V_RES3 /* instrument display object flags */
26#define TCURFL V_RES3 /* text cursor display flags */
[f40a309]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/* ------------- 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/* --------- Background colors for instrument display windows --------------- */
77
78#define CBBX00 5 /* Freq 1 */
79#define CBBX01 5 /* Freq 2 */
80#define CBBX02 5 /* Freq 3 */
81#define CBBX03 5 /* Freq 4 */
82#define CBBX04 5 /* Filter / Resonance */
83#define CBBX05 5 /* Location */
84
85#define CBBX06 7 /* Index 1 */
86#define CBBX07 7 /* Index 2 */
87#define CBBX08 7 /* Index 3 */
88#define CBBX09 7 /* Index 4 */
89#define CBBX10 7 /* Index 5 */
90#define CBBX11 7 /* Index 6 */
91
92#define CBBX12 ID_LVLC /* Level */
93
94#define CBBX13 7 /* Source Mult */
95#define CBBX14 7 /* Point */
96#define CBBX15 7 /* Time */
97#define CBBX16 7 /* Value */
98#define CBBX17 7 /* Action */
99
100#define CBBX18 5 /* Algorithm */
101#define CBBX19 6 /* Voice & Inst */
102#define CBBX20 6 /* Oscillators */
103#define CBBX21 5 /* Waveshapes */
104#define CBBX22 7 /* Variables */
105#define CBBX23 6 /* Name and comments */
106
107/* -------------- pendant function list entry structure definition ---------- */
108
109struct pflent { /* pendant function list entry structure */
110
111 struct pflent *nextpf; /* next entry pointer */
[bf89cfb]112 int16_t pftrig; /* trigger number */
113 int16_t pfvpval; /* voice / parameter number */
[7258c6a]114 int32_t d1reg; /* D1 register contents */
115 int32_t d2reg; /* D2 register contents */
116 int32_t d4reg; /* D4 register contents */
117 int8_t *a1reg; /* A1 register contents */
118 int8_t *a2reg; /* A2 register contents */
119 int8_t *a3reg; /* A3 register contents */
[f40a309]120};
121
122/* -------------- function point structure definitions ---------------------- */
123
124struct instpnt { /* function point definition */
125
[7258c6a]126 int16_t iptim; /* time (packed) */
127 int16_t ipval; /* value */
128 int16_t ipvmlt; /* value multiplier */
[f40a309]129
[7258c6a]130 int8_t ipvsrc; /* value source */
131 int8_t ipact; /* action code */
[f40a309]132
133#define AC_NULL 0 /* null action */
134#define AC_SUST 1 /* sustain (hold here while key is down) */
135#define AC_ENBL 2 /* enable (hold here while key is up) */
136#define AC_JUMP 3 /* unconditional (continuous) jump */
137#define AC_LOOP 4 /* jump (loop) n times */
138#define AC_KYUP 5 /* jump if key up (enable jump) */
139#define AC_KYDN 6 /* jump if key down (sustain jump) */
140#define AC_UNDF 7 /* -- undefined - treated as AC_NULL -- */
141
[7258c6a]142 int8_t ippar1; /* action parameter 1 (point) */
143 int8_t ippar2; /* action parameter 2 (count) */
[f40a309]144
[7258c6a]145 int8_t ippar3; /* action parameter 3 (counter) */
146 int8_t ippad; /* padding for even boundary */
[f40a309]147};
148
149/* ------------- function header structure definitions ---------------------- */
150
151struct idfnhdr { /* function header */
152
[7258c6a]153 int16_t idfpch; /* pitch (used for freq1 only) */
154 int16_t idfmlt; /* overall value multiplier (-1 .. +1) */
[f40a309]155
[7258c6a]156 int8_t idfsrc; /* overall value source */
157 int8_t idfpif; /* points in the function */
[f40a309]158
[7258c6a]159 int8_t idfpt1; /* index of first point (0..NIPTS) */
160 int8_t idftmd; /* trigger mode and control bits */
[f40a309]161
162#define I_TM_KEY 0x01 /* trigger on key closure */
163#define I_ACTIVE 0x02 /* function active */
164#define I_NRATIO 0x04 /* not ratio mode (matches hardware) */
165#define I_NVBITS 0x18 /* new value select bits (matches hardware) */
166#define I_VNSUBN 0x08 /* new value sub-n bit (matches hardware) */
167
[7258c6a]168 int8_t idfcpt; /* index of current point (0..NIPTS) */
169 int8_t idfprm; /* parameter associated with this function */
[f40a309]170
[7258c6a]171 int16_t idftrg; /* trigger that started the function */
[f40a309]172};
173
174/* ---------- instrument definition structure definitions ------------------- */
175
176struct instdef { /* instrument definition */
177
[7258c6a]178 int16_t idhflag; /* flags */
[f40a309]179
[f7428b1]180 int8_t idhname[MAXIDLN + 1]; /* instrument name */
181 int8_t idhcom1[MAXIDLN + 1]; /* first line of comments */
182 int8_t idhcom2[MAXIDLN + 1]; /* second line of comments */
183 int8_t idhcom3[MAXIDLN + 1]; /* third line of comments */
[f40a309]184
[7258c6a]185 int8_t idhcfg; /* configuration byte */
186 int8_t idhplft; /* points unused */
[f40a309]187
[7258c6a]188 int8_t idhwsa; /* waveshape A library number */
189 int8_t idhwsb; /* waveshape B library number */
[f40a309]190
[7258c6a]191 int8_t idhos1c; /* oscillator 1 controls */
192 int8_t idhos2c; /* oscillator 2 controls */
193 int8_t idhos3c; /* oscillator 3 controls */
194 int8_t idhos4c; /* oscillator 4 controls */
[f40a309]195
196#define OC_MOD 0x0003 /* oscillator mode mask */
197
198#define OC_INT 0x0000 /* oscillator in interval mode */
199#define OC_RAT 0x0001 /* oscillator in ratio mode */
200#define OC_FRQ 0x0002 /* oscillator in frequency mode */
201#define OC_PCH 0x0003 /* oscillator in pitch mode */
202
203#define OC_SYN 0x0004 /* oscillator in sync mode */
204
[7258c6a]205 int16_t idhos1v; /* oscillator 1 value */
206 int16_t idhos2v; /* oscillator 2 value */
207 int16_t idhos3v; /* oscillator 3 value */
208 int16_t idhos4v; /* oscillator 4 value */
[f40a309]209
210 struct idfnhdr idhfnc[NFINST]; /* function headers */
211
212 struct instpnt idhpnt[NIPNTS]; /* point table */
213
[7258c6a]214 int16_t idhwvaf[NUMWPNT]; /* waveshape A final values */
215 int16_t idhwvao[NUMWPNT]; /* waveshape A offset values */
216 int16_t idhwvah[NUMHARM]; /* waveshape A harmonic values */
[f40a309]217
[7258c6a]218 int16_t idhwvbf[NUMWPNT]; /* waveshape B final values */
219 int16_t idhwvbo[NUMWPNT]; /* waveshape B offset values */
220 int16_t idhwvbh[NUMHARM]; /* waveshape B harmonic values */
[f40a309]221
222};
Note: See TracBrowser for help on using the repository browser.