1 | /*
|
---|
2 | =============================================================================
|
---|
3 | im700.c -- variable definitions and initialization for MIDAS-VII
|
---|
4 | Version 102 -- 1989-11-16 -- D.N. Lynx Crowe
|
---|
5 | =============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #define DEBUGVAL 0 /* initial value for debugsw */
|
---|
9 |
|
---|
10 | #define FET_DEFS 1 /* so fields.h gets things right */
|
---|
11 | #define M7CAT 1 /* so libdsp.h gets it right */
|
---|
12 |
|
---|
13 | #include "stddefs.h"
|
---|
14 | #include "biosdefs.h"
|
---|
15 | #include "cmeta.h"
|
---|
16 | #include "curpak.h"
|
---|
17 | #include "fields.h"
|
---|
18 | #include "fpu.h"
|
---|
19 | #include "glcfns.h"
|
---|
20 | #include "glcdefs.h"
|
---|
21 | #include "graphdef.h"
|
---|
22 | #include "hwdefs.h"
|
---|
23 | #include "macros.h"
|
---|
24 | #include "memory.h"
|
---|
25 | #include "objdefs.h"
|
---|
26 | #include "panel.h"
|
---|
27 | #include "sclock.h"
|
---|
28 | #include "scwheel.h"
|
---|
29 | #include "slice.h"
|
---|
30 | #include "smdefs.h"
|
---|
31 | #include "timers.h"
|
---|
32 | #include "vsdd.h"
|
---|
33 | #include "vsddsw.h"
|
---|
34 | #include "vsddvars.h"
|
---|
35 |
|
---|
36 | #include "midas.h"
|
---|
37 |
|
---|
38 | #include "asgdsp.h"
|
---|
39 | #include "instdsp.h"
|
---|
40 | #include "libdsp.h"
|
---|
41 | #include "score.h"
|
---|
42 | #include "scdsp.h"
|
---|
43 | #include "scfns.h"
|
---|
44 | #include "wsdsp.h"
|
---|
45 |
|
---|
46 | extern unsigned tofpu(unsigned time);
|
---|
47 |
|
---|
48 | extern void nokey(void);
|
---|
49 | extern short nonf(short k);
|
---|
50 | extern void stdmkey(void);
|
---|
51 | extern void cxkstd(void);
|
---|
52 | extern void cykstd(void);
|
---|
53 | extern void cxgen(void);
|
---|
54 | extern void cygen(void);
|
---|
55 | extern void cmvgen(void);
|
---|
56 | extern short stdctp2(void);
|
---|
57 |
|
---|
58 | extern short blakpal[16][3];
|
---|
59 |
|
---|
60 | extern LPF t_prmtr[];
|
---|
61 |
|
---|
62 | extern char *funcndx[256][2];
|
---|
63 |
|
---|
64 | extern char keystat[24];
|
---|
65 | extern char ldcmnt[38];
|
---|
66 | extern char ldfile[9];
|
---|
67 | extern char loadedc[NLTYPES][37];
|
---|
68 | extern char loadedf[NLTYPES][8];
|
---|
69 | extern char masens[3];
|
---|
70 | extern char mctlval[NCTRLS];
|
---|
71 | extern char mdbyte[3];
|
---|
72 | extern char mpsust[48];
|
---|
73 | extern char mrstat[3];
|
---|
74 | extern char trgtab[NTRIGS];
|
---|
75 |
|
---|
76 | extern short fnoff[];
|
---|
77 |
|
---|
78 | extern short articen[12]; /* voice articulation enable status */
|
---|
79 | extern short grpmode[12]; /* group mode - 0 = play, 1 = stdby, 2 = rec */
|
---|
80 | extern short grpsel[12]; /* group select status for instrument selection */
|
---|
81 | extern short grpstat[12]; /* group status - 0 = off, non-0 = on */
|
---|
82 | extern short gtctab[12]; /* group to color table */
|
---|
83 | extern short lastvce[12]; /* last voice assigned in each group */
|
---|
84 | extern short lastvel[12]; /* last velocity sent to group */
|
---|
85 | extern short mpbend[48]; /* MIDI pitch bend data, by port and channel */
|
---|
86 | extern short msmstv[3]; /* MIDI state machine state variables */
|
---|
87 | extern short prstab[NTRIGS]; /* pressure */
|
---|
88 | extern short vce2trg[12]; /* voice to trigger map (-1 EQ NULL) */
|
---|
89 | extern short veltab[NTRIGS]; /* velocity */
|
---|
90 |
|
---|
91 | /* |
---|
92 |
|
---|
93 | */
|
---|
94 |
|
---|
95 | extern LPF (*oldsw)[]; /* saved swpt value */
|
---|
96 | extern LPF (*swpt)[]; /* switch dispatch table pointer */
|
---|
97 |
|
---|
98 | extern void (*curmove)(void); /* cursor move function */
|
---|
99 | extern short (*curtype)(void); /* cursor type function */
|
---|
100 | extern void (*cx_key)(void); /* x rate calculation */
|
---|
101 | extern void (*cx_upd)(void); /* x update */
|
---|
102 | extern void (*cy_key)(void); /* y rate calculation */
|
---|
103 | extern void (*cy_upd)(void); /* y update */
|
---|
104 | extern void (*d_key)(short k); /* in-field data key processor */
|
---|
105 | extern void (*e_key)(void); /* E key processor */
|
---|
106 | extern void (*m_key)(void); /* M key processor */
|
---|
107 | extern short (*not_fld)(short k); /* not-in-field data key processor */
|
---|
108 | extern void (*premove)(void); /* cursor pre-move function */
|
---|
109 | extern void (*pstmove)(void); /* cursor post-move function */
|
---|
110 | extern void (*x_key)(void); /* X key processor */
|
---|
111 | extern void (*xy_dn)(void); /* cursor - finger on (down) */
|
---|
112 | extern void (*xy_up)(void); /* cursor - finger off (up) */
|
---|
113 |
|
---|
114 | extern short *cratex; /* cursor x rate table pointer */
|
---|
115 | extern short *cratey; /* cursor x rate table pointer */
|
---|
116 |
|
---|
117 | short admctl; /* assignment display submenu control variable */
|
---|
118 | short adnamsw; /* assignment display virtual typewriter flag */
|
---|
119 | short aflag; /* analog activity flag */
|
---|
120 | short aform; /* action buffer format */
|
---|
121 | short amplval; /* amplitude */
|
---|
122 | short ancmsw; /* analog variable r/p control source */
|
---|
123 | short angroup; /* analog variable group being shown */
|
---|
124 | short asgfks; /* first key selected */
|
---|
125 | short asghit; /* row hit / assignment in progress */
|
---|
126 | short asgmod; /* assignment number or table modified */
|
---|
127 | short asig; /* analog signal number */
|
---|
128 | short asmode; /* panel assignment mode */
|
---|
129 | short astat; /* analog signal status */
|
---|
130 | short auxctl; /* aux control flag */
|
---|
131 | short aval; /* analog signal value */
|
---|
132 | short bform; /* oscillator data buffer format */
|
---|
133 | short catin; /* catalog read in flag */
|
---|
134 | short cents; /* pitch to cents conversion buffer */
|
---|
135 | short chtime; /* horizontal cursor counter */
|
---|
136 | short chwait; /* horizontal cursor wait time */
|
---|
137 | short cflag; /* accidental flag */
|
---|
138 | short clkctl; /* clock control */
|
---|
139 | short clkrun; /* clock status */
|
---|
140 | short clksrc; /* clock source */
|
---|
141 | short cmfirst; /* first cursor motion switch */
|
---|
142 | short cmtype; /* cursor motion type */
|
---|
143 | short cnote; /* note value at cursor */
|
---|
144 | short ctrsw; /* scupd center update switch */
|
---|
145 | short curasg; /* current assignment table */
|
---|
146 | short curfunc; /* current function number */
|
---|
147 | short curgrp; /* current group */
|
---|
148 | short curinst; /* current instrument number */
|
---|
149 | short curmop; /* current MIDI output port */
|
---|
150 | short curpnt; /* current point number (absolute) */
|
---|
151 | short curpos; /* cursor pad position for current axis */
|
---|
152 | short cursbox; /* currently selected box */
|
---|
153 | short curscor; /* Current score number */
|
---|
154 | short cursect; /* current section */
|
---|
155 | short curslim; /* cursor type change point */
|
---|
156 | short curtun; /* current tuning table */
|
---|
157 | short curvce; /* current voice number */
|
---|
158 | short curwave; /* current waveshape library slot */
|
---|
159 | short curwdth; /* current waveshape cursor width */
|
---|
160 | short curwfnl; /* current waveshape final value */
|
---|
161 | short curwhrm; /* current waveshape harmonic number */
|
---|
162 | short curwhrv; /* current waveshape harmonic value */
|
---|
163 | short curwoff; /* current waveshape offset value */
|
---|
164 | short curwpnt; /* current waveshape point number */
|
---|
165 | short curwslt; /* current waveshape instrument slot */
|
---|
166 | short cvtime; /* vertical cursor counter */
|
---|
167 | short cvwait; /* veritcal cursor wait time */
|
---|
168 | short cxrate; /* cursor x rate */
|
---|
169 | short cxval; /* graphic cursor x value */
|
---|
170 | short cyrate; /* cursor y rate */
|
---|
171 | short cyval; /* graphic cursor y value */
|
---|
172 | short debugne; /* debug flag for note entry */
|
---|
173 | short defect; /* defect code */
|
---|
174 | short dferror; /* error code from BIOS or XBIOS */
|
---|
175 | short dfsides; /* number of sides */
|
---|
176 | short dftype; /* disk type code */
|
---|
177 | short dsp_ok; /* display update OK this cycle flag */
|
---|
178 | short dubsw; /* overdub / replace switch */
|
---|
179 | short ebflag; /* edit buffer data flag */
|
---|
180 | short editss; /* edit panel switch state */
|
---|
181 | short editsw; /* edit mode switch */
|
---|
182 | short endflg; /* !end flag */
|
---|
183 | short ext_cv1; /* CV-1 value */
|
---|
184 | short ext_cv2; /* CV-2 value */
|
---|
185 | short ext_cv3; /* CV-3 value */
|
---|
186 | short ext_cv4; /* CV-4 value */
|
---|
187 | short ext_mod; /* Aux Signal Mod value */
|
---|
188 | short gomode; /* go to mode */
|
---|
189 | short grptran; /* group translation value */
|
---|
190 | short gtmsel; /* group transpose/map select */
|
---|
191 | short hitbox; /* box we just hit */
|
---|
192 | short hitcx; /* x of cursor when we hit the box */
|
---|
193 | short hitcy; /* y of cursor when we hit the box */
|
---|
194 | short idcfsw; /* copy / fetch menu switch */
|
---|
195 | short idimsw; /* instrument display instrument menu switch */
|
---|
196 | short idintmp; /* temporary for instrument number */
|
---|
197 | short idnamsw; /* typewriter switch */
|
---|
198 | short idsrcsw; /* source menu switch */
|
---|
199 | short idtdat; /* current instrument vtyper data entry string */
|
---|
200 | short imflag; /* instrument modified flag */
|
---|
201 | short initcfg; /* initial configuration */
|
---|
202 | short insmode; /* score insert mode */
|
---|
203 | short ismode; /* instrument select mode */
|
---|
204 | short lampio; /* LCD timeout disable switch state at I/O time */
|
---|
205 | short lampsw; /* LCD timeout disable switch */
|
---|
206 | short lasgsw; /* assignments store switch */
|
---|
207 | short lastam; /* last assignment menu base */
|
---|
208 | short ldelsw; /* delete switch */
|
---|
209 | short lderrsw; /* error message displayed switch */
|
---|
210 | short ldidsiz; /* getcat() did showsiz() switch */
|
---|
211 | short ldkind; /* fetch file type */
|
---|
212 | short ldpass; /* librarian load state variable */
|
---|
213 | short ldrow; /* fetch select row */
|
---|
214 | short ldslot; /* fetch select slot */
|
---|
215 | short legato; /* execkey() "legato" mode switch */
|
---|
216 | short lksel; /* librarian key slot selector */
|
---|
217 | short lmwtype; /* librarian message window type */
|
---|
218 | short loadrow; /* librarian row selected for load letter */
|
---|
219 | short loadsw; /* panel "Load" mode state */
|
---|
220 | short lorchl; /* load hi (TRUE) / lo (FALSE) orchestra */
|
---|
221 | short lorchsw; /* hi orchestra (21 - 40) store switch */
|
---|
222 | short lorclsw; /* lo orchestra (01 - 20) store switch */
|
---|
223 | short lpatsw; /* patch table store switch */
|
---|
224 | short lrasw; /* append (TRUE) / replace (FALSE) score */
|
---|
225 | short lscrsw; /* score store switch */
|
---|
226 | short lselsw; /* fetch select switch */
|
---|
227 | short lseqsw; /* sequence table store switch */
|
---|
228 | short lstbgnc; /* last note begin entry table index */
|
---|
229 | short lstendc; /* last note end entry table index */
|
---|
230 | short lstflag; /* last note list end switch */
|
---|
231 | short lstrsw; /* store state switch */
|
---|
232 | short lstwoff; /* last waveshape offset value */
|
---|
233 | short lstwpnt; /* last waveshape point number */
|
---|
234 | short ltagged; /* load tag switch */
|
---|
235 | short ltunsw; /* tunings store switch */
|
---|
236 | short lwavsw; /* waveshapes store switch */
|
---|
237 | short mascntr; /* MIDI active sensing timeout counter */
|
---|
238 | short mdb1; /* current MIDI data byte 1 */
|
---|
239 | short mdb2; /* current MIDI data byte 2 */
|
---|
240 | short michan; /* current MIDI channel */
|
---|
241 | short midiclk; /* MIDI clock switch */
|
---|
242 | short midigo; /* MIDI run switch */
|
---|
243 | short mistat; /* current MIDI status */
|
---|
244 | short nchwait; /* next chwait value */
|
---|
245 | short ncvwait; /* next cvwait value */
|
---|
246 | short ndisp; /* current display number */
|
---|
247 | short newflag; /* new data entered while t_cur EQ t_ctr */
|
---|
248 | short nkdown; /* number of keys down */
|
---|
249 | short notenum; /* note number */
|
---|
250 | short noteop; /* pending note operation code */
|
---|
251 | short notepit; /* note pitch */
|
---|
252 | short notesel; /* note selection state */
|
---|
253 | short npts; /* number of points in function */
|
---|
254 | short nxtflag; /* next score flag */
|
---|
255 | short oldltag; /* previous load tag for tagslot */
|
---|
256 | short oldpk; /* previous pkctrl state */
|
---|
257 | short oldsl; /* previous sliders state */
|
---|
258 | short pchsw; /* punch-in enable switch */
|
---|
259 | short pecase; /* point edit case variable */
|
---|
260 | short pkctrl; /* local performance key state */
|
---|
261 | short pntsv; /* point selection state variable */
|
---|
262 | short prgchan; /* MIDI program change channel (port 1) */
|
---|
263 | short ps_dpth; /* phase shifter -- depth */
|
---|
264 | short ps_intn; /* phase shifter -- intensity */
|
---|
265 | short ps_rate; /* phase shifter -- rate */
|
---|
266 | short pulsclk; /* pulse clock state */
|
---|
267 | short recsw; /* record / play switch */
|
---|
268 | short runit; /* run switch for main scan loop */
|
---|
269 | short sbase; /* score VSDD RAM scroll offset */
|
---|
270 | short scmctl; /* score submenu control flag */
|
---|
271 | short scrlpot; /* scroll pot state */
|
---|
272 | short sd; /* score display direction */
|
---|
273 | short se; /* score execution direction */
|
---|
274 | short sdmcol; /* score menu - saved stccol */
|
---|
275 | short sdmctl; /* score menu - control variable */
|
---|
276 | short sdmrow; /* score menu - saved stcrow */
|
---|
277 | short secop; /* pending score section operation */
|
---|
278 | short secopok; /* section operation OK flag */
|
---|
279 | short sgcsw; /* graphic cursor display switch */
|
---|
280 | short sgoflag; /* section number relative column 0..3 */
|
---|
281 | short sharp; /* sharp flag */
|
---|
282 | short sliders; /* slider and switch state */
|
---|
283 | short soffset; /* score scroll offset */
|
---|
284 | short ss_ptsw; /* smooth scroll patch scroll switch */
|
---|
285 | short ss_sqsw; /* smooth scroll sequence scroll switch */
|
---|
286 | short stccol; /* score cursor col */
|
---|
287 | short stcrow; /* score cursor row */
|
---|
288 | short stepclk; /* note entry - step clock state */
|
---|
289 | short stepenb; /* note entry - step enable flag */
|
---|
290 | short stepint; /* note entry - note interval */
|
---|
291 | short stepwgt; /* note entry - note weight */
|
---|
292 | short subj; /* edited point number (relative) */
|
---|
293 | short submenu; /* submenu active switch */
|
---|
294 | short swctrl; /* scroll wheel 'srolling' flag */
|
---|
295 | short swdelta; /* scroll wheel change while touched */
|
---|
296 | short swdir; /* scroll wheel direction */
|
---|
297 | short swfiin; /* scroll wheel fifo input pointer */
|
---|
298 | short swflag; /* scroll wheel touched flag */
|
---|
299 | short swlast; /* scroll wheel last value */
|
---|
300 | short swstop; /* scroll wheel stop flag */
|
---|
301 | short swndx; /* scroll wheel look back index */
|
---|
302 | short tagslot; /* tagged load slot */
|
---|
303 | short tdnamsw; /* tuning editor displaying typewriter */
|
---|
304 | short temax; /* time upper limit */
|
---|
305 | short temin; /* time lower limit */
|
---|
306 | short testing; /* test level */
|
---|
307 | short tglclk; /* clock on/off toggle flag */
|
---|
308 | short tglpch; /* punch in/out toggle flag */
|
---|
309 | short thescore; /* score selected from sqscan */
|
---|
310 | short timemlt; /* time scaling */
|
---|
311 | short tkctrl; /* trackball active flag */
|
---|
312 | short tmpomlt; /* tempo multiplier */
|
---|
313 | short tmpoval; /* tempo value */
|
---|
314 | short trkball; /* trackball selected switch */
|
---|
315 | short ttcmdsv; /* tuning editor edit state variable */
|
---|
316 | short ttsel1; /* tuning editor key select variable 1 */
|
---|
317 | short ttsel2; /* tuning editor key select variable 2 */
|
---|
318 | short ttsel3; /* tuning editor key select variable 3 */
|
---|
319 | short tuneval; /* fine tuning */
|
---|
320 | short tunmod; /* tuning table modified */
|
---|
321 | short tunval; /* tuning editor increment / transpose value */
|
---|
322 | short txfiin; /* trackball x fifo input pointer */
|
---|
323 | short txflag; /* trackball x axis active flag */
|
---|
324 | short txlast; /* trackball x axis last value */
|
---|
325 | short txstop; /* trackball x axis filter counter */
|
---|
326 | short tyfiin; /* trackball y fifo input pointer */
|
---|
327 | short tyflag; /* trackball y axis active flag */
|
---|
328 | short tylast; /* trackball y axis last value */
|
---|
329 | short tystop; /* trackball y axis filter counter */
|
---|
330 | short velflag; /* velocity display flag */
|
---|
331 | short verbose; /* verbose output switch */
|
---|
332 | short vlbtype; /* type of message window display */
|
---|
333 | short vrbw08; /* score display video reset detail word */
|
---|
334 | short vrbw09; /* score display video reset detail word */
|
---|
335 | short vrbw10; /* score display video reset detail word */
|
---|
336 | short vrbw11; /* score display video reset detail word */
|
---|
337 | short vrbw12; /* score display video reset detail word */
|
---|
338 | short vrbw13; /* score display video reset detail word */
|
---|
339 | short vrbw14; /* score display video reset detail word */
|
---|
340 | short vrbw15; /* score display video reset detail word */
|
---|
341 | short vrcw; /* score display video reset control word */
|
---|
342 | short vtccol; /* virtual typewriter cursor column */
|
---|
343 | short vtcrow; /* virtual typewriter cursor row */
|
---|
344 | char vtdechr; /* virtual typewriter data entry character */
|
---|
345 | short vtdecol; /* virtual typewriter data entry column */
|
---|
346 | short vtpcol; /* virtual typewriter column */
|
---|
347 | short vtprow; /* virtual typewriter row */
|
---|
348 | short vtwcol; /* virtual typewriter window left column */
|
---|
349 | short vtwrow; /* virtual typewriter window top row */
|
---|
350 | short vtxval; /* virtual typewriter cursor x value */
|
---|
351 | short vtyval; /* virtual typewriter cursor y value */
|
---|
352 | short wcflag; /* ws/cf menu select flag (cf=0, ws=1) */
|
---|
353 | short wcmcol; /* ws/cf menu label column */
|
---|
354 | short wcmrow; /* ws/cf menu label row */
|
---|
355 | short wcpage; /* ws/cf menu page */
|
---|
356 | short wdupdfl; /* waveshape display needs updated flag */
|
---|
357 | short wmcsel; /* ws menu ws a/b select */
|
---|
358 | short wmctag; /* ws/cf display update flag */
|
---|
359 | short wplast; /* last point for interpolate operation */
|
---|
360 | short wpntsv; /* waveshape point selection state variable */
|
---|
361 | short wshmax; /* waveshape maximum value */
|
---|
362 | short wvlast; /* last value for interpolate operation */
|
---|
363 | short xkcount; /* cursor x key on count */
|
---|
364 | short xkstat; /* cursor x key status */
|
---|
365 | short xycntr; /* xy center for cursor pad */
|
---|
366 | short ykcount; /* cursor y key on count */
|
---|
367 | short ykstat; /* cursor y key status */
|
---|
368 |
|
---|
369 | short anrs[8][16]; /* analog variable resolution */
|
---|
370 | short grp2prt[12][2]; /* group to port and channel table */
|
---|
371 | short sctctab[10][64]; /* score background color table */
|
---|
372 | short sigtab[128][2]; /* signals: [0] = value, [1] = switch */
|
---|
373 | short tunlib[NTUNS][128]; /* tuning table library */
|
---|
374 | short varmode[8][16]; /* analog variable record mode */
|
---|
375 | short wsnmod[12][2]; /* waveshape number / data modified */
|
---|
376 |
|
---|
377 | struct EXFILE mphead; /* MIDAS-VII program header */
|
---|
378 | struct fet *cfetp; /* current fet entry pointer */
|
---|
379 | struct fet *curfet; /* current fet table pointer */
|
---|
380 | struct fet *infetp; /* in-field fet pointer */
|
---|
381 | struct gdsel *gdfsep; /* gdsel freechain pointer */
|
---|
382 | struct instpnt *pntptr; /* pointer to edited point */
|
---|
383 | struct mlibhdr ldhead; /* library header */
|
---|
384 | struct nevent *nefree; /* pointer to free note entries */
|
---|
385 | struct nevent *nelist; /* pointer to note entry list */
|
---|
386 | struct octent *adoct; /* assignment display object control pointer */
|
---|
387 | struct octent *ldoct; /* librarian object control table pointer */
|
---|
388 | struct octent *mdoct; /* menu display object control table pointer */
|
---|
389 | struct octent *tdoct; /* tuning display object control table pointer */
|
---|
390 | struct octent *wdoct; /* object control table pointer */
|
---|
391 | struct octent *idoct; /* instrument display octent pointer */
|
---|
392 | struct pflent *pflist; /* pendant function list header */
|
---|
393 | struct pflent *pfqhdr; /* pendant function list entry freechain header */
|
---|
394 | struct s_entry *libsp; /* librarian score pointer */
|
---|
395 | struct s_entry *peg; /* insert mode 'peg' to hang the tail on */
|
---|
396 | struct s_entry *size1; /* score E_SIZE1 entry free list pointer */
|
---|
397 | struct s_entry *size2; /* score E_SIZE2 entry free list pointer */
|
---|
398 | struct s_entry *size3; /* score E_SIZE3 entry free list pointer */
|
---|
399 | struct selbox *csbp; /* current select box table pointer */
|
---|
400 | struct selbox *curboxp; /* current select box pointer */
|
---|
401 | struct s_entry *p_bak; /* pointer to entry at left edge of display */
|
---|
402 | struct s_entry *p_cbgn; /* pointer to start of copy */
|
---|
403 | struct s_entry *p_cend; /* pointer to end of copy */
|
---|
404 | struct s_entry *p_cur; /* pointer to entry at current execution time */
|
---|
405 | struct s_entry *p_ctr; /* pointer to entry at center of display */
|
---|
406 | struct s_entry *p_fwd; /* pointer to entry at right edge of display */
|
---|
407 | struct n_entry *p_nbeg; /* pointer to note begin */
|
---|
408 | struct n_entry *p_nend; /* pointer to note end */
|
---|
409 | struct s_entry *p_sbgn; /* pointer to start of section */
|
---|
410 | struct s_entry *p_sec1; /* pointer to start of 1st section */
|
---|
411 | struct s_entry *p_sec2; /* pointer to start of 2nd section */
|
---|
412 | struct s_entry *p_send; /* pointer to end of section */
|
---|
413 | struct s_entry *scp; /* current score pointer */
|
---|
414 |
|
---|
415 | struct asgent asgtab[NASGS]; /* assignment table library */
|
---|
416 | struct fcat filecat[FCMAX]; /* file catalog */
|
---|
417 | struct gdsel *gdstbc[NGDSEL]; /* center group & event status lists */
|
---|
418 | struct gdsel *gdstbn[NGDSEL]; /* right group & event status lists */
|
---|
419 | struct gdsel *gdstbp[NGDSEL]; /* left group & event status lists */
|
---|
420 | struct gdsel gdfsl[MAXFSL]; /* gdsel pool */
|
---|
421 | struct instdef idefs[NINST]; /* current instrument definitions */
|
---|
422 | struct n_entry *lstbgns[NLSTENTS]; /* last note begin entry table */
|
---|
423 | struct n_entry *lstends[NLSTENTS]; /* last note end entry table */
|
---|
424 | struct instdef vbufs[12]; /* voice instrument buffers */
|
---|
425 | struct nevent nevents[NNEVTS]; /* note event list */
|
---|
426 | struct pflent pfents[NPFENTS]; /* pendant function list entry pool */
|
---|
427 | struct scndx sindex[N_SCORES]; /* score file table of contents */
|
---|
428 | struct sment *vpsms[192]; /* voice parameter general S/M pointer table */
|
---|
429 | struct sment sments[192]; /* source multiplier assignment table */
|
---|
430 | struct valent valents[NGPSRS]; /* source value table */
|
---|
431 | struct wstbl wslib[NUMWAVS]; /* waveshape library */
|
---|
432 | struct s_entry *scores[N_SCORES]; /* Score pointer table */
|
---|
433 |
|
---|
434 | struct s_time stimes[N_SCORES][N_SECTS]; /* score section SMPTE times */
|
---|
435 | struct s_entry *hplist[N_SCORES][N_TYPES]; /* Score change list pointers */
|
---|
436 | struct s_entry *seclist[N_SCORES][N_SECTS]; /* Section pointer table */
|
---|
437 |
|
---|
438 | unsigned *asgob; /* assignment display object pointer */
|
---|
439 | unsigned *consl; /* constant slice pointer */
|
---|
440 | unsigned *cursl; /* current (center) slice pointer */
|
---|
441 | unsigned *instob; /* instrument object pointer */
|
---|
442 | unsigned *librob; /* librarian display object pointer */
|
---|
443 | unsigned *menuob; /* menu display object pointer */
|
---|
444 | unsigned *nxtsl; /* next (right edge) slice pointer */
|
---|
445 | unsigned *obj0; /* object 0 VSDD RAM pointer */
|
---|
446 | unsigned *obj1; /* object 1 VSDD RAM pointer */
|
---|
447 | unsigned *obj2; /* object 2 VSDD RAM pointer */
|
---|
448 | unsigned *obj3; /* object 3 VSDD RAM pointer */
|
---|
449 | unsigned *obj4; /* object 4 VSDD RAM pointer */
|
---|
450 | unsigned *obj5; /* object 5 VSDD RAM pointer */
|
---|
451 | unsigned *obj6; /* object 6 VSDD RAM pointer */
|
---|
452 | unsigned *obj7; /* object 7 VSDD RAM pointer */
|
---|
453 | unsigned *obj8; /* object 8 VSDD RAM pointer */
|
---|
454 | unsigned *obj9; /* object 9 VSDD RAM pointer */
|
---|
455 | unsigned *obj10; /* object 10 VSDD RAM pointer */
|
---|
456 | unsigned *obj11; /* object 11 VSDD RAM pointer */
|
---|
457 | unsigned *obj12; /* object 12 VSDD RAM pointer */
|
---|
458 | unsigned *obj13; /* object 13 VSDD RAM pointer */
|
---|
459 | unsigned *obj14; /* object 14 VSDD RAM pointer */
|
---|
460 | unsigned *obj15; /* object 15 VSDD RAM pointer */
|
---|
461 | unsigned *prvsl; /* previous (left edge) slice pointer */
|
---|
462 | unsigned *saddr; /* score VSDD RAM base pointer */
|
---|
463 | unsigned *tunob; /* tuning table display object pointer */
|
---|
464 | unsigned *vtobj; /* virtual typewriter display object pointer */
|
---|
465 | unsigned *waveob; /* waveshape display object pointer */
|
---|
466 |
|
---|
467 | unsigned curintp; /* current interpolate time (FPU format) */
|
---|
468 | unsigned scrl; /* score VSDD object scroll register image */
|
---|
469 | unsigned vtbgval; /* virtual typewriter data background color */
|
---|
470 | unsigned vtfgval; /* virtual typewriter data foreground color */
|
---|
471 |
|
---|
472 | unsigned dfbuf[4096]; /* track formatting buffer */
|
---|
473 | unsigned slices[896]; /* score display slices */
|
---|
474 |
|
---|
475 | /* |
---|
476 |
|
---|
477 | */
|
---|
478 |
|
---|
479 | /* initialized variables */
|
---|
480 |
|
---|
481 | short debugsw = DEBUGVAL; /* debug output switch */
|
---|
482 |
|
---|
483 | short swback = SWBACK; /* scroll wheel look back count */
|
---|
484 | short swthr = SWTHR; /* scroll wheel movement threshold */
|
---|
485 | short swtime = SWTIME; /* scroll wheel timer scan time */
|
---|
486 | short swwait = SWWAIT; /* scroll wheel wait count */
|
---|
487 |
|
---|
488 | short tkback = TKBACK; /* trackball FIFO look back count */
|
---|
489 | short tkrmin = TKRMIN; /* trackball rate threshold */
|
---|
490 | short tkthr = TKTHR; /* trackball movement threshold */
|
---|
491 | short tktime = TKTIME; /* trackball timer scan time */
|
---|
492 | short tkwait = TKWAIT; /* trackball wait count */
|
---|
493 |
|
---|
494 | short curhold = CURHOLD; /* cursor hold time */
|
---|
495 | short hcwval = HCWVAL; /* graphics cursor X wait time */
|
---|
496 | short thcwval = THCWVAL; /* text cursor H wait time */
|
---|
497 | short tvcwval = TVCWVAL; /* text cursor V wait time */
|
---|
498 | short vcwval = VCWVAL; /* graphics cursor Y wait time */
|
---|
499 |
|
---|
500 | /* |
---|
501 |
|
---|
502 | */
|
---|
503 |
|
---|
504 | short tmultab[] = { /* time multiplier table - indexed by voltage */
|
---|
505 |
|
---|
506 | 0xFFFF, 0xFAFA, 0xF627, 0xF182, 0xED09, /* 0 */
|
---|
507 | 0xE8BA, 0xE492, 0xE08F, 0xDCB0, 0xD8F2, /* 5 */
|
---|
508 | 0xD555, 0xD1D6, 0xCE73, 0xCB2C, 0xC800, /* 10 */
|
---|
509 | 0xC4EC, 0xC1F0, 0xBF0B, 0xBC3C, 0xB981, /* 15 */
|
---|
510 | 0xB6DB, 0xB448, 0xB1C7, 0xAF57, 0xACF9, /* 20 */
|
---|
511 | 0xAAAA, 0xA86B, 0xA63B, 0xA41A, 0xA206, /* 25 */
|
---|
512 | 0xA000, 0x9E06, 0x9C18, 0x9A37, 0x9861, /* 30 */
|
---|
513 | 0x9696, 0x94D6, 0x9320, 0x9174, 0x8FD1, /* 35 */
|
---|
514 | 0x8E38, 0x8CA8, 0x8B21, 0x89A2, 0x882B, /* 40 */
|
---|
515 | 0x86BC, 0x8555, 0x83F5, 0x829C, 0x814A, /* 45 */
|
---|
516 | 0x8000, 0x7EBB, 0x7D7D, 0x7C45, 0x7B13, /* 50 */
|
---|
517 | 0x79E7, 0x78C1, 0x77A0, 0x7684, 0x756E, /* 55 */
|
---|
518 | 0x745D, 0x7350, 0x7249, 0x7146, 0x7047, /* 60 */
|
---|
519 | 0x6F4D, 0x6E58, 0x6D66, 0x6C79, 0x6B90, /* 65 */
|
---|
520 | 0x6AAA, 0x69C8, 0x68EB, 0x6810, 0x6739, /* 70 */
|
---|
521 | 0x6666, 0x6596, 0x64C9, 0x6400, 0x6339, /* 75 */
|
---|
522 | 0x6276, 0x61B5, 0x60F8, 0x603D, 0x5F85, /* 80 */
|
---|
523 | 0x5ED0, 0x5E1E, 0x5D6E, 0x5CC0, 0x5C16, /* 85 */
|
---|
524 | 0x5B6D, 0x5AC7, 0x5A24, 0x5982, 0x58E3, /* 90 */
|
---|
525 | 0x5846, 0x57AB, 0x5713, 0x567C, 0x55E7, /* 95 */
|
---|
526 | 0x5555 /* 100 */
|
---|
527 | };
|
---|
528 |
|
---|
529 | /* |
---|
530 |
|
---|
531 | */
|
---|
532 |
|
---|
533 | short crate0[] = { /* cursor rate table 1 */
|
---|
534 |
|
---|
535 | 0, 0, 0, 0, 0, 0, 0, 0, /* 0..7 */
|
---|
536 | 0, 0, 0, 0, 1, 1, 1, 1, /* 8..15 */
|
---|
537 | 1, 1, 1, 1, 1, 1, 1, 1, /* 16..23 */
|
---|
538 | 1, 1, 1, 1, 1, 1, 1, 1, /* 24..31 */
|
---|
539 | 1, 1, 1, 1, 1, 1, 1, 1, /* 32..39 */
|
---|
540 | 1, 1, 1, 1, 1, 1, 1, 1, /* 40..47 */
|
---|
541 | 1, 1, 1, 1, 1, 1, 1, 1, /* 48..55 */
|
---|
542 | 1, 1, 1, 1, 1, 1, 1, 1 /* 56..63 */
|
---|
543 | };
|
---|
544 |
|
---|
545 | short crate1[] = { /* cursor rate table 1 */
|
---|
546 |
|
---|
547 | 0, 0, 0, 0, 0, 0, 0, 0, /* 0..7 */
|
---|
548 | 1, 1, 1, 1, 1, 1, 1, 1, /* 8..15 */
|
---|
549 | 3, 3, 3, 3, 3, 3, 3, 3, /* 16..23 */
|
---|
550 | 5, 5, 5, 5, 5, 5, 5, 5, /* 24..31 */
|
---|
551 | 7, 7, 7, 7, 7, 7, 7, 7, /* 32..39 */
|
---|
552 | 9, 9, 9, 9, 9, 9, 9, 9, /* 40..47 */
|
---|
553 | 11, 11, 11, 11, 11, 11, 11, 11, /* 48..55 */
|
---|
554 | 13, 13, 13, 13, 13, 13, 13, 13 /* 56..63 */
|
---|
555 | };
|
---|
556 |
|
---|
557 | short crate2[] = { /* cursor rate table 2 */
|
---|
558 |
|
---|
559 | 0, 0, 0, 0, 0, 0, 0, 0, /* 0..7 */
|
---|
560 | 1, 1, 1, 1, 1, 1, 1, 1, /* 8..15 */
|
---|
561 | 2, 2, 2, 2, 2, 2, 2, 2, /* 16..23 */
|
---|
562 | 4, 4, 4, 4, 8, 8, 8, 8, /* 24..31 */
|
---|
563 | 16, 16, 16, 16, 32, 32, 32, 32, /* 32..39 */
|
---|
564 | 64, 64, 64, 64,128,128,128,128, /* 40..47 */
|
---|
565 | 96, 96, 96, 96,256,256,256,256, /* 48..55 */
|
---|
566 | 256,256,256,256,256,256,256,256 /* 56..63 */
|
---|
567 | };
|
---|
568 |
|
---|
569 | /* |
---|
570 |
|
---|
571 | */
|
---|
572 |
|
---|
573 | short loctab[9] = {
|
---|
574 |
|
---|
575 | 0, /* 0 - left */
|
---|
576 |
|
---|
577 | 125 << 5, /* 1 */
|
---|
578 | 250 << 5, /* 2 */
|
---|
579 | 375 << 5, /* 3 */
|
---|
580 |
|
---|
581 | 500 << 5, /* 4 - center */
|
---|
582 |
|
---|
583 | 625 << 5, /* 5 */
|
---|
584 | 750 << 5, /* 6 */
|
---|
585 | 875 << 5, /* 7 */
|
---|
586 |
|
---|
587 | 1000 << 5 /* 8 - right */
|
---|
588 | };
|
---|
589 |
|
---|
590 | /* |
---|
591 |
|
---|
592 | */
|
---|
593 |
|
---|
594 | /*
|
---|
595 | =============================================================================
|
---|
596 | valof() -- return initial value of a source
|
---|
597 | =============================================================================
|
---|
598 | */
|
---|
599 |
|
---|
600 | short valof(short srcv)
|
---|
601 | {
|
---|
602 | switch (srcv) {
|
---|
603 |
|
---|
604 | case SM_NONE: /* -none- */
|
---|
605 | return(0);
|
---|
606 |
|
---|
607 | case SM_RAND: /* Random */
|
---|
608 | return(xgetran(0));
|
---|
609 |
|
---|
610 | case SM_CTL1: /* Ctl V1 */
|
---|
611 | return(SM_SCALE(sigtab[79][0]));
|
---|
612 |
|
---|
613 | case SM_PTCH: /* Pitch */
|
---|
614 | case SM_KPRS: /* Key Prs */
|
---|
615 | case SM_KVEL: /* Key Vel */
|
---|
616 | return(0);
|
---|
617 |
|
---|
618 | case SM_PED1: /* Pedal 1 */
|
---|
619 | return(SM_SCALE(sigtab[77][0]));
|
---|
620 |
|
---|
621 | case SM_HTPW: /* Hor Tab / Pch Whl */
|
---|
622 | return(0);
|
---|
623 |
|
---|
624 | case SM_VTMW: /* Vrt Tab / Mod Whl */
|
---|
625 | return(SM_SCALE(sigtab[54][0]));
|
---|
626 |
|
---|
627 | case SM_LPBR: /* LongPot / Breath */
|
---|
628 | return(SM_SCALE(sigtab[57][0]));
|
---|
629 |
|
---|
630 | default:
|
---|
631 | return(0);
|
---|
632 | }
|
---|
633 | }
|
---|
634 |
|
---|
635 | /* |
---|
636 |
|
---|
637 | */
|
---|
638 |
|
---|
639 | /*
|
---|
640 | =============================================================================
|
---|
641 | inismtb() -- initialize source / multiplier data structures
|
---|
642 | =============================================================================
|
---|
643 | */
|
---|
644 |
|
---|
645 | void inismtb(void)
|
---|
646 | {
|
---|
647 | register short i, oldi;
|
---|
648 |
|
---|
649 | oldi = setipl(FPU_DI);
|
---|
650 |
|
---|
651 | /* ++++++++++++++++++++++++++++ FPU interrupts disabled +++++++++++++++++++++ */
|
---|
652 |
|
---|
653 | for (i = 0; i < NGPSRS; i++) {
|
---|
654 |
|
---|
655 | valents[i].nxt = &valents[i];
|
---|
656 | valents[i].prv = &valents[i];
|
---|
657 | valents[i].val = valof(i & 0x000F);
|
---|
658 | }
|
---|
659 |
|
---|
660 | for (i = 0; i < 192; i++) {
|
---|
661 |
|
---|
662 | vpsms[i] = &sments[i];
|
---|
663 |
|
---|
664 | sments[i].prv = (struct sment *)&valents[0];
|
---|
665 | sments[i].nxt = valents[0].nxt;
|
---|
666 |
|
---|
667 | valents[0].nxt->prv = &sments[i];
|
---|
668 | valents[0].nxt = &sments[i];
|
---|
669 |
|
---|
670 | sments[i].vp = i;
|
---|
671 | sments[i].sm = 0;
|
---|
672 | }
|
---|
673 |
|
---|
674 | setipl(oldi);
|
---|
675 |
|
---|
676 | /* ++++++++++++++++++++++++++++ Interrupts restored +++++++++++++++++++++++++ */
|
---|
677 |
|
---|
678 | }
|
---|
679 |
|
---|
680 | /* |
---|
681 |
|
---|
682 | */
|
---|
683 |
|
---|
684 | /*
|
---|
685 | =============================================================================
|
---|
686 | clrpfl() -- clear pendant function list
|
---|
687 | =============================================================================
|
---|
688 | */
|
---|
689 |
|
---|
690 | void clrpfl(void)
|
---|
691 | {
|
---|
692 | register short i;
|
---|
693 |
|
---|
694 | memsetw(&pfents[0], 0, (NPFENTS * sizeof (struct pflent))/2);
|
---|
695 |
|
---|
696 | for (i = 0; i < NPFENTS-1; i++)
|
---|
697 | pfents[i].nextpf = &pfents[i+1];
|
---|
698 |
|
---|
699 | pfqhdr = &pfents[0];
|
---|
700 | pflist = (struct pflent *)NULL;
|
---|
701 | }
|
---|
702 |
|
---|
703 | /* |
---|
704 |
|
---|
705 | */
|
---|
706 |
|
---|
707 | /*
|
---|
708 | =============================================================================
|
---|
709 | im700() -- initialize MIDAS 700
|
---|
710 | =============================================================================
|
---|
711 | */
|
---|
712 |
|
---|
713 | void im700(void)
|
---|
714 | {
|
---|
715 | register short i, j, k;
|
---|
716 | register char *ioadr;
|
---|
717 | register struct instdef *ip;
|
---|
718 |
|
---|
719 | debugsw = DEBUGVAL; /* initialize debug switch */
|
---|
720 |
|
---|
721 | GLCinit(); /* initialize the GLC */
|
---|
722 | GLCcurs(G_ON);
|
---|
723 | GLCtext(2, 1, "MIDAS 7 -- Initialization in progress -- Please stand by");
|
---|
724 | GLCcurs(G_OFF);
|
---|
725 |
|
---|
726 | vsndpal(blakpal); /* setup the blackout palette */
|
---|
727 |
|
---|
728 | VHinit(); /* clear the video hardware */
|
---|
729 | VSinit(); /* ... and the video software */
|
---|
730 |
|
---|
731 | memset(keystat, 0, 24); /* clear front panel key status */
|
---|
732 | memset(trgtab, 0, NTRIGS); /* clear trigger status table */
|
---|
733 | memset(mctlval, 0, NCTRLS); /* clear MIDI controller values */
|
---|
734 |
|
---|
735 | memsetw(grpmode, 0, 12); /* set all groups to PLAY */
|
---|
736 | memsetw(grpstat, GS_ENBL, 12); /* enable all groups for param. artic. */
|
---|
737 | memsetw(grpsel, TRUE, 12); /* enable all groups for instr. sel. */
|
---|
738 | memsetw(sigtab, 0, ((sizeof sigtab) / (sizeof sigtab[0][0])));
|
---|
739 |
|
---|
740 | memsetw(veltab, SM_SCALE(64), NTRIGS); /* clear velocity table */
|
---|
741 | memsetw(lastvel, SM_SCALE(64), 12); /* clear last velocity table */
|
---|
742 | memsetw(prstab, 0, NTRIGS); /* clear pressure table */
|
---|
743 |
|
---|
744 | curintp = tofpu(100); /* set default interpolate time */
|
---|
745 |
|
---|
746 | angroup = -1; /* analog values: group 1, not shown */
|
---|
747 | ancmsw = FALSE; /* analog variable mode from grpmode */
|
---|
748 | velflag = FALSE; /* velocity not displayed */
|
---|
749 |
|
---|
750 | dubsw = TRUE; /* set overdub mode */
|
---|
751 |
|
---|
752 | sd = D_FWD; /* set display direction */
|
---|
753 | se = D_FWD; /* set execution direction */
|
---|
754 |
|
---|
755 | swinit(); /* reset the scroll wheel variables */
|
---|
756 |
|
---|
757 | inismtb(); /* clear the S/M data structures */
|
---|
758 | clrnl(); /* clear note entry lists */
|
---|
759 | clrpfl(); /* clear pendant function list */
|
---|
760 |
|
---|
761 | lstbgnc = 0; /* reset last note begin count */
|
---|
762 | lstendc = 0; /* reset last note end count */
|
---|
763 | lstflag = TRUE; /* set end of note entry list flag */
|
---|
764 |
|
---|
765 | memsetw(lstbgns, 0, (NLSTENTS << 1)); /* clear note begin list */
|
---|
766 | memsetw(lstends, 0, (NLSTENTS << 1)); /* clear note end list */
|
---|
767 |
|
---|
768 | /* set funcndx[] entries */
|
---|
769 |
|
---|
770 | for (i = 0; i < 12; i++) {
|
---|
771 |
|
---|
772 | ip = &vbufs[i];
|
---|
773 |
|
---|
774 | for (j = 0; j < NFINST; j++) {
|
---|
775 |
|
---|
776 | k = (i << 4) + fnoff[j];
|
---|
777 |
|
---|
778 | funcndx[k][0] = &ip->idhfnc[j];
|
---|
779 | funcndx[k][1] = ip->idhpnt;
|
---|
780 | }
|
---|
781 | }
|
---|
782 |
|
---|
783 | /* |
---|
784 |
|
---|
785 | */
|
---|
786 | for (i = 0; i < 3; i++) { /* reset the state machines */
|
---|
787 |
|
---|
788 | msmstv[i] = 0; /* state = 0 */
|
---|
789 | mrstat[i] = 0; /* clear running status */
|
---|
790 | mdbyte[i] = 0; /* clear first byte buffer */
|
---|
791 | masens[i] = 0; /* clear active sensing */
|
---|
792 | }
|
---|
793 |
|
---|
794 | for (i = 0; i < 48; i++) {
|
---|
795 |
|
---|
796 | mpbend[i] = 0; /* clear bend values */
|
---|
797 | mpsust[i] = 0; /* clear sustain values */
|
---|
798 | }
|
---|
799 |
|
---|
800 | for (i = 0; i < 12; i++) {
|
---|
801 |
|
---|
802 | for (j = 0; j < 6; j++) {
|
---|
803 |
|
---|
804 | varmode[j][i] = 0; /* set r/p mode */
|
---|
805 | anrs[j][i] = 4; /* set analog resolution */
|
---|
806 | }
|
---|
807 |
|
---|
808 | setdyn(i, 6); /* set group dynamics */
|
---|
809 | setloc(i, 4); /* set group locations */
|
---|
810 | lastvce[i] = 0; /* clear last voice assigned */
|
---|
811 | vce2trg[i] = -1; /* clear voice to trigger table */
|
---|
812 | }
|
---|
813 |
|
---|
814 | for (i = 0; i < NLTYPES; i++) {
|
---|
815 |
|
---|
816 | memset(loadedc[i], ' ', 37);
|
---|
817 | memset(loadedf[i], ' ', 8);
|
---|
818 | }
|
---|
819 |
|
---|
820 | memset(ldfile, ' ', 8); /* clear the library file name field */
|
---|
821 | ldfile[8] = '\0';
|
---|
822 |
|
---|
823 | memset(ldcmnt, ' ', 37); /* clear the library comment field */
|
---|
824 | ldcmnt[37] = '\0';
|
---|
825 |
|
---|
826 | /* |
---|
827 |
|
---|
828 | */
|
---|
829 | xkcount = 1; /* reset cursor control variables */
|
---|
830 | ykcount = 1;
|
---|
831 | xycntr = XYCENTRE;
|
---|
832 |
|
---|
833 | clksrc = CK_LOCAL; /* clock source = local */
|
---|
834 | clkctl = CK_LOCAL; /* clock control = local */
|
---|
835 | clkrun = FALSE; /* clock stopped */
|
---|
836 | midiclk = FALSE; /* ... */
|
---|
837 | pulsclk = FALSE; /* ... */
|
---|
838 | stepclk = FALSE; /* ... */
|
---|
839 | fc_sw = 0; /* stop the frame clock */
|
---|
840 | fc_val = 0L; /* ... and reset it */
|
---|
841 | scrlpot = 0; /* not scrolling */
|
---|
842 | tmpomlt = 50; /* initialize tempo multiplier */
|
---|
843 | io_leds = 0x18; /* ... and turn off the LEDs */
|
---|
844 | io_leds = 0x19; /* ... */
|
---|
845 | settmpo(60); /* set default tempo */
|
---|
846 |
|
---|
847 | timemlt = tmultab[50]; /* initialize time scaling */
|
---|
848 | io_leds = 0x1A;
|
---|
849 | io_leds = 0x1B;
|
---|
850 |
|
---|
851 | tuneval = 0; /* initialize fine tuning */
|
---|
852 | io_leds = 0x1C;
|
---|
853 | io_leds = 0x1D;
|
---|
854 |
|
---|
855 | for (i = 0; i < 12; i++) /* setup default values for gtctab */
|
---|
856 | gtctab[i] = ((i+3) << 12) | ((i+3) << 8) | ((i+3) << 4) | (i+3);
|
---|
857 |
|
---|
858 | editsw = FALSE; /* setup edit switch state */
|
---|
859 | io_leds = 0x1E;
|
---|
860 | ioadr = &io_ser + 2L;
|
---|
861 | editss = *ioadr & 0x0008;
|
---|
862 |
|
---|
863 | ac_code = N_SHARP; /* default accidentals to display as sharps */
|
---|
864 |
|
---|
865 | memsetw(articen, TRUE, 12); /* enable articulation for all voices */
|
---|
866 | /* |
---|
867 |
|
---|
868 | */
|
---|
869 | curmove = cmvgen;
|
---|
870 | premove = nokey;
|
---|
871 | pstmove = nokey;
|
---|
872 | curtype = stdctp2;
|
---|
873 |
|
---|
874 | x_key = nokey; /* setup default key processors */
|
---|
875 | e_key = nokey;
|
---|
876 | m_key = stdmkey;
|
---|
877 | d_key = nokey;
|
---|
878 |
|
---|
879 | not_fld = nonf;
|
---|
880 |
|
---|
881 | cx_key = cxkstd; /* setup default cursor processors */
|
---|
882 | cy_key = cykstd;
|
---|
883 | cx_upd = cxgen;
|
---|
884 | cy_upd = cygen;
|
---|
885 | xy_up = nokey;
|
---|
886 | xy_dn = nokey;
|
---|
887 |
|
---|
888 | curslim = 349; /* cursor limit for graphics to text switch */
|
---|
889 |
|
---|
890 | chtime = hcwval; /* initialize default cursor wait times */
|
---|
891 | cvtime = vcwval;
|
---|
892 | nchwait = curhold;
|
---|
893 | ncvwait = curhold;
|
---|
894 | chwait = 1;
|
---|
895 | cvwait = 1;
|
---|
896 |
|
---|
897 | cratex = crate1; /* initialize default cursor x rate table */
|
---|
898 | cratey = crate1; /* initialize default cursor y rate table */
|
---|
899 |
|
---|
900 | cmfirst = TRUE; /* setup for first motion of cursor */
|
---|
901 | cmtype = CT_GRAF;
|
---|
902 |
|
---|
903 | cxval = XCTR; /* default cursor to center of screen */
|
---|
904 | cyval = YCTR;
|
---|
905 |
|
---|
906 | stcrow = cyval / 14; /* keep text position in sync */
|
---|
907 | stccol = cxval / 8;
|
---|
908 |
|
---|
909 | submenu = FALSE; /* no submenu up to start with */
|
---|
910 | /* |
---|
911 |
|
---|
912 | */
|
---|
913 | curinst = 0; /* current instrument = 0 */
|
---|
914 | curfunc = 12; /* current function = 12 = level */
|
---|
915 | curvce = 0; /* current voice = 0 */
|
---|
916 |
|
---|
917 | asmode = FALSE; /* deselect assignment mode */
|
---|
918 | gomode = GO_NULL; /* deselect go to mode */
|
---|
919 | ismode = IS_NULL; /* deselect instrument select mode */
|
---|
920 | pkctrl = PK_PFRM; /* select local performance key state */
|
---|
921 | oldpk = pkctrl; /* ... */
|
---|
922 | sliders = LS_PRMTR; /* setup the LCD display pots and switches */
|
---|
923 | oldsl = sliders; /* ... */
|
---|
924 | swpt = &t_prmtr; /* ... */
|
---|
925 | oldsw = swpt; /* ... */
|
---|
926 | setleds(); /* set performance keyboard leds */
|
---|
927 |
|
---|
928 | initpt(); /* initialize the patch table */
|
---|
929 | initsq(); /* initialize the sequence table */
|
---|
930 | initil(); /* initialize the instrument library */
|
---|
931 | iniwslb(); /* initialize the waveshape library */
|
---|
932 | inital(); /* initialize the assignment library */
|
---|
933 | inittl(); /* initialize the tuning table library */
|
---|
934 | scinit(); /* initialize the score */
|
---|
935 |
|
---|
936 | clearer(1, 0); /* reset the fpu to its nominal values */
|
---|
937 | getasg(curasg = 0); /* setup default assignments */
|
---|
938 |
|
---|
939 | lcdlbls(); /* put up the LCD display */
|
---|
940 | lampsw = FALSE; /* enable LCD timeout */
|
---|
941 | }
|
---|