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