Преглед на файлове

cmDspPgmKrTimeLineLite.c : Further program simplifications.

master
kevin преди 8 години
родител
ревизия
cf82ed61e1
променени са 1 файла, в които са добавени 19 реда и са изтрити 71 реда
  1. 19
    71
      dsp/cmDspPgmKrTimeLineLite.c

+ 19
- 71
dsp/cmDspPgmKrTimeLineLite.c Целия файл

@@ -49,7 +49,7 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
49 49
   unsigned  sfBufCnt                 = 7;     // length of the MIDI event buffer
50 50
   unsigned  sfMaxWndCnt              = 10;    // length of the score event buffer
51 51
   unsigned  sfMinVel                 = 5;     // ignore MIDI events below this velocity
52
-  bool      sfEnaMeasFl              = false;
52
+  bool      sfEnaMeasFl              = true;
53 53
 
54 54
  
55 55
   memset(&r,0,sizeof(r));
@@ -89,10 +89,6 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
89 89
   cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 3 );
90 90
 
91 91
   cmDspSysNewPage(h,"Main");
92
-  cmDspInst_t* liveb= cmDspSysAllocInst(h,"Button", "live",    2, kCheckDuiId,  0.0 );
93
-  cmDspInst_t* simb = cmDspSysAllocInst(h,"Button", "simulate",2, kCheckDuiId,  0.0 );
94
-  cmDspInst_t* ainb = cmDspSysAllocInst(h,"Button", "audio in",2, kCheckDuiId,  0.0 );
95
-  cmDspInst_t* measb= cmDspSysAllocInst(h,"Button", "meas",    2, kCheckDuiId,  0.0 );
96 92
   cmDspInst_t* onb  = cmDspSysAllocInst(h,"Button", "start",   2, kButtonDuiId, 1.0 );
97 93
   cmDspInst_t* offb = cmDspSysAllocInst(h,"Button", "stop",    2, kButtonDuiId, 1.0 );
98 94
   cmDspInst_t* prp  = cmDspSysAllocInst(h,"Printer", NULL,   1, ">" );
@@ -105,20 +101,12 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
105 101
   cmDspInst_t* tlRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);  // time line swich
106 102
   cmDspInst_t* mfpRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
107 103
   cmDspInst_t* amRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
108
-  cmDspInst_t* au0Sw = cmDspSysAllocInst(h,"1ofN",   NULL, 2, 2, 0);
109
-  cmDspInst_t* au1Sw = cmDspSysAllocInst(h,"1ofN",   NULL, 2, 2, 0);
110 104
 
111
-  cmDspInst_t* siRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);  
112
-  cmDspInst_t* muRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);  
113
-  cmDspInst_t* d0Rt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
114
-  cmDspInst_t* d1Rt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
115
-  cmDspInst_t* stRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
116
-
117
-  cmDspSysNewColumn(h,0);
105
+  //cmDspSysNewColumn(h,0);
118 106
   cmDspInst_t* igain0 = cmDspSysAllocInst(h,"Scalar", "In Gain-0",    5, kNumberDuiId, 0.0,   100.0,0.01,   1.0 );  
119 107
   cmDspInst_t* igain1 = cmDspSysAllocInst(h,"Scalar", "In Gain-1",    5, kNumberDuiId, 0.0,   100.0,0.01,   1.0 );  
120 108
 
121
-  cmDspSysNewColumn(h,0);
109
+  //cmDspSysNewColumn(h,0);
122 110
   cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Out Gain-0",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
123 111
   cmDspInst_t* ogain1 = cmDspSysAllocInst(h,"Scalar", "Out Gain-1",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
124 112
 
@@ -144,12 +132,11 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
144 132
   cmDspInst_t* prePath    = cmDspSysAllocInst(   h, "Fname",  "prePath",   3, true,NULL,r.tlPrefixPath);
145 133
   
146 134
 
147
-  cmDspSysNewColumn(h,0);
135
+  //cmDspSysNewColumn(h,0);
148 136
 
149 137
   //--------------- Recorded performance evaluation and Active Measurement related controls
150 138
   cmDspInst_t* clrBtn  = cmDspSysAllocButton( h, "clear",  0);
151 139
   cmDspInst_t* prtBtn  = cmDspSysAllocButton( h, "dump",  0);
152
-  cmDspInst_t* mlst    = cmDspSysAllocInst(   h, "MsgList",   NULL, 3, "meas", r.measFn, 2);
153 140
   cmDspInst_t* amCmd   = cmDspSysAllocInst(   h, "PortToSym", NULL, 2, "add", "rewind" );  
154 141
 
155 142
   if((rc = cmDspSysLastRC(h)) != kOkDspRC )
@@ -185,14 +172,9 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
185 172
 
186 173
   cmDspSysInstallCb( h, clrBtn, "sym",    amp, "cmd",   NULL ); // clear active meas.
187 174
   cmDspSysInstallCb( h, prtBtn, "sym",    amp, "cmd",   NULL ); // print active meas
188
-  cmDspSysInstallCb( h, prtBtn, "sym",    scp, "cmd",   NULL ); 
189
-  cmDspSysInstallCb( h, amCmd, "add",     amp, "cmd",   NULL ); // add active meas
190
-  cmDspSysInstallCb( h, amCmd, "rewind",  amp, "cmd",   NULL ); // rewind active meas
191
-  cmDspSysInstallCb( h, mlst,   "loc",    amp, "loc",   NULL ); // recorded meas's list to active meas unit
192
-  cmDspSysInstallCb( h, mlst,   "typeId", amp, "type",  NULL ); //
193
-  cmDspSysInstallCb( h, mlst,   "val",    amp, "val",   NULL ); //
194
-  cmDspSysInstallCb( h, mlst,   "cost",   amp, "cst",   NULL ); // 
195
-  cmDspSysInstallCb( h, mlst,   "typeId", amCmd, "add", NULL ); //
175
+  //cmDspSysInstallCb( h, prtBtn, "sym",    scp, "cmd",   NULL ); // print the score
176
+  cmDspSysInstallCb( h, amCmd,  "add",    amp, "cmd",   NULL ); // add active meas
177
+  cmDspSysInstallCb( h, amCmd,  "rewind", amp, "cmd",   NULL ); // rewind active meas
196 178
   cmDspSysInstallCb( h, sfp,    "out",    amRt, "f-in", NULL ); // sfp-active meas router (rtr is switched by live btn)
197 179
   cmDspSysInstallCb( h, amRt,   "f-out-0",amp, "sfloc", NULL ); 
198 180
 
@@ -222,26 +204,6 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
222 204
 
223 205
   cmDspSysInstallCb(h, prePath, "out", tlp, "path", NULL );
224 206
 
225
-  // 'live' button -> live router selector switch 
226
-  //cmDspSysInstallCb(h, liveb, "out",  wtRt, "sel", NULL );
227
-  cmDspSysInstallCb(h, liveb, "out",  tlRt, "sel", NULL );
228
-  cmDspSysInstallCb(h, liveb, "out",  mfpRt,"sel", NULL );
229
-  cmDspSysInstallCb(h, liveb, "out",  amRt, "sel", NULL );
230
-  cmDspSysInstallCb(h, liveb, "out",  au0Sw, "chidx", NULL );
231
-  cmDspSysInstallCb(h, liveb, "out",  au1Sw, "chidx", NULL );
232
-  cmDspSysInstallCb(h, liveb, "out",  measb, "in",     NULL );
233
-  cmDspSysInstallCb(h, measb, "out",  sfp,   "measfl", NULL );
234
-
235
-  // 'simulate' button -> simulate router selector switch
236
-  cmDspSysInstallCb(h, simb,  "out",  ainb,  "in", NULL );
237
-  cmDspSysInstallCb(h, ainb,  "out",  au0Sw, "chidx", NULL );
238
-  cmDspSysInstallCb(h, ainb,  "out",  au1Sw, "chidx", NULL );
239
-  cmDspSysInstallCb(h, simb,  "out",  siRt,  "sel", NULL );
240
-  cmDspSysInstallCb(h, simb,  "out",  muRt,  "sel", NULL );
241
-  cmDspSysInstallCb(h, simb,  "out",  d1Rt,  "sel", NULL );
242
-  cmDspSysInstallCb(h, simb,  "out",  d0Rt,  "sel", NULL );
243
-  cmDspSysInstallCb(h, simb,  "out",  stRt,  "sel", NULL );
244
-  
245 207
   
246 208
   // start connections
247 209
   cmDspSysInstallCb(h, onb,  "sym",    tlRt, "s-in",  NULL );
@@ -275,39 +237,25 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
275 237
   cmDspSysInstallCb(h, scp, "sel",    modp,"reset", NULL );
276 238
   cmDspSysInstallCb(h, scp, "sel",    prp, "in", NULL );
277 239
 
278
-  // MIDI file player to score follower
279
-  cmDspSysInstallCb(h, mfp,  "smpidx",  siRt, "f-in",NULL );
280
-  cmDspSysInstallCb(h, siRt, "f-out-1", sfp,  "smpidx",NULL ); 
281
-  // leave siRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
282
-
283
-  cmDspSysInstallCb(h, mfp,  "id",      muRt, "f-in",  NULL );
284
-  cmDspSysInstallCb(h, muRt, "f-out-1", sfp,  "muid",    NULL );
285
-  // leave muRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
240
+  // MIDI file player to score follower and sampler
241
+  cmDspSysInstallCb(h, mfp,  "smpidx",  sfp, "smpidx",NULL );
242
+  cmDspSysInstallCb(h, mfp,  "id",      sfp, "muid",  NULL );
286 243
 
287
-  cmDspSysInstallCb(h, mfp,  "d1",      d1Rt, "f-in",  NULL );
288
-  cmDspSysInstallCb(h, d1Rt, "f-out-1", sfp,  "d1",    NULL );
289
-  cmDspSysInstallCb(h, d1Rt, "f-out-1", nmp,  "d1",    NULL );
244
+  cmDspSysInstallCb(h, mfp,   "d1",     sfp,  "d1",    NULL );
245
+  cmDspSysInstallCb(h, mfp,   "d1",     nmp,  "d1",    NULL );
290 246
   cmDspSysInstallCb(h, nmp,   "d1",     mop,  "d1",    NULL );
291
-  cmDspSysInstallCb(h, nmp,   "d1",     mo2p,  "d1",    NULL );
247
+  cmDspSysInstallCb(h, nmp,   "d1",     mo2p, "d1",    NULL );
292 248
 
293
-  cmDspSysInstallCb(h, mfp,  "d0",      d0Rt,  "f-in", NULL );
294
-  cmDspSysInstallCb(h, d0Rt, "f-out-1", sfp,   "d0",   NULL );
295
-  cmDspSysInstallCb(h, d0Rt, "f-out-1", nmp,  "d0",   NULL );
249
+  cmDspSysInstallCb(h, mfp,  "d0",      sfp,  "d0",   NULL );
250
+  cmDspSysInstallCb(h, mfp,  "d0",      nmp,  "d0",   NULL );
296 251
   cmDspSysInstallCb(h, nmp,  "d0",      mop,  "d0",   NULL );
297
-  cmDspSysInstallCb(h, nmp,  "d0",      mo2p,  "d0",   NULL );
252
+  cmDspSysInstallCb(h, nmp,  "d0",      mo2p, "d0",   NULL );
298 253
 
299
-  cmDspSysInstallCb(h, mfp, "status",   stRt, "f-in",  NULL );
300
-  cmDspSysInstallCb(h, stRt, "f-out-1", sfp,  "status",NULL );
301
-  cmDspSysInstallCb(h, stRt, "f-out-1", nmp,  "status",NULL );
254
+  cmDspSysInstallCb(h, mfp,  "status",  sfp,  "status",NULL );
255
+  cmDspSysInstallCb(h, mfp,  "status",  nmp,  "status",NULL );
302 256
   cmDspSysInstallCb(h, nmp,  "status",  mop,  "status",NULL );
303
-  cmDspSysInstallCb(h, nmp,  "status",  mo2p,  "status",NULL );
304
-
257
+  cmDspSysInstallCb(h, nmp,  "status",  mo2p, "status",NULL );
305 258
 
306
-  // MIDI input port
307
-  //cmDspSysInstallCb(h, mip, "smpidx", sfp, "smpidx", NULL );
308
-  //cmDspSysInstallCb(h, mip, "d1",     sfp, "d1",     NULL );
309
-  //cmDspSysInstallCb(h, mip, "d0",     sfp, "d0",     NULL );
310
-  //cmDspSysInstallCb(h, mip, "status", sfp, "status", NULL );
311 259
 
312 260
   // score follower to recd_play,modulator and printers
313 261
   cmDspSysInstallCb(h, sfp, "out",     modp,    "index", NULL );

Loading…
Отказ
Запис