source: buchla-68k/orig/RAM/SCSELBX.C@ d21fc6f

Last change on this file since d21fc6f was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
File size: 37.4 KB
RevLine 
[3ae31e9]1/*
2 =============================================================================
3 scselbx.c -- MIDAS-VII -- score editor box selection functions
4 Version 87 -- 1989-11-15 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "stddefs.h"
9#include "hwdefs.h"
10#include "fields.h"
11#include "vsdd.h"
12#include "vsddvars.h"
13#include "glcfns.h"
14#include "glcdefs.h"
15#include "graphdef.h"
16#include "lcdline.h"
17#include "panel.h"
18#include "score.h"
19#include "scfns.h"
20#include "sclock.h"
21#include "slice.h"
22#include "secops.h"
23#include "secdefs.h"
24#include "macros.h"
25
26#include "midas.h"
27#include "asgdsp.h"
28#include "scdsp.h"
29
30/* functions defined elsewhere */
31
32extern short enterit(), advscur(), oktode(), nokey();
33
34/*
35
36*/
37
38/* variables defined elsewhere */
39
40extern short (*itxput)();
41extern short (*point)();
42
43extern short ancmsw;
44extern short angroup;
45extern short asmode;
46extern short clkrun;
47extern short clkctl;
48extern short clksrc;
49extern short ctrsw;
50extern short cxval;
51extern short cyval;
52extern short dubsw;
53extern short gomode;
54extern short grptran;
55extern short gtmsel;
56extern short hitbox;
57extern short hitcx;
58extern short hitcy;
59extern short insmode;
60extern short ismode;
61extern short lastam;
62extern short midiclk;
63extern short noteop;
64extern short notesel;
65extern short oldpk;
66extern short oldsl;
67extern short pchsw;
68extern short pkctrl;
69extern short pulsclk;
70extern short recsw;
71extern short scmctl;
72extern short sdmcol;
73extern short sdmctl;
74extern short sdmrow;
75extern short secop;
76extern short sgoflag;
77extern short sliders;
78extern short stccol;
79extern short stcrow;
80extern short stepclk;
81extern short stepenb;
82extern short submenu;
83extern short velflag;
84extern short vtccol;
85extern short vtcrow;
86
87/*
88
89*/
90
91extern short grptmap[];
92
93extern short sctctab[][64];
94
95extern struct asgent asgtab[];
96
97extern struct selbox *csbp;
98extern struct selbox *curboxp;
99
100extern struct s_time stimes[N_SCORES][N_SECTS]; /* section times */
101
102extern unsigned *obj8, *obj11;
103
104extern PFS (*swpt)[];
105extern PFS (*oldsw)[];
106extern PFS t_ngrp[];
107
108extern char bfs[];
109extern char tunname[][32];
110
111extern struct gdsel *gdstbc[];
112
113/* forward references */
114
115short sdboxfn(), bspscur(), svtdsp(), svtstop();
116
117/*
118
119*/
120
121char *sdmenus[][3] = { /* score display menus */
122
123 /* 0 - typewriter */
124
125 {" ABCDEFGHIJKLMNOPQRSTUVWXYZ | ",
126 " abcdefghijklmnopqrstuvwxyz -*- ",
127 " 0123456789+-/*().,:;!?&<> | "},
128
129 /* 1 - note edit */
130
131 {" Begin Acc Move Note Escape ",
132 " Begin Nat Move Begin ",
133 " End Note Move End "},
134
135 /* 2 - clock source */
136
137 {" Local PLS24 Step ",
138 " MIDI PLS48 ",
139 " SMPTE PLS96 "},
140
141 /* 3 - clock control */
142
143 {" Local ",
144 " MIDI ",
145 " SMPTE "},
146
147 /* 4 - Section menu */
148
149 {" GoTo Move SMPTE ",
150 " Begin Copy Del Gr ",
151 " End Merge Del Ev "}
152};
153
154char sdmln3[] =
155 " ReGrp Remove Trn S ";
156
157char sdmln4[] =
158 "Escape D ";
159
160/*
161
162*/
163
164short sdmht[][3] = { /* score section menu highlight table */
165
166 /* row, lcol, rcol */
167
168 { 6, 0, 0}, /* 0 - SOP_NUL */
169 { 3, 1, 4}, /* 1 - SOP_GO */
170 { 4, 1, 5}, /* 2 - SOP_BGN */
171 { 5, 1, 3}, /* 3 - SOP_END */
172 { 3, 8, 11}, /* 4 - SOP_MOV */
173 { 4, 8, 11}, /* 5 - SOP_CPY */
174 { 5, 8, 12}, /* 6 - SOP_MRG */
175 { 3, 15, 19}, /* 7 - SOP_STC */
176 { 4, 15, 23}, /* 8 - SOP_DGR */
177 { 5, 15, 23}, /* 9 - SOP_DEV */
178 { 6, 15, 20}, /* 10 - SOP_RMV */
179 { 6, 8, 12} /* 11 - SOP_GRP */
180};
181
182short sdmlim[][4] = { /* score display menu cursor limits */
183
184 /* top, left, bottom, right */
185
186 { 19, 1, 21, 30 }, /* 0 - typewriter */
187 { 19, 1, 21, 30 }, /* 1 - note edit */
188 { 19, 1, 21, 20 }, /* 2 - clock source */
189 { 19, 1, 21, 19 }, /* 3 - clock control */
190 { 19, 1, 23, 62 } /* 4 - section menu */
191};
192
193/*
194
195*/
196
197char *nedlbl[] = { /* note edit function labels */
198
199 "Note Edit", /* 0 - NOP_NUL */
200 "Begin Acc", /* 1 - NOP_ACC */
201 "Begin Nat", /* 2 - NOP_NAT */
202 "End Note ", /* 3 - NOP_END */
203 "Move Note", /* 4 - NOP_MVN */
204 "Move Beg ", /* 5 - NOP_MVB */
205 "Move End " /* 6 - NOP_MVE */
206};
207
208/*
209
210*/
211
212struct selbox sdboxes[] = {
213
214 { 0, 0, 175, 13, 0, sdboxfn}, /* 0 - Sec, Beat, Frame */
215 {176, 0, 231, 13, 1, sdboxfn}, /* 1 - Insert */
216 {232, 0, 439, 13, 2, sdboxfn}, /* 2 - Clock */
217 {440, 0, 511, 13, 3, sdboxfn}, /* 3 - Note Edit */
218
219 { 0, 238, 111, 251, 4, sdboxfn}, /* 4 - Assignment */
220 {112, 238, 167, 251, 5, sdboxfn}, /* 5 - Tune */
221 {168, 238, 247, 251, 6, enterit}, /* 6 - Tempo */
222 {248, 238, 319, 251, 7, enterit}, /* 7 - Interpolate */
223 {320, 238, 398, 251, 8, sdboxfn}, /* 8 - Stop/Next */
224 {400, 238, 455, 251, 9, sdboxfn}, /* 9 - In/Out */
225 {456, 238, 511, 251, 10, sdboxfn}, /* 10 - Output */
226
227 { 0, 252, 511, 307, 11, sdboxfn}, /* 11 - Grp, Trns, Dyn, Vel */
228
229 { 0, 308, 511, 335, 12, sdboxfn}, /* 12 - Ansrc, Anval */
230
231 { 0, 336, 215, 349, 13, sdboxfn}, /* 13 - Score Title */
232 {216, 336, 455, 349, 14, sdboxfn}, /* 14 - Rec Mode */
233 {456, 336, 511, 349, 15, sdboxfn}, /* 15 - Memory */
234
235 { 0, 14, 511, 237, 16, sdboxfn}, /* 16 - Note Display */
236
237 { 0, 0, 0, 0, 0, FN_NULL} /* end of table */
238};
239
240/*
241
242*/
243
244/*
245 =============================================================================
246 insect() -- return section number pointed to in section menu, or -1
247 =============================================================================
248*/
249
250short
251insect()
252{
253 register short col;
254
255 col = vtccol - 24;
256
257 if (col < 0)
258 return(-1);
259
260 sgoflag = col & 3;
261
262 if ((vtcrow < 19) OR (vtcrow > 20))
263 return(-1);
264
265 return((col >> 2) + (10 * (vtcrow - 19)));
266}
267
268/*
269 =============================================================================
270 svtdsp() -- display data for the virtual typewriter
271 =============================================================================
272*/
273
274svtdsp(obj, fg, bg, row, col, buf)
275unsigned *obj;
276unsigned fg, bg;
277short row, col;
278char *buf;
279{
280 if (v_regs[5] & 0x0180)
281 vbank(0);
282
283 vputs(obj, row - 16, col, buf, SDW13ATR);
284}
285
286/*
287
288*/
289
290/*
291 =============================================================================
292 svtstop() -- end vitrual typewriter data entry
293 =============================================================================
294*/
295
296svtstop()
297{
298 sdmenu(-1);
299}
300
301/*
302 =============================================================================
303 bspscur() -- backspace the score display text cursor
304 =============================================================================
305*/
306
307bspscur()
308{
309 register short newcol;
310
311 if (infield(stcrow, stccol, curfet))
312 cfetp = infetp;
313 else
314 return;
315
316 newcol = stccol - 1;
317
318 if (newcol GE cfetp->flcol)
319 stcpos(stcrow, newcol);
320
321 cxval = CTOX(stccol);
322 cyval = RTOY(stcrow);
323}
324
325/*
326
327*/
328
329/*
330 =============================================================================
331 dsects() -- display list of section numbers
332 Highlight active sections and indicate SMPTE time-coded sections.
333 =============================================================================
334*/
335
336dsects()
337{
338 register short atr, row, col, i, j;
339 char buf[8];
340 char cl, cr, csl, csr;
341 short begun;
342
343 register struct s_entry *sp;
344
345 if (v_regs[5] & 0x0180)
346 vbank(0);
347
348 row = 3;
349
350 for (i = 0; i < N_SECTS; i += 10) {
351
352 col = 24;
353
354 for (j = 0; j < 10; j++) {
355
356 if (stimes[curscor][i + j].sflags) { /* SMPTE time */
357
358 csl = '[';
359 csr = ']';
360
361 } else { /* no SMPTE time */
362
363 csl = '{';
364 csr = '}';
365 }
366
367 cl = ' ';
368 cr = ' ';
369
370 if (E_NULL NE seclist[curscor][i + j]) {
371
372 begun = TRUE;
373 atr = (SDBGMM | (SD_CHNG << 4));
374 cl = csl;
375
376 } else {
377
378 begun = FALSE;
379 atr = SDMENUBG;
380 }
381
382 sp = hplist[curscor][EH_SEND];
383
384 while (sp) {
385
386 if (sp->e_data1 EQ (i + j)) {
387
388 cr = begun ? csr : '}';
389 break;
390 }
391
392 sp = sp->e_up;
393 }
394
395 sprintf(buf, "%c%02d%c", cl, 1 + (i + j), cr);
396
397 vputs(obj8, row, col, buf, atr);
398 col += 4;
399 }
400
401 ++row;
402 }
403}
404
405/*
406
407*/
408
409/*
410 =============================================================================
411 dsgtmn() -- display group map source group number
412 =============================================================================
413*/
414
415dsgtmn(n, f)
416short n, f;
417{
418 char buf[4];
419 short atr, col;
420
421 sprintf(buf, "%02d", n + 1);
422
423 col = (3 * n) + 28;
424 atr = f ? (SDBGMM | (SD_CHNG <<4)) : SDMENUBG;
425
426 if (v_regs[5] & 0x0180)
427 vbank(0);
428
429 vputs(obj8, 6, col, buf, atr);
430}
431
432/*
433 =============================================================================
434 dsgtme() -- display group map destination group number
435 =============================================================================
436*/
437
438dsgtme(n)
439short n;
440{
441 char buf[4];
442 short col;
443
444 if (grptmap[n] EQ -1)
445 strcpy(buf, " ");
446 else
447 sprintf(buf, "%02d", grptmap[n] + 1);
448
449 col = (3 * n) + 28;
450
451 if (v_regs[5] & 0x0180)
452 vbank(0);
453
454 vputs(obj8, 7, col, buf, SDMENUBG);
455}
456
457/*
458
459*/
460
461/*
462 =============================================================================
463 dsgtmap() -- display group map and transposition value
464 =============================================================================
465*/
466
467dsgtmap()
468{
469 char buf[6];
470 register short i;
471
472 if (v_regs[5] & 0x0180)
473 vbank(0);
474
475 sprintf(buf, "%c%02d", grptran < 0 ? '-' : '+', abs(grptran));
476
477 vputs(obj8, 7, 22, buf, SDMENUBG);
478
479 for (i = 0; i < 12; i++) {
480
481 dsgtmn(i, gtmsel EQ i);
482 dsgtme(i);
483 }
484}
485
486/*
487 =============================================================================
488 ingroup() -- return group number selected
489 =============================================================================
490*/
491
492short
493ingroup()
494{
495 register short col;
496
497 col = vtccol - 28;
498
499 if (col < 0)
500 return(-1);
501
502 if (2 EQ (col % 3))
503 return(-1);
504
505 return(col / 3);
506}
507
508/*
509
510*/
511
512/*
513 =============================================================================
514 sdmtxt() -- output text to the score area submenu
515 =============================================================================
516*/
517
518sdmtxt(row, col, txt, tag)
519short row, col;
520char *txt;
521short tag;
522{
523 if ((v_regs[5] & 0x0180) NE 0x0100)
524 vbank(1);
525
526 vcputsv(obj11, 64, SD_TEXT, SDBG16, row, col, txt, 14);
527}
528
529/*
530
531*/
532
533/*
534 =============================================================================
535 showam() -- show menu of assignments
536 =============================================================================
537*/
538
539showam(asg)
540register short asg;
541{
542 register short col, na, row;
543
544 if (asg EQ 1)
545 na = 48;
546 else
547 na = NASGS;
548
549 for (col = 2; col < 60; col += 15) {
550
551 if (asg GE na)
552 return;
553
554 (*itxput)(0, col, "No Assignment", 0);
555
556 for (row = 1; row < 15; row++) {
557
558 if (asg GE na)
559 return;
560
561 sprintf(bfs, "%02d %-10.10s", asg, asgtab[asg].a_name);
562 (*itxput)(row, col, bfs, 1);
563 ++asg;
564 }
565 }
566}
567
568/*
569
570*/
571
572/*
573 =============================================================================
574 showtm() -- show menu of tunings
575 =============================================================================
576*/
577
578showtm()
579{
580 register short row, tun;
581
582 tun = 0;
583
584 (*itxput)(0, 0, "N Name", 0);
585
586 for (row = 1; row < 11; row++) {
587
588 sprintf(bfs, "%d %-32.32s", tun, tunname[tun]);
589 (*itxput)(row, 0, bfs, 1);
590 ++tun;
591 }
592}
593
594/*
595
596*/
597
598/*
599 =============================================================================
600 showsm() -- show menu of scores
601 =============================================================================
602*/
603
604showsm()
605{
606 register short col, row, scr;
607
608 scr = 1;
609
610 for (col = 1; col < 46; col+= 22) {
611
612 if (scr > N_SCORES)
613 return;
614
615 (*itxput)(0, col, "No Score", 0);
616
617 for (row = 1; row < 15; row++) {
618
619 if (scr > N_SCORES)
620 return;
621
622 sprintf(bfs, "%02d %-16.16s", scr, scname[scr - 1]);
623 (*itxput)(row, col, bfs, 1);
624 ++scr;
625 }
626 }
627}
628
629/*
630
631*/
632
633/*
634 =============================================================================
635 scmenu() -- display a submenu in area 1 (score area)
636 =============================================================================
637*/
638
639scmenu(n)
640register short n;
641{
642 register short i;
643 register struct octent *op;
644
645 if (n GE 0) { /* put up a submenu */
646
647 itxput = sdmtxt; /* setup output function */
648
649 vbank(0);
650
651 v_odtab[0][0] |= V_BLA; /* turn off line objcect */
652 objclr(0);
653
654 v_odtab[1][0] |= V_BLA; /* turn off score object */
655 objclr(1);
656
657 v_odtab[2][0] |= V_BLA; /* turn off keyboard object */
658 objclr(2);
659
660 vbank(1); /* clear the window */
661 vbfill4(obj11, 128, 0, 0, 511, 223, exp_c(SDBG16));
662
663 vbank(0); /* turn on window object */
664 SetPri(11, 4);
665
666 switch (n) { /* fill the window */
667
668 case 0: /* instruments */
669
670 showim(); /* show the instruments */
671 break;
672
673 case 1: /* assignments */
674
675 showam(lastam); /* show the assignments */
676 stcpos(17, 11); /* position the cursor */
677
678 cxval = CTOX(11);
679 cyval = RTOY(17);
680
681 if (infield(stcrow, stccol, curfet))
682 cfetp = infetp;
683
684 break;
685
686 case 2: /* tunings */
687
688 showtm(); /* show the tunings */
689 stcpos(17, 19); /* position the cursor */
690
691 cxval = CTOX(19);
692 cyval = RTOY(17);
693
694 if (infield(stcrow, stccol, curfet))
695 cfetp = infetp;
696
697 break;
698
699 case 3: /* scores */
700
701 showsm(); /* show the scores */
702 stcpos(24, 7); /* position the cursor */
703
704 cxval = CTOX(7);
705 cyval = RTOY(24);
706
707 if (infield(stcrow, stccol, curfet))
708 cfetp = infetp;
709
710 break;
711
712 default: /* eh ? */
713
714 break;
715 }
716
717 } else { /* take down the submenu */
718
719 vbank(0);
720
721 v_odtab[4][0] |= V_BLA; /* turn off window object */
722 objclr(4);
723
724 op = &v_obtab[13]; /* turn on keyboard object */
725 objon(2, op->objy, op->ysize);
726 v_odtab[2][0] &= ~V_BLA;
727
728 op = &v_obtab[14]; /* turn on score object */
729 objon(1, op->objy, op->ysize);
730 v_odtab[1][0] &= ~V_BLA;
731
732 op = &v_obtab[15]; /* turn on line object */
733 objon(0, op->objy, op->ysize);
734 v_odtab[0][0] &= ~V_BLA;
735 }
736
737 scmctl = n; /* set new menu type */
738}
739/*
740
741*/
742
743/*
744 =============================================================================
745 sdmenu() -- display a submenu in area 2 (text areas)
746 =============================================================================
747*/
748
749sdmenu(n)
750register short n;
751{
752 register short i, wasup;
753
754 wasup = sdmctl; /* save previous menu type */
755 sdmctl = n; /* set new menu type */
756
757 if (n GE 0) { /* put up a menu */
758
759 submenu = TRUE; /* indicate there's a menu up */
760
761 sdmrow = stcrow; /* save underline cursor position */
762 sdmcol = stccol; /* ... */
763
764 memsetw(&sctctab[3][0], exp_c(SDBGMM), 64); /* recolor */
765 memsetw(&sctctab[4][0], exp_c(SDBGMM), 64);
766 memsetw(&sctctab[5][0], exp_c(SDBGMM), 64);
767
768 if (n EQ 4) { /* extra 2 lines for section menu */
769
770 memsetw(&sctctab[6][0], exp_c(SDBGMM), 64);
771 memsetw(&sctctab[7][0], exp_c(SDBGMM), 64);
772 }
773
774 stcclr(); /* re-color the cursor background */
775 stcpos(sdmrow, sdmcol); /* turn underline cursor back on */
776
777 if (infield(stcrow, stccol, curfet))
778 cfetp = infetp;
779
780 if (v_regs[5] & 0x0180)
781 vbank(0);
782
783 for (i = 0; i < 3; i++) /* top 3 lines of menu */
784 vputs(obj8, 3 + i, 0, sdmenus[n][i], SDMENUBG);
785/*
786
787*/
788 if (n EQ 4) { /* extra 2 lines for section menu */
789
790 vputs(obj8, 6, 0, sdmln3, SDMENUBG);
791 vputs(obj8, 7, 0, sdmln4, SDMENUBG);
792
793 secop = SOP_NUL; /* clear section operation code */
794
795 grptran = 0; /* reset transpose value */
796 gtmsel = -1; /* de-select source group */
797
798 for (i = 0; i < 12; i++) /* reset the map */
799 grptmap[i] = i;
800
801 dsects(); /* display list of sections */
802 dsgtmap(); /* display group map and transpose */
803
804 point = GLCplot; /* setup to plot on LCD */
805 GLCcurs(G_ON);
806
807 if (ismode NE IS_NULL) { /* cancel inst. mode */
808
809 ismode = IS_NULL;
810 pkctrl = oldpk;
811 sliders = oldsl;
812 swpt = oldsw;
813 lcdlbls();
814 }
815
816 if (gomode NE GO_NULL) { /* cancel goto mode */
817
818 gomode = GO_NULL;
819 pkctrl = oldpk;
820 lseg(GOTO_XL, GOTO_Y, GOTO_XR, GOTO_Y, 0);
821 }
822
823 if (asmode) { /* cancel assign mode */
824
825 asmode = 0;
826 pkctrl = oldpk;
827 swpt = oldsw;
828 lseg(ASGN_XL, ASGN_Y, ASGN_XR, ASGN_Y, 0);
829 }
830
831 if ((pkctrl EQ PK_PFRM) OR (pkctrl EQ PK_NOTE))
832 oldpk = pkctrl;
833
834 if (sliders NE LS_LIBR)
835 oldsl = sliders;
836
837 oldsw = swpt; /* put panel in group mode */
838 swpt = t_ngrp;
839 pkctrl = PK_NGRP;
840 sliders = LS_NGRP;
841
842 lcdlbls();
843 setleds();
844 }
845
846 SetPri(TTCURS, TTCPRI); /* turn on menu cursor */
847 ttcpos(sdmlim[n][0], sdmlim[n][1]); /* position menu cursor */
848/*
849
850*/
851 } else { /* take down the menu */
852
853 submenu = FALSE; /* indicate menu has gone bye bye */
854
855 if (v_regs[5] & 0x0180)
856 vbank(0);
857
858 objclr(TTCPRI); /* turn off the menu cursor */
859 stcset(); /* restore underline cursor */
860 stcclr(); /* ... */
861 sdwin(11); /* redisplay window 11 data */
862
863 if (wasup EQ 4) {
864
865 sdwin(12); /* redisplay window 12 data */
866
867 stcpos(sdmrow, sdmcol); /* display underline cursor */
868
869 cxval = CTOX(sdmcol);
870 cyval = RTOY(sdmrow);
871
872 if (infield(stcrow, stccol, curfet))
873 cfetp = infetp;
874
875 pkctrl = oldpk; /* restore panel state */
876 sliders = oldsl;
877 swpt = oldsw;
878
879 lcdlbls(); /* refresh LCD */
880 setleds(); /* refresh LEDs */
881
882 } else {
883
884 stcpos(sdmrow, sdmcol); /* display underline cursor */
885
886 cxval = CTOX(sdmcol);
887 cyval = RTOY(sdmrow);
888
889 if (infield(stcrow, stccol, curfet))
890 cfetp = infetp;
891 }
892 }
893}
894
895/*
896
897*/
898
899/*
900 =============================================================================
901 hilitnt() -- setup for a note operation
902 =============================================================================
903*/
904
905hilitnt(nop)
906short nop;
907{
908 noteop = nop; /* set note operation */
909 notesel = FALSE; /* indicate no note selected */
910 sdmenu(-1); /* take down the menu */
911 dnedmod(); /* update the note edit window */
912}
913
914/*
915
916*/
917
918/*
919 =============================================================================
920 hilitop() -- highlight a section operation and set secop
921 =============================================================================
922*/
923
924hilitop(n)
925register short n;
926{
927 register short row, lc, rc, col;
928
929 if (clkrun) /* don't do anything if clock is running */
930 return;
931
932 if (v_regs[5] & 0x0180)
933 vbank(0);
934
935 if (secop NE SOP_NUL) {
936
937 row = sdmht[secop][0];
938 lc = sdmht[secop][1];
939 rc = sdmht[secop][2];
940
941 for (col = lc; col LE rc; col++)
942 vputa(obj8, row, col, SDMENUBG);
943 }
944
945 secop = n;
946
947 row = sdmht[n][0];
948 lc = sdmht[n][1];
949 rc = sdmht[n][2];
950
951 for (col = lc; col LE rc; col++)
952 vputa(obj8, row, col, (SDBGMM | (SD_ENTR << 4)));
953}
954
955/*
956
957*/
958
959/*
960 =============================================================================
961 dosecop() -- do the current section operation
962 =============================================================================
963*/
964
965dosecop()
966{
967 register short sect;
968 register struct s_entry *ep;
969
970 if (clkrun OR (-1 EQ (sect = insect()))) {
971
972 secop = SOP_NUL;
973 return;
974 }
975
976 if (insmode) {
977
978 icancel();
979 dsimode();
980 }
981
982 switch (secop) {
983
984 case SOP_GO: /* GoTo */
985
986 if (sgoflag EQ 3) { /* GoTo End Section */
987
988 ep = hplist[curscor][EH_SEND];
989
990 while (ep) {
991
992 if (ep->e_data1 EQ sect) {
993
994 sc_goto(fc_val = ep->e_time);
995 break;
996 }
997
998 ep = ep->e_up;
999 }
1000
1001 } else { /* GoTo Begin Section */
1002
1003 if (E_NULL NE (ep = seclist[curscor][sect]))
1004 sc_goto(fc_val = ep->e_time);
1005 }
1006
1007 break;
1008/*
1009
1010*/
1011 case SOP_BGN: /* Begin */
1012
1013 if (NOT recsw) /* only in record mode */
1014 break;
1015
1016 if (v_regs[5] & 0x0180)
1017 vbank(0);
1018
1019 if (E_NULL NE (ep = seclist[curscor][sect])) {
1020
1021 eh_rmv(ep, EH_SBGN);
1022 e_rmv(ep);
1023 ep->e_time = t_cur;
1024 p_cur = e_ins(ep, ep_adj(p_cur, 1, t_cur)->e_bak)->e_fwd;
1025 eh_ins(ep, EH_SBGN);
1026 se_exec(ep, D_FWD);
1027
1028 } else if (E_NULL NE (ep = e_alc(E_SIZE2))) {
1029
1030 ep->e_time = t_cur;
1031 ep->e_type = EV_SBGN;
1032 ep->e_data1 = sect;
1033 p_cur = e_ins(ep, ep_adj(p_cur, 1, t_cur)->e_bak)->e_fwd;
1034 eh_ins(ep, EH_SBGN);
1035 seclist[curscor][sect] = ep;
1036 se_exec(ep, D_FWD);
1037 }
1038
1039 sc_refr(fc_val); /* refresh the screen */
1040 break;
1041/*
1042
1043*/
1044 case SOP_END: /* End */
1045
1046 if (NOT recsw) /* only in record mode */
1047 break;
1048
1049 if (v_regs[5] & 0x0180)
1050 vbank(0);
1051
1052 if (E_NULL NE (ep = ehfind(EH_SEND, -1L, sect, -1))) {
1053
1054 eh_rmv(ep, EH_SEND);
1055 e_rmv(ep);
1056 ep->e_time = t_cur;
1057 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
1058 eh_ins(ep, EH_SEND);
1059 se_exec(ep, D_FWD);
1060
1061 } else if (E_NULL NE (ep = e_alc(E_SIZE2))) {
1062
1063 ep->e_time = t_cur;
1064 ep->e_type = EV_SEND;
1065 ep->e_data1 = sect;
1066 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
1067 eh_ins(ep, EH_SEND);
1068 se_exec(ep, D_FWD);
1069 }
1070
1071 sc_refr(fc_val); /* refresh the screen */
1072 break;
1073/*
1074
1075*/
1076 case SOP_MOV: /* Move */
1077
1078 if (NOT recsw) /* only in record mode */
1079 break;
1080
1081 if (sec_mov(sect)) /* move the section */
1082 break;
1083
1084 sc_refr(fc_val); /* refresh screen if successful */
1085 break;
1086
1087 case SOP_CPY: /* Copy */
1088
1089 if (NOT recsw) /* only in record mode */
1090 break;
1091
1092 if (sec_cpy(sect)) /* copy the section */
1093 break;
1094
1095 sc_refr(fc_val); /* refresh screen if successful */
1096 break;
1097
1098 case SOP_MRG: /* Merge */
1099
1100 if (NOT recsw) /* only in record mode */
1101 break;
1102
1103 if (sec_mrg(sect)) /* merge the section */
1104 break;
1105
1106 sc_refr(fc_val); /* refresh screen if successful */
1107 break;
1108
1109 case SOP_GRP: /* ReGrp */
1110
1111 if (NOT recsw) /* only in record mode */
1112 break;
1113
1114 if (sec_grp(sect)) /* regroup the section */
1115 break;
1116
1117 sc_refr(fc_val); /* refresh screen if successful */
1118 break;
1119
1120/*
1121
1122*/
1123 case SOP_STC: /* SMPTE */
1124
1125 if (NOT recsw) /* only in record mode */
1126 break;
1127
1128 break;
1129
1130 case SOP_DGR: /* Delete Gr */
1131
1132 if (NOT recsw) /* only in record mode */
1133 break;
1134
1135 if (sec_dgr(sect)) /* delete note events */
1136 break;
1137
1138 sc_refr(fc_val); /* refresh display if successful */
1139 break;
1140
1141 case SOP_DEV: /* Delete Ev */
1142
1143 if (NOT recsw) /* only in record mode */
1144 break;
1145
1146 if (sec_dev(sect)) /* delete non-note events */
1147 break;
1148
1149 sc_refr(fc_val); /* refresh display if successful */
1150 break;
1151
1152 case SOP_RMV: /* Remove */
1153
1154 if (NOT recsw) /* only in record mode */
1155 break;
1156
1157 if (sec_rmv(sect)) /* remove section */
1158 break;
1159
1160 sc_refr(fc_val); /* refresh display if successful */
1161 break;
1162 }
1163
1164 secop = SOP_NUL;
1165}
1166
1167/*
1168
1169*/
1170
1171/*
1172 =============================================================================
1173 clkset() -- set the clock state
1174 =============================================================================
1175*/
1176
1177clkset(st)
1178register short st;
1179{
1180 clkrun = st;
1181
1182 switch (clksrc) {
1183
1184 case CK_LOCAL: /* Local */
1185 case CK_SMPTE: /* SMPTE */
1186
1187 midiclk = FALSE;
1188 pulsclk = FALSE;
1189
1190 if (st)
1191 fc_sw = 1;
1192 else
1193 fc_sw = 0;
1194
1195 return;
1196
1197 case CK_MIDI: /* MIDI */
1198
1199 fc_sw = 0;
1200 pulsclk = FALSE;
1201
1202 if (st)
1203 midiclk = TRUE;
1204 else
1205 midiclk = FALSE;
1206
1207 return;
1208/*
1209
1210*/
1211 case CK_PLS24: /* PLS24 */
1212 case CK_PLS48: /* PLS48 */
1213 case CK_PLS96: /* PLS96 */
1214
1215 fc_sw = 0;
1216 midiclk = FALSE;
1217
1218 if (st)
1219 pulsclk = TRUE;
1220 else
1221 pulsclk = FALSE;
1222
1223 return;
1224
1225 case CK_STEP: /* Step */
1226
1227 fc_sw = 0;
1228 midiclk = FALSE;
1229 pulsclk = FALSE;
1230
1231 return;
1232 }
1233}
1234
1235/*
1236
1237*/
1238
1239/*
1240 =============================================================================
1241 sdboxfn() -- process score display box hits
1242 =============================================================================
1243*/
1244
1245short
1246sdboxfn(n)
1247short n;
1248{
1249 register short row, col, grp, what, i;
1250 register struct s_entry *ep;
1251 short atr, modewas;
1252
1253 row = hitcy / 14;
1254 col = hitcx >> 3;
1255
1256 switch (hitbox) {
1257
1258 case 0: /* signature, section, beat, frame */
1259
1260 if (col EQ 0) { /* signature */
1261
1262 if (clkrun) /* clock can't be running */
1263 return(FAILURE);
1264
1265 if (ac_code EQ N_SHARP)
1266 ac_code = N_FLAT;
1267 else
1268 ac_code = N_SHARP;
1269
1270 sc_refr(fc_val);
1271 return(SUCCESS);
1272
1273 } else if ((col GE 2) AND (col LE 4)) { /* section menu */
1274
1275 if (clkrun) /* clock can't be running */
1276 return(FAILURE);
1277
1278 if (sdmctl EQ -1) { /* menu not up yet */
1279
1280 sdmenu(4); /* put up the menu */
1281 return(SUCCESS);
1282/*
1283
1284*/
1285 } else { /* menu up */
1286
1287 if (vtcrow EQ 19) {
1288
1289 if ((vtccol GE 1) AND
1290 (vtccol LE 4)) { /* GoTo */
1291
1292 hilitop(SOP_GO);
1293 return(SUCCESS);
1294
1295 } else if ((vtccol GE 8) AND
1296 (vtccol LE 11)) { /* Move */
1297
1298 hilitop(SOP_MOV);
1299 return(SUCCESS);
1300
1301 } else if ((vtccol GE 15) AND
1302 (vtccol LE 19)) { /* SMPTE */
1303
1304 hilitop(SOP_STC);
1305 return(SUCCESS);
1306
1307 } else if ((vtccol GE 24) AND
1308 (vtccol LE 62)) { /* number */
1309
1310 if (-1 NE insect()) {
1311
1312 sdmenu(-1);
1313 dosecop();
1314 }
1315
1316 return(SUCCESS);
1317 }
1318/*
1319
1320*/
1321 } else if (vtcrow EQ 20) {
1322
1323 if ((vtccol GE 1) AND
1324 (vtccol LE 5)) { /* Begin */
1325
1326 hilitop(SOP_BGN);
1327 return(SUCCESS);
1328
1329 } else if ((vtccol GE 8) AND
1330 (vtccol LE 11)) { /* Copy */
1331
1332 hilitop(SOP_CPY);
1333 return(SUCCESS);
1334
1335 } else if ((vtccol GE 15) AND
1336 (vtccol LE 20)) { /* Del Gr */
1337
1338 hilitop(SOP_DGR);
1339 return(SUCCESS);
1340
1341 } else if ((vtccol GE 24) AND
1342 (vtccol LE 62)) { /* number */
1343
1344 if (-1 NE insect()) {
1345
1346 sdmenu(-1);
1347 dosecop();
1348 }
1349
1350 return(SUCCESS);
1351 }
1352/*
1353
1354*/
1355 } else if (vtcrow EQ 21) {
1356
1357 if ((vtccol GE 1) AND
1358 (vtccol LE 3)) { /* End */
1359
1360 hilitop(SOP_END);
1361 return(SUCCESS);
1362
1363 } else if ((vtccol GE 8) AND
1364 (vtccol LE 12)) { /* Merge */
1365
1366 hilitop(SOP_MRG);
1367 return(SUCCESS);
1368
1369 } else if ((vtccol GE 15) AND
1370 (vtccol LE 20)) { /* Del Ev */
1371
1372 hilitop(SOP_DEV);
1373 return(SUCCESS);
1374 }
1375
1376/*
1377
1378*/
1379 } else if (vtcrow EQ 22) {
1380
1381 if ((vtccol GE 8) AND
1382 (vtccol LE 12)) { /* ReGrp */
1383
1384 hilitop(SOP_GRP);
1385 return(SUCCESS);
1386
1387 } else if ((vtccol GE 15) AND
1388 (vtccol LE 20)) { /* Remove */
1389
1390 hilitop(SOP_RMV);
1391 return(SUCCESS);
1392
1393 } else if ((vtccol GE 28) AND
1394 (vtccol LE 62)) { /* number */
1395
1396 if (gtmsel GE 0)
1397 dsgtmn(gtmsel, FALSE);
1398
1399 if (-1 NE (gtmsel = ingroup()))
1400 dsgtmn(gtmsel, TRUE);
1401
1402 return(SUCCESS);
1403 }
1404
1405 } else if (vtcrow EQ 23) {
1406
1407 if ((vtccol GE 1) AND
1408 (vtccol LE 6)) { /* Escape */
1409
1410 secop = SOP_NUL;
1411 sdmenu(-1);
1412 return(SUCCESS);
1413
1414 } else if ((vtccol GE 22) AND
1415 (vtccol LE 24)) { /* Transpose */
1416
1417 return(enterit());
1418 }
1419 }
1420 }
1421
1422 return(FAILURE);
1423
1424 } else
1425 return(enterit());
1426
1427/*
1428
1429*/
1430 case 1: /* insert */
1431
1432 modewas = insmode; /* save old insert state */
1433
1434 if (insmode) /* toggle ... */
1435 icancel(); /* ... insert on -> off */
1436 else
1437 istart(); /* ... insert of -> on */
1438
1439 if (modewas NE insmode) /* only refresh if changed */
1440 sc_refr(fc_val);
1441
1442 dsimode(); /* update insert mode display */
1443 return(SUCCESS);
1444
1445 case 2: /* clock control, source */
1446
1447 if (col LE 33) { /* clock */
1448
1449 clkset(NOT clkrun);
1450 dsclk();
1451 return(SUCCESS);
1452
1453/*
1454
1455*/
1456 } else if ((col GE 35) AND (col LE 43)) { /* control */
1457
1458 if (sdmctl EQ -1) { /* menu not yet up */
1459
1460 sdmenu(3);
1461 return(SUCCESS);
1462
1463 } else { /* menu up */
1464
1465 if (vtcrow EQ 19) {
1466
1467 if ((vtccol GE 1) AND
1468 (vtccol LE 5)) {
1469
1470 clkctl = CK_LOCAL;
1471 sdmenu(-1);
1472 sdwin(2);
1473 return(SUCCESS);
1474 }
1475
1476 } else if (vtcrow EQ 20) {
1477
1478 if ((vtccol GE 1) AND
1479 (vtccol LE 5)) {
1480
1481 clkctl = CK_MIDI;
1482 sdmenu(-1);
1483 sdwin(2);
1484 return(SUCCESS);
1485 }
1486
1487 } else if (vtcrow EQ 21) {
1488
1489 if ((vtccol GE 1) AND
1490 (vtccol LE 5)) {
1491
1492 clkctl = CK_SMPTE;
1493 sdmenu(-1);
1494 sdwin(2);
1495 return(SUCCESS);
1496 }
1497 }
1498 }
1499
1500 return(FAILURE);
1501/*
1502
1503*/
1504 } else if (col GE 45) { /* source */
1505
1506 if (sdmctl EQ -1) { /* menu not yet up */
1507
1508 sdmenu(2);
1509 setleds();
1510 return(SUCCESS);
1511
1512 } else { /* menu up */
1513
1514 if (vtcrow EQ 19) {
1515
1516 if ((vtccol GE 1) AND
1517 (vtccol LE 5)) {
1518
1519 clksrc = CK_LOCAL;
1520 pkctrl = PK_PFRM;
1521 setleds();
1522 sdmenu(-1);
1523 sdwin(2);
1524 return(SUCCESS);
1525
1526 } else if ((vtccol GE 9) AND
1527 (vtccol LE 13)) {
1528
1529 clksrc = CK_PLS24;
1530 pkctrl = PK_PFRM;
1531 setleds();
1532 sdmenu(-1);
1533 sdwin(2);
1534 return(SUCCESS);
1535
1536 } else if ((vtccol GE 17) AND
1537 (vtccol LE 20)) {
1538
1539 clksrc = CK_STEP;
1540 pkctrl = PK_NOTE;
1541 stepenb = TRUE;
1542 setleds();
1543 sdmenu(-1);
1544 sdwin(2);
1545 return(SUCCESS);
1546 }
1547
1548/*
1549
1550*/
1551 } else if (vtcrow EQ 20) {
1552
1553 if ((vtccol GE 1) AND
1554 (vtccol LE 5)) {
1555
1556 clksrc = CK_MIDI;
1557 pkctrl = PK_PFRM;
1558 setleds();
1559 sdmenu(-1);
1560 sdwin(2);
1561 return(SUCCESS);
1562
1563 } else if ((vtccol GE 9) AND
1564 (vtccol LE 13)) {
1565
1566 clksrc = CK_PLS48;
1567 pkctrl = PK_PFRM;
1568 setleds();
1569 sdmenu(-1);
1570 sdwin(2);
1571 return(SUCCESS);
1572 }
1573/*
1574
1575*/
1576 } else if (vtcrow EQ 21) {
1577
1578 if ((vtccol GE 1) AND
1579 (vtccol LE 5)) {
1580
1581 clksrc = CK_SMPTE;
1582 pkctrl = PK_PFRM;
1583 setleds();
1584 sdmenu(-1);
1585 sdwin(2);
1586 return(SUCCESS);
1587
1588 } else if ((vtccol GE 9) AND
1589 (vtccol LE 13)) {
1590
1591 clksrc = CK_PLS96;
1592 pkctrl = PK_PFRM;
1593 setleds();
1594 sdmenu(-1);
1595 sdwin(2);
1596 return(SUCCESS);
1597 }
1598 }
1599 }
1600 }
1601
1602 return(FAILURE);
1603
1604/*
1605
1606*/
1607 case 3: /* note edit */
1608
1609 if (clkrun) /* clock can't be running */
1610 return(FAILURE);
1611
1612 if (scmctl NE -1)
1613 scmenu(-1);
1614
1615 if (sdmctl EQ -1) { /* menu not up */
1616
1617 sdmenu(1);
1618 noteop = NOP_NUL;
1619 return(SUCCESS);
1620
1621 } else { /* menu up - select operation */
1622
1623 if (vtcrow EQ 19) {
1624
1625 if ((vtccol GE 1) AND
1626 (vtccol LE 9)) { /* Begin Acc */
1627
1628 hilitnt(NOP_ACC);
1629 return(SUCCESS);
1630
1631 } else if ((vtccol GE 13) AND
1632 (vtccol LE 21)) { /* Move Note */
1633
1634 hilitnt(NOP_MVN);
1635 return(SUCCESS);
1636
1637 } else if ((vtccol GE 25) AND
1638 (vtccol LE 30)) { /* Escape */
1639
1640 hilitnt(NOP_NUL);
1641 return(SUCCESS);
1642
1643 }
1644
1645 return(FAILURE);
1646/*
1647
1648*/
1649 } else if (vtcrow EQ 20) {
1650
1651 if ((vtccol GE 1) AND
1652 (vtccol LE 9)) { /* Begin Nat */
1653
1654 hilitnt(NOP_NAT);
1655 return(SUCCESS);
1656
1657 } else if ((vtccol GE 13) AND
1658 (vtccol LE 22)) { /* Move Begin */
1659
1660 hilitnt(NOP_MVB);
1661 return(SUCCESS);
1662 }
1663
1664 return(FAILURE);
1665
1666 } else if (vtcrow EQ 21) {
1667
1668 if ((vtccol GE 1) AND
1669 (vtccol LE 8)) { /* End Note */
1670
1671 hilitnt(NOP_END);
1672 return(SUCCESS);
1673
1674 } else if ((vtccol GE 13) AND
1675 (vtccol LE 20)) { /* Move End */
1676
1677 hilitnt(NOP_MVE);
1678 return(SUCCESS);
1679 }
1680
1681 return(FAILURE);
1682
1683 } else
1684 return(FAILURE);
1685 }
1686
1687 return(FAILURE);
1688
1689/*
1690
1691*/
1692 case 4: /* assignments */
1693
1694 if (col LE 9) {
1695
1696 if (scmctl NE 1) { /* not up yet -- show page 1 */
1697
1698 lastam = 0;
1699 scmenu(1);
1700
1701 } else { /* up - switch pages */
1702
1703 if (lastam EQ 0) { /* show page 2 */
1704
1705 lastam = 60;
1706 scmenu(1);
1707
1708 } else { /* take down menu */
1709
1710 lastam = 0;
1711 scmenu(-1);
1712 }
1713 }
1714
1715 return(SUCCESS);
1716
1717 } else {
1718
1719 return(enterit()); /* data entry */
1720 }
1721
1722 case 5: /* tunings */
1723
1724 if ((col GE 14) AND (col LE 17)) {
1725
1726 if (scmctl NE 2)
1727 scmenu(2); /* put up menu */
1728 else
1729 scmenu(-1); /* take down menu */
1730
1731 return(SUCCESS);
1732
1733 } else {
1734
1735 return(enterit()); /* data entry */
1736 }
1737/*
1738
1739*/
1740 case 8: /* stop/next */
1741
1742 if ((col GE 40) AND (col LE 43)) { /* stop */
1743
1744 if (recsw) {
1745
1746 if (v_regs[5] & 0x0180)
1747 vbank(0);
1748
1749 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_STOP, -1, -1))) {
1750
1751 se_exec(ep, D_FWD);
1752
1753 } else if (E_NULL NE (ep = e_alc(E_SIZE1))) {
1754
1755 ep->e_time = t_cur;
1756 ep->e_type = EV_STOP;
1757 p_cur= e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
1758 se_exec(ep, D_FWD);
1759 ctrsw = TRUE;
1760 se_disp(ep, D_FWD, gdstbc, 1);
1761 scupd();
1762 }
1763 }
1764
1765 } else if ((col GE 45) AND (col LE 48)) { /* next */
1766
1767 if (recsw) {
1768
1769 if (v_regs[5] & 0x0180)
1770 vbank(0);
1771
1772 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_NEXT, -1, -1))) {
1773
1774 se_exec(ep, D_FWD);
1775
1776 } else if (E_NULL NE (ep = e_alc(E_SIZE1))) {
1777
1778 ep->e_time = t_cur;
1779 ep->e_type = EV_NEXT;
1780 p_cur= e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
1781 se_exec(ep, D_FWD);
1782 ctrsw = TRUE;
1783 se_disp(ep, D_FWD, gdstbc, 1);
1784 scupd();
1785 }
1786 }
1787
1788 }
1789
1790 return(SUCCESS);
1791
1792/*
1793
1794*/
1795 case 9: /* punch in/out */
1796
1797 if ((col GE 50) AND (col LE 51)) { /* punch in */
1798
1799 if (recsw) {
1800
1801 if (v_regs[5] & 0x0180)
1802 vbank(0);
1803
1804 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_STOP, 1, -1))) {
1805
1806 se_exec(ep, D_FWD);
1807
1808 } else if (E_NULL NE (ep = e_alc(E_SIZE1))) {
1809
1810 ep->e_time = t_cur;
1811 ep->e_type = EV_PNCH;
1812 ep->e_data1 = 1;
1813 p_cur= e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
1814 se_exec(ep, D_FWD);
1815 ctrsw = TRUE;
1816 se_disp(ep, D_FWD, gdstbc, 1);
1817 scupd();
1818 }
1819 }
1820
1821 } else if ((col GE 53) AND (col LE 55)) { /* punch out */
1822
1823 if (recsw) {
1824
1825 if (v_regs[5] & 0x0180)
1826 vbank(0);
1827
1828 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_PNCH, 0, -1))) {
1829
1830 se_exec(ep, D_FWD);
1831
1832 } else if (E_NULL NE (ep = e_alc(E_SIZE1))) {
1833
1834 ep->e_time = t_cur;
1835 ep->e_type = EV_PNCH;
1836 ep->e_data1 = 0;
1837 p_cur= e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
1838 se_exec(ep, D_FWD);
1839 ctrsw = TRUE;
1840 se_disp(ep, D_FWD, gdstbc, 1);
1841 scupd();
1842 }
1843 }
1844
1845 }
1846
1847 return(SUCCESS);
1848/*
1849
1850*/
1851 case 10: /* Output */
1852
1853 return(SUCCESS);
1854
1855 case 11: /* group/ins, trans, dyn/loc, velocity */
1856
1857 if ((row EQ 18) AND (col LE 3)) { /* inst. menu */
1858
1859 if (scmctl NE 0)
1860 scmenu(0); /* put up the menu */
1861 else
1862 scmenu(-1); /* take down the menu */
1863
1864 return(SUCCESS);
1865
1866 } else if ((row EQ 21) AND (col LE 3)) { /* velocity flag */
1867
1868 velflag = NOT velflag;
1869 ds_vmod();
1870 return(SUCCESS);
1871
1872 } else
1873 return(enterit()); /* inst. number */
1874
1875/*
1876
1877*/
1878 case 12: /* analog source, value */
1879
1880 if ((row EQ 23) AND (col LE 4)) { /* display enable */
1881
1882 angroup = -angroup;
1883
1884 if (angroup < 0)
1885 atr = SDW12ATR;
1886 else
1887 atr = (SD_CHNG << 4) | SDBG12;
1888
1889 if (v_regs[5] & 0x0180)
1890 vbank(0);
1891
1892 for (i = 0; i < 4; i++)
1893 vputa(obj8, 7, i, atr);
1894
1895 return(SUCCESS);
1896
1897 } else if ((row EQ 22) AND (col LE 4)) { /* r/p source */
1898
1899 ancmsw = NOT ancmsw;
1900
1901 if (ancmsw)
1902 atr = (SD_CHNG << 4) | SDBG12;
1903 else
1904 atr = SDW12ATR;
1905
1906 if (v_regs[5] & 0x0180)
1907 vbank(0);
1908
1909 for (i = 0; i < 4; i++)
1910 vputa(obj8, 6, i, atr);
1911
1912 return(SUCCESS);
1913
1914 } else {
1915
1916 return(enterit());
1917 }
1918/*
1919
1920*/
1921 case 13: /* score number and title */
1922
1923 if (col LE 4) { /* score menu */
1924
1925 if (scmctl NE 3)
1926 scmenu(3); /* put up menu */
1927 else
1928 scmenu(-1); /* take down menu */
1929
1930 return(SUCCESS);
1931
1932 } else if ((col GE 10) AND (col LE 25)) { /* score name */
1933
1934 if (sdmctl NE 0) {
1935
1936 sdmenu(0);
1937
1938 vtsetup(obj8, svtdsp, 10, scname[curscor], 19, 1,
1939 advscur, bspscur, nokey, nokey, svtstop,
1940 SDW13DEA, SDBG13);
1941
1942 } else {
1943
1944 vtyper();
1945 }
1946
1947 return(SUCCESS);
1948
1949 } else
1950 return(enterit());
1951/*
1952
1953*/
1954 case 14: /* rec mode */
1955
1956 if ((col GE 31) AND (col LE 34)) { /* Play */
1957
1958 recsw = FALSE;
1959 dsrpmod();
1960 return(SUCCESS);
1961
1962 } else if ((col GE 36) AND (col LE 40)) { /* Recrd */
1963
1964 recsw = TRUE;
1965 dsrpmod();
1966 return(SUCCESS);
1967
1968 } else if ((col GE 42) AND (col LE 47)) { /* OvrDub */
1969
1970 dubsw = NOT dubsw;
1971 dsrpmod();
1972 return(SUCCESS);
1973
1974 } else if ((col GE 49) AND (col LE 55)) { /* PunchIn */
1975
1976 pchsw = NOT pchsw;
1977 dsrpmod();
1978 return(SUCCESS);
1979
1980 }
1981
1982 return(FAILURE);
1983
1984 case 16: /* note display */
1985
1986 if (NOP_NUL NE noteop)
1987 donote();
1988
1989 return(SUCCESS);
1990 }
1991
1992 return(FAILURE);
1993}
Note: See TracBrowser for help on using the repository browser.