1 | /*
|
---|
2 | =============================================================================
|
---|
3 | idfield.c -- instrument display field processing and cursor motion
|
---|
4 | Version 89 -- 1989-11-15 -- D.N. Lynx Crowe
|
---|
5 | =============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "stddefs.h"
|
---|
9 | #include "fields.h"
|
---|
10 | #include "hwdefs.h"
|
---|
11 | #include "vsdd.h"
|
---|
12 | #include "graphdef.h"
|
---|
13 | #include "charset.h"
|
---|
14 | #include "smdefs.h"
|
---|
15 | #include "curpak.h"
|
---|
16 |
|
---|
17 | #include "midas.h"
|
---|
18 | #include "instdsp.h"
|
---|
19 |
|
---|
20 | extern void select(void);
|
---|
21 | extern void stdmkey(void);
|
---|
22 | extern void stddkey(void);
|
---|
23 | extern short nokey(void);
|
---|
24 | extern void cxkstd(void);
|
---|
25 | extern void cykstd(void);
|
---|
26 | extern short vtoy(short val, short window);
|
---|
27 | extern short ttox(unsigned time, short window);
|
---|
28 | extern short timeto(short fn, short pj);
|
---|
29 | extern void vcputsv(int *obase, int nw, int fg, int bg, int row, int col, char *str, int pitch);
|
---|
30 | extern void dswin(short n);
|
---|
31 | extern short stdctp1(void);
|
---|
32 | extern short whatbox(void);
|
---|
33 | extern short inspnt(struct instdef *ip, short fn, short inpnt);
|
---|
34 | extern void pntsel(void);
|
---|
35 | extern void setseg(short pn, unsigned ptime);
|
---|
36 | extern void showpt(short q);
|
---|
37 |
|
---|
38 | extern short et_null(void);
|
---|
39 | extern short ef_null(void);
|
---|
40 | extern short rd_null(void);
|
---|
41 | extern short nd_null(void);
|
---|
42 | extern short et_ipnt(short n);
|
---|
43 | extern short ef_ipnt(short n);
|
---|
44 | extern short rd_ipnt(short n);
|
---|
45 | extern short nd_ipnt(short n, short k);
|
---|
46 | extern short et_idin(short n);
|
---|
47 | extern short ef_idin(short n);
|
---|
48 | extern short rd_idin(short n);
|
---|
49 | extern short nd_idin(short n, short k);
|
---|
50 | extern short et_ivce(short n);
|
---|
51 | extern short ef_ivce(short n);
|
---|
52 | extern short rd_ivce(short n);
|
---|
53 | extern short nd_ivce(short n, short k);
|
---|
54 | extern short et_icnf(short n);
|
---|
55 | extern short ef_icnf(short n);
|
---|
56 | extern short rd_icnf(short n);
|
---|
57 | extern short nd_icnf(short n, short k);
|
---|
58 | extern short et_ival(short n);
|
---|
59 | extern short ef_ival(short n);
|
---|
60 | extern short rd_ival(short n);
|
---|
61 | extern short nd_ival(short n, short k);
|
---|
62 | extern short et_itim(short n);
|
---|
63 | extern short ef_itim(short n);
|
---|
64 | extern short rd_itim(short n);
|
---|
65 | extern short nd_itim(short n, short k);
|
---|
66 | extern short et_iosc(short nn);
|
---|
67 | extern short ef_iosc(short nn);
|
---|
68 | extern short rd_iosc(short nn);
|
---|
69 | extern short nd_iosc(short nn, short k);
|
---|
70 | extern short et_iact(short nn);
|
---|
71 | extern short ef_iact(short nn);
|
---|
72 | extern void rd_iact(short nn);
|
---|
73 | extern short nd_iact(short nn, short k);
|
---|
74 | extern short et_iwsn(short nn);
|
---|
75 | extern short ef_iwsn(short nn);
|
---|
76 | extern short rd_iwsn(short nn);
|
---|
77 | extern short nd_iwsn(short nn, short k);
|
---|
78 | extern short et_ires(short n);
|
---|
79 | extern short ef_ires(short n);
|
---|
80 | extern short rd_ires(short n);
|
---|
81 | extern short nd_ires(short n, short k);
|
---|
82 | extern short et_imlt(short n);
|
---|
83 | extern short ef_imlt(short n);
|
---|
84 | extern short rd_imlt(short n);
|
---|
85 | extern short nd_imlt(short n, short k);
|
---|
86 |
|
---|
87 | extern unsigned fromfpu(unsigned fputime);
|
---|
88 |
|
---|
89 | extern char *memset(char *sp, char c, int n);
|
---|
90 |
|
---|
91 | /* |
---|
92 |
|
---|
93 | */
|
---|
94 |
|
---|
95 | extern short curvce, curfunc, curpnt, hitbox, astat, idnamsw;
|
---|
96 | extern short cxval, cyval, cxrate, cyrate, curslim, cmtype, cmfirst;
|
---|
97 | extern short pecase, pntsv, npts, subj, idimsw, wcflag, imflag;
|
---|
98 | extern short idcfsw, idsrcsw, vtcrow, vtccol, stcrow, stccol;
|
---|
99 | extern short vtxval, vtyval;
|
---|
100 |
|
---|
101 | extern short temax, temin;
|
---|
102 |
|
---|
103 | extern short *cratex, *cratey, crate0[], crate1[];
|
---|
104 |
|
---|
105 | extern unsigned *instob;
|
---|
106 |
|
---|
107 | extern char bfs[];
|
---|
108 | extern char *idbxlbl[];
|
---|
109 |
|
---|
110 | extern short fnoff[];
|
---|
111 | extern short idbox[][8];
|
---|
112 |
|
---|
113 | extern struct selbox *csbp;
|
---|
114 | extern struct selbox idboxes[];
|
---|
115 |
|
---|
116 | extern struct sment sments[];
|
---|
117 | extern struct sment *vpsms[];
|
---|
118 |
|
---|
119 | extern struct valent valents[];
|
---|
120 |
|
---|
121 | extern struct instpnt *pntptr;
|
---|
122 |
|
---|
123 | extern struct instdef vbufs[];
|
---|
124 |
|
---|
125 | void idx_key(void);
|
---|
126 | short idnfld(short k);
|
---|
127 | void idcxupd(void);
|
---|
128 | void idcyupd(void);
|
---|
129 | void ikyup(void);
|
---|
130 | void ikydn(void);
|
---|
131 |
|
---|
132 | /* |
---|
133 |
|
---|
134 | */
|
---|
135 |
|
---|
136 | short zonemax[9] = { 63, 119, 175, 231, 287, 343, 399, 455, 509};
|
---|
137 |
|
---|
138 | short zoneinc[9] = { 2, 2, 4, 9, 18, 36, 73, 146, 303};
|
---|
139 |
|
---|
140 | struct fet id_fet1[] = {
|
---|
141 |
|
---|
142 | { 5, 62, 62, 12, et_ires, ef_ires, rd_ires, nd_ires},
|
---|
143 | {16, 1, 12, 13, et_imlt, ef_imlt, rd_imlt, nd_imlt},
|
---|
144 | {16, 15, 16, 14, et_ipnt, ef_ipnt, rd_ipnt, nd_ipnt},
|
---|
145 | {16, 19, 24, 15, et_itim, ef_itim, rd_itim, nd_itim},
|
---|
146 | {16, 27, 44, 16, et_ival, ef_ival, rd_ival, nd_ival},
|
---|
147 | {16, 47, 62, 17, et_iact, ef_iact, rd_iact, nd_iact},
|
---|
148 | {17, 12, 13, 18, et_icnf, ef_icnf, rd_icnf, nd_icnf},
|
---|
149 | {17, 23, 24, 19, et_ivce, ef_ivce, rd_ivce, nd_ivce},
|
---|
150 | {17, 31, 32, 19, et_idin, ef_idin, rd_idin, nd_idin},
|
---|
151 | {17, 57, 58, 0x0015, et_iwsn, ef_iwsn, rd_iwsn, nd_iwsn},
|
---|
152 | {17, 61, 62, 0x0115, et_iwsn, ef_iwsn, rd_iwsn, nd_iwsn},
|
---|
153 | {18, 36, 46, 0x8014, et_iosc, ef_iosc, rd_iosc, nd_iosc},
|
---|
154 | {18, 17, 32, 0, et_null, ef_null, rd_null, nd_null},
|
---|
155 | {19, 36, 46, 0x8114, et_iosc, ef_iosc, rd_iosc, nd_iosc},
|
---|
156 | {19, 17, 32, 0, et_null, ef_null, rd_null, nd_null},
|
---|
157 | {20, 36, 46, 0x8214, et_iosc, ef_iosc, rd_iosc, nd_iosc},
|
---|
158 | {20, 17, 32, 0, et_null, ef_null, rd_null, nd_null},
|
---|
159 | {21, 36, 46, 0x8314, et_iosc, ef_iosc, rd_iosc, nd_iosc},
|
---|
160 | {21, 17, 32, 0, et_null, ef_null, rd_null, nd_null},
|
---|
161 |
|
---|
162 | { 0, 0, 0, 0x0000, FN_NULL, FN_NULL, FN_NULL, FN_NULL}
|
---|
163 | };
|
---|
164 |
|
---|
165 | char *srctbl[] = { /* source label table */
|
---|
166 |
|
---|
167 | " ", /* 0 */
|
---|
168 | "Random ", /* 1 */
|
---|
169 | "GPC/CV1", /* 2 */
|
---|
170 | "???????", /* 3 */
|
---|
171 | "???????", /* 4 */
|
---|
172 | "Pitch ", /* 5 */
|
---|
173 | "Key Prs", /* 6 */
|
---|
174 | "Key Vel", /* 7 */
|
---|
175 | "Pedal 1", /* 8 */
|
---|
176 | "???????", /* 9 */
|
---|
177 | "Freq ", /* 10 */
|
---|
178 | "PchW/HT", /* 11 */
|
---|
179 | "ModW/VT", /* 12 */
|
---|
180 | "Brth/LP", /* 13 */
|
---|
181 | };
|
---|
182 |
|
---|
183 | /* |
---|
184 |
|
---|
185 | */
|
---|
186 |
|
---|
187 | struct curpak id_flds = {
|
---|
188 |
|
---|
189 | stdctp1, /* curtype */
|
---|
190 | nokey, /* premove */
|
---|
191 | nokey, /* pstmove */
|
---|
192 | cxkstd, /* cx_key */
|
---|
193 | cykstd, /* cy_key */
|
---|
194 | idcxupd, /* cx_upd */
|
---|
195 | idcyupd, /* cy_upd */
|
---|
196 | ikyup, /* xy_up */
|
---|
197 | ikydn, /* xy_dn */
|
---|
198 | idx_key, /* x_key */
|
---|
199 | select, /* e_key */
|
---|
200 | stdmkey, /* m_key */
|
---|
201 | stddkey, /* d_key */
|
---|
202 | idnfld, /* not_fld */
|
---|
203 | id_fet1, /* curfet */
|
---|
204 | idboxes, /* csbp */
|
---|
205 | crate1, /* cratex */
|
---|
206 | crate1, /* cratey */
|
---|
207 | CT_GRAF, /* cmtype */
|
---|
208 | ICURX, /* cxval */
|
---|
209 | ICURY /* cyval */
|
---|
210 | };
|
---|
211 |
|
---|
212 | /* |
---|
213 |
|
---|
214 | */
|
---|
215 |
|
---|
216 | /*
|
---|
217 | =============================================================================
|
---|
218 | ikydn() -- process instrument cursor key down
|
---|
219 | =============================================================================
|
---|
220 | */
|
---|
221 |
|
---|
222 | void ikydn(void)
|
---|
223 | {
|
---|
224 | imflag = FALSE;
|
---|
225 | }
|
---|
226 |
|
---|
227 | /*
|
---|
228 | =============================================================================
|
---|
229 | ikyup() -- process instrument cursor key up
|
---|
230 | =============================================================================
|
---|
231 | */
|
---|
232 |
|
---|
233 | void ikyup(void)
|
---|
234 | {
|
---|
235 | if (imflag)
|
---|
236 | modinst();
|
---|
237 | }
|
---|
238 | /* |
---|
239 |
|
---|
240 | */
|
---|
241 |
|
---|
242 | /*
|
---|
243 | =============================================================================
|
---|
244 | idcyupd() -- update cursor y location from value
|
---|
245 | =============================================================================
|
---|
246 | */
|
---|
247 |
|
---|
248 | void idcyupd(void)
|
---|
249 | {
|
---|
250 | register short pval, vh, vl;
|
---|
251 |
|
---|
252 | if (wcflag NE -1) /* ws/cf menu page can't be up */
|
---|
253 | return;
|
---|
254 |
|
---|
255 | if (idimsw) /* no y update if instrument menu is up */
|
---|
256 | return;
|
---|
257 |
|
---|
258 | if (idsrcsw OR idcfsw) { /* see if we're in the menu area */
|
---|
259 |
|
---|
260 | vtcrow = YTOR(vtyval += cyrate);
|
---|
261 |
|
---|
262 | if (vtcrow > 24)
|
---|
263 | vtyval = RTOY(vtcrow = 24);
|
---|
264 | else if (vtcrow < 22)
|
---|
265 | vtyval = RTOY(vtcrow = 22);
|
---|
266 |
|
---|
267 | } else if (idnamsw) { /* see if we're in the typewriter */
|
---|
268 |
|
---|
269 | vtcyupd();
|
---|
270 |
|
---|
271 | } else if (pntsv) { /* see if we're moving a point */
|
---|
272 |
|
---|
273 | pval = (pntptr->ipval >> 5) - (cyrate * 7);
|
---|
274 |
|
---|
275 | if (pval GT 1000) /* limit at +10.00 */
|
---|
276 | pval = 1000;
|
---|
277 | else if (pval LT 0) /* limit at +00.00 */
|
---|
278 | pval = 0;
|
---|
279 |
|
---|
280 | cyval = vtoy(pval, 12); /* new cursor location */
|
---|
281 | pntptr->ipval = pval << 5; /* update function value */
|
---|
282 |
|
---|
283 | vh = pval / 100; /* display the new value */
|
---|
284 | vl = pval - (vh * 100);
|
---|
285 |
|
---|
286 | sprintf(bfs, "%02d.%02d", vh, vl);
|
---|
287 |
|
---|
288 | vbank(0);
|
---|
289 | vcputsv(instob, 64, idbox[16][4], idbox[16][5],
|
---|
290 | idbox[16][6] + 1, idbox[16][7], bfs, 14);
|
---|
291 |
|
---|
292 | imflag = TRUE;
|
---|
293 | /* |
---|
294 |
|
---|
295 | */
|
---|
296 | } else { /* just moving the cursor */
|
---|
297 |
|
---|
298 | cyval += cyrate;
|
---|
299 |
|
---|
300 | if (cyval GT (CYMAX - 1))
|
---|
301 | cyval = CYMAX - 1;
|
---|
302 | else if (cyval LT 1)
|
---|
303 | cyval = 1;
|
---|
304 | }
|
---|
305 | }
|
---|
306 |
|
---|
307 | /* |
---|
308 |
|
---|
309 | */
|
---|
310 |
|
---|
311 | /*
|
---|
312 | =============================================================================
|
---|
313 | idcxupd() -- update cursor x location from time
|
---|
314 | =============================================================================
|
---|
315 | */
|
---|
316 |
|
---|
317 | void idcxupd(void)
|
---|
318 | {
|
---|
319 | register unsigned th, tl;
|
---|
320 | register unsigned fptime, stime;
|
---|
321 | short zone;
|
---|
322 |
|
---|
323 | if (idimsw) { /* see if instrument menu is up */
|
---|
324 |
|
---|
325 | cxval += cxrate;
|
---|
326 |
|
---|
327 | if (cxval > CTOX(32))
|
---|
328 | cxval = CTOX(32);
|
---|
329 | else if (cxval < CTOX(26))
|
---|
330 | cxval = CTOX(26);
|
---|
331 |
|
---|
332 | } if (idsrcsw OR idcfsw) { /* see if we're in a submenu */
|
---|
333 |
|
---|
334 | vtccol = XTOC(vtxval += cxrate);
|
---|
335 |
|
---|
336 | if (vtccol > 46)
|
---|
337 | vtxval = CTOX(vtccol = 46);
|
---|
338 | else if (vtccol < 17)
|
---|
339 | vtxval = CTOX(vtccol = 17);
|
---|
340 |
|
---|
341 | } else if (idnamsw) { /* see if we're in the typewriter */
|
---|
342 |
|
---|
343 | vtcxupd();
|
---|
344 | /* |
---|
345 |
|
---|
346 | */
|
---|
347 | } else if (pntsv) { /* see if we're moving a point */
|
---|
348 |
|
---|
349 | for (zone = 0; zone LE 8; zone++) /* find display zone */
|
---|
350 | if (cxval LE zonemax[zone])
|
---|
351 | break;
|
---|
352 |
|
---|
353 | switch (pecase) {
|
---|
354 |
|
---|
355 | case 0: /* single point */
|
---|
356 | case 1: /* last point */
|
---|
357 |
|
---|
358 | if (cxrate GE 0)
|
---|
359 | fptime = addfpu(pntptr->iptim,
|
---|
360 | cxrate * zoneinc[zone]);
|
---|
361 | else
|
---|
362 | fptime = subfpu(pntptr->iptim,
|
---|
363 | -cxrate * zoneinc[zone]);
|
---|
364 |
|
---|
365 | stime = segtime(subj, fptime);
|
---|
366 |
|
---|
367 | if (stime GE temax) {
|
---|
368 |
|
---|
369 | setseg(subj, temax - 1);
|
---|
370 | break;
|
---|
371 |
|
---|
372 | } else if (stime EQ 0) {
|
---|
373 |
|
---|
374 | setseg(subj, 1);
|
---|
375 | break;
|
---|
376 | }
|
---|
377 |
|
---|
378 | setseg(subj, stime);
|
---|
379 | break;
|
---|
380 |
|
---|
381 | /* |
---|
382 |
|
---|
383 | */
|
---|
384 | case 2: /* interior point */
|
---|
385 |
|
---|
386 | if (cxrate GE 0)
|
---|
387 | fptime = addfpu(pntptr->iptim, cxrate * zoneinc[zone]);
|
---|
388 | else
|
---|
389 | fptime = subfpu(pntptr->iptim, -cxrate * zoneinc[zone]);
|
---|
390 |
|
---|
391 | stime = temin + fromfpu(fptime);
|
---|
392 |
|
---|
393 | if (stime GE temax)
|
---|
394 | break;
|
---|
395 |
|
---|
396 | setseg(subj, segtime(subj, fptime));
|
---|
397 | setseg(subj + 1, temax);
|
---|
398 | break;
|
---|
399 | }
|
---|
400 |
|
---|
401 | th = timeto(curfunc, subj); /* display the time */
|
---|
402 | tl = th - ((th / 1000) * 1000);
|
---|
403 | th /= 1000;
|
---|
404 |
|
---|
405 | sprintf(bfs, "%02d.%03d", th, tl);
|
---|
406 |
|
---|
407 | if (v_regs[5] & 0x0180)
|
---|
408 | vbank(0);
|
---|
409 |
|
---|
410 | vcputsv(instob, 64, idbox[15][4], idbox[15][5],
|
---|
411 | idbox[15][6] + 1, idbox[15][7], bfs, 14);
|
---|
412 |
|
---|
413 | imflag = TRUE;
|
---|
414 | cxval = ttox(timeto(curfunc, subj), 12);
|
---|
415 |
|
---|
416 | } else { /* just moving the cursor */
|
---|
417 |
|
---|
418 | cxval += cxrate;
|
---|
419 |
|
---|
420 | if (cxval GT (CXMAX- 1))
|
---|
421 | cxval = CXMAX - 1;
|
---|
422 | else if (cxval LT 1)
|
---|
423 | cxval = 1;
|
---|
424 | }
|
---|
425 | }
|
---|
426 |
|
---|
427 | /* |
---|
428 |
|
---|
429 | */
|
---|
430 |
|
---|
431 | /*
|
---|
432 | =============================================================================
|
---|
433 | idnfld() -- process not-in-field key entry
|
---|
434 | =============================================================================
|
---|
435 | */
|
---|
436 |
|
---|
437 | short idnfld(short k)
|
---|
438 | {
|
---|
439 | register short endpnt, basepnt, t, fn;
|
---|
440 | register struct idfnhdr *fp;
|
---|
441 | register struct instdef *ip;
|
---|
442 |
|
---|
443 | ip = &vbufs[curvce];
|
---|
444 | fp = &ip->idhfnc[curfunc];
|
---|
445 |
|
---|
446 | if (astat) {
|
---|
447 |
|
---|
448 | if (whatbox()) {
|
---|
449 |
|
---|
450 | if (hitbox EQ 12) { /* edit window */
|
---|
451 |
|
---|
452 | if (k EQ 8) { /* - = toggle I_TM_KEY */
|
---|
453 |
|
---|
454 | t = (fp->idftmd ^= I_TM_KEY);
|
---|
455 |
|
---|
456 | if (v_regs[5] & 0x0180)
|
---|
457 | vbank(0);
|
---|
458 |
|
---|
459 | tsplot4(instob, 64,
|
---|
460 | ((t & I_TM_KEY) ?
|
---|
461 | idbox[curfunc][4] : ID_INST),
|
---|
462 | 4, 54, idbxlbl[curfunc], 14);
|
---|
463 |
|
---|
464 | modinst();
|
---|
465 | return(SUCCESS);
|
---|
466 | /* |
---|
467 |
|
---|
468 | */
|
---|
469 | } else if (k EQ 9) { /* + = new point */
|
---|
470 |
|
---|
471 | basepnt = fp->idfpt1;
|
---|
472 | endpnt = basepnt + fp->idfpif - 1;
|
---|
473 |
|
---|
474 | if (fp->idfpif EQ 99)
|
---|
475 | return(FAILURE);
|
---|
476 |
|
---|
477 | if (FALSE EQ inspnt(ip, curfunc, endpnt)) {
|
---|
478 |
|
---|
479 | return(FAILURE);
|
---|
480 |
|
---|
481 | } else {
|
---|
482 |
|
---|
483 | subj = fp->idfpif - 1;
|
---|
484 | pntsel();
|
---|
485 | pntsv = 1;
|
---|
486 | memset(pntptr, 0, sizeof (struct instpnt));
|
---|
487 | pntptr->ipval = (pntptr -1)->ipval;
|
---|
488 | setseg(subj, timeto(curfunc, subj - 1) + 1);
|
---|
489 | edfunc(curfunc);
|
---|
490 | showpt(1);
|
---|
491 | cxval = ttox(timeto(curfunc, subj), 12);
|
---|
492 | cyval = vtoy((pntptr->ipval >> 5), 12);
|
---|
493 | arcurs(ID_SELD);
|
---|
494 | gcurpos(cxval, cyval);
|
---|
495 | modinst();
|
---|
496 | return(SUCCESS);
|
---|
497 | }
|
---|
498 |
|
---|
499 | }
|
---|
500 | /* |
---|
501 |
|
---|
502 | */
|
---|
503 | } else if (hitbox < 12 ) { /* label window */
|
---|
504 |
|
---|
505 | fn = (hitbox EQ curfunc) ? 12 : hitbox;
|
---|
506 |
|
---|
507 | if (k EQ 8) { /* + = toggle I_TM_KEY */
|
---|
508 |
|
---|
509 | if (v_regs[5] & 0x0180)
|
---|
510 | vbank(0);
|
---|
511 |
|
---|
512 | tsplot4(instob, 64,
|
---|
513 | (((ip->idhfnc[fn].idftmd ^= I_TM_KEY) & I_TM_KEY)
|
---|
514 | ? idbox[fn][4] : ID_INST),
|
---|
515 | idbox[hitbox][6], idbox[hitbox][7],
|
---|
516 | idbxlbl[fn], 14);
|
---|
517 |
|
---|
518 | modinst();
|
---|
519 | }
|
---|
520 | }
|
---|
521 | }
|
---|
522 |
|
---|
523 | return(FAILURE);
|
---|
524 | }
|
---|
525 | }
|
---|
526 |
|
---|
527 | /* |
---|
528 |
|
---|
529 | */
|
---|
530 |
|
---|
531 | /*
|
---|
532 | =============================================================================
|
---|
533 | idx_key() -- process the 'X' (delete) key
|
---|
534 | =============================================================================
|
---|
535 | */
|
---|
536 |
|
---|
537 | void idx_key(void)
|
---|
538 | {
|
---|
539 | register struct sment *smp;
|
---|
540 | register struct valent *vep;
|
---|
541 | register short i;
|
---|
542 | register struct instdef *ip;
|
---|
543 |
|
---|
544 | if (astat) {
|
---|
545 |
|
---|
546 | if (idsrcsw OR idcfsw OR idnamsw OR (wcflag NE -1))
|
---|
547 | return;
|
---|
548 |
|
---|
549 | if (stcrow EQ 16) {
|
---|
550 |
|
---|
551 | if ((stccol GE 1) AND (stccol LE 7)) {
|
---|
552 |
|
---|
553 | /* general source */
|
---|
554 |
|
---|
555 | vep = &valents[0];
|
---|
556 | smp = vpsms[(curvce << 4) + fnoff[curfunc]];
|
---|
557 |
|
---|
558 | if (smp->sm NE SM_NONE) { /* check for new general S/M */
|
---|
559 |
|
---|
560 | (smp->prv)->nxt = smp->nxt; /* unlink from old S/M chain */
|
---|
561 | (smp->nxt)->prv = smp->prv;
|
---|
562 |
|
---|
563 | smp->prv = (struct sment *)vep; /* link into new S/M chain */
|
---|
564 | smp->nxt = vep->nxt;
|
---|
565 | (vep->nxt)->prv = smp;
|
---|
566 | vep->nxt = smp;
|
---|
567 |
|
---|
568 | smp->sm = SM_NONE; /* update sment S/M entry */
|
---|
569 | }
|
---|
570 |
|
---|
571 | vbufs[curvce].idhfnc[curfunc].idfsrc = SM_NONE;
|
---|
572 | dswin(13);
|
---|
573 | modinst();
|
---|
574 | /* |
---|
575 |
|
---|
576 | */
|
---|
577 | } else if ((stccol EQ 15) OR (stccol EQ 16)) {
|
---|
578 |
|
---|
579 | /* current point and points to the right */
|
---|
580 |
|
---|
581 | delpnts();
|
---|
582 |
|
---|
583 | } else if ((stccol GE 33) AND (stccol LE 39)) {
|
---|
584 |
|
---|
585 | /* point source */
|
---|
586 |
|
---|
587 | pntptr->ipvsrc = SM_NONE;
|
---|
588 | dswin(16);
|
---|
589 | modinst();
|
---|
590 | }
|
---|
591 |
|
---|
592 | } else if ((stcrow EQ 17) AND
|
---|
593 | ((stccol EQ 31) OR (stccol EQ 32))) {
|
---|
594 |
|
---|
595 | /* entire instrument */
|
---|
596 |
|
---|
597 | initi(&vbufs[curvce]);
|
---|
598 | execins(curvce, 0, 0);
|
---|
599 | setinst();
|
---|
600 | allwins();
|
---|
601 | modinst();
|
---|
602 | }
|
---|
603 | }
|
---|
604 | }
|
---|
605 |
|
---|
606 | /* |
---|
607 |
|
---|
608 | */
|
---|
609 |
|
---|
610 | /*
|
---|
611 | =============================================================================
|
---|
612 | idfield() -- setup field routines for the score display
|
---|
613 | =============================================================================
|
---|
614 | */
|
---|
615 |
|
---|
616 | void idfield(void)
|
---|
617 | {
|
---|
618 | idimsw = FALSE;
|
---|
619 | curslim = 210;
|
---|
620 |
|
---|
621 | curset(&id_flds);
|
---|
622 | }
|
---|