source: buchla-68k/orig/RAM/ETDYN.C@ 4f508e6

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

Imported original source code.

  • Property mode set to 100755
File size: 2.8 KB
RevLine 
[3ae31e9]1/*
2 =============================================================================
3 etdyn.c -- dynamics field handlers
4 Version 8 -- 1988-06-08 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "stddefs.h"
9#include "fields.h"
10#include "hwdefs.h"
11#include "graphdef.h"
12#include "vsdd.h"
13#include "vsddsw.h"
14#include "score.h"
15#include "scfns.h"
16
17#include "midas.h"
18#include "scdsp.h"
19#include "instdsp.h"
20
21extern unsigned *obj8;
22
23extern short ctrsw, recsw, stccol;
24
25extern short grpdyn[], grpmode[], grpstat[];
26
27extern struct gdsel *gdstbc[];
28
29/*
30 =============================================================================
31 et_dyn() -- load edit buffer
32 =============================================================================
33*/
34
35short
36et_dyn(n)
37short n;
38{
39 ebuf[0] =grpdyn[n] + '0';
40 ebuf[1] = '\0';
41 ebflag = TRUE;
42 return(SUCCESS);
43}
44
45/*
46
47*/
48
49/*
50 =============================================================================
51 ef_dyn() -- parse edit buffer
52 =============================================================================
53*/
54
55short
56ef_dyn(n)
57short n;
58{
59 register short ival;
60 register struct s_entry *ep;
61
62 ebuf[1] = '\0';
63 ival = ebuf[0] - '0';
64 ebflag = FALSE;
65
66 setdyn(n, ival);
67
68 if (recsw AND grpmode[n] AND (2 EQ grpmode[n])) {
69
70 if (E_NULL NE (ep = findev(p_cur, t_cur, EV_DYN, n, -1))) {
71
72 ep->e_data2 = ival;
73
74 } else if (E_NULL NE (ep = e_alc(E_SIZE2))) {
75
76 ep->e_type = EV_DYN;
77 ep->e_data1 = n;
78 ep->e_data2 = ival;
79 ep->e_time = t_cur;
80 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
81 eh_ins(ep, EH_DYN);
82 ctrsw = TRUE;
83 se_disp(ep, D_FWD, gdstbc, 1);
84 scupd();
85 }
86 }
87
88 return(SUCCESS);
89}
90
91/*
92
93*/
94
95/*
96 =============================================================================
97 rd_dyn() -- (re)display the field
98 =============================================================================
99*/
100
101short
102rd_dyn(n)
103short n;
104{
105 if (v_regs[5] & 0x0180)
106 vbank(0);
107
108 vputc(obj8, 4, 6+(n*5), (grpdyn[n] + '0'), SDW11ATR);
109
110 return(SUCCESS);
111}
112
113/*
114 =============================================================================
115 ds_dyn() -- display all dynamics to group assignments
116 =============================================================================
117*/
118
119ds_dyn()
120{
121 register short i;
122
123 for (i = 0; i < 12; i++)
124 rd_dyn(i);
125}
126
127/*
128
129*/
130
131/*
132 =============================================================================
133 nd_dyn() -- data entry function
134 =============================================================================
135*/
136
137short
138nd_dyn(n, k)
139register short n, k;
140{
141 ebuf[0] = k + '0';
142
143 if (v_regs[5] & 0x0180)
144 vbank(0);
145
146 vputc(obj8, 4, stccol, k + '0', SDW11DEA);
147 advscur();
148
149 return(SUCCESS);
150}
Note: See TracBrowser for help on using the repository browser.