Browse Source

cmDspPgmKrChain.h/c, cmDspPgmKrTimeLineLite.c : Changes to support driving transforms

through from chain scale ranges untis and to take input from the MIDI input
or a the MIDI file player.
master
kevin 7 years ago
parent
commit
3dd3d9818a
3 changed files with 121 additions and 77 deletions
  1. 76
    56
      dsp/cmDspPgmKrChain.c
  2. 1
    0
      dsp/cmDspPgmKrChain.h
  3. 44
    21
      dsp/cmDspPgmKrTimeLineLite.c

+ 76
- 56
dsp/cmDspPgmKrChain.c View File

@@ -77,8 +77,8 @@ const cmChar_t* _mlbl(const cmChar_t* prefix, unsigned ch )
77 77
 #ifndef KR2
78 78
 void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpSymId, unsigned cmpPreGrpSymId, cmDspInst_t* modp, unsigned ach, unsigned mch )
79 79
 {
80
-  unsigned        measRtrChCnt = 6; // note: router channel 6 is not connected
81
-  unsigned        scaleRangeDfltSelId = 4;
80
+  unsigned        measRtrChCnt = 9; // note: router channel 8 is not connected
81
+  unsigned        scaleRangeDfltSelId = 8;
82 82
     
83 83
   int             krWndSmpCnt = 2048;
84 84
   int             krHopFact   = 4;
@@ -98,6 +98,10 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
98 98
   double          cmpWndMaxMs  = 1000.0;
99 99
   double          cmpWndMs     = 200.0;
100 100
 
101
+
102
+  cmDspInst_t* p_wet     = cmDspSysAllocInst(h,"Printer", NULL,   1, "WET:");
103
+
104
+  
101 105
   cmDspInst_t* achan = cmDspSysAllocInst(h, "AvailCh",     NULL, 1, xfadeChCnt );
102 106
   
103 107
   // Measurement scale/range 
@@ -119,7 +123,7 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
119 123
   cmDspInst_t* thr_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, 0.01, 100.0 );
120 124
   cmDspInst_t* upr_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -1.0, 5.0 );
121 125
   cmDspInst_t* lwr_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -5.0, 5.0 );
122
-  cmDspInst_t* off_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0,  0.0, 100.0 );
126
+  //cmDspInst_t* off_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0,  0.0, 100.0 );
123 127
   cmDspInst_t* wet_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0,  0.0, 1.0 );
124 128
 
125 129
  
@@ -158,40 +162,48 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
158 162
 
159 163
   
160 164
   //  Measurement Number Controls
165
+  cmDspInst_t* val_dynm_ctl    = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Dynm Meas"),       0.0, 10.0, 1.0, 1.0);  
161 166
   cmDspInst_t* min_dynm_ctl    = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Min In Dyn"),      0.0, 10.0, 1.0, 0.0);
162 167
   cmDspInst_t* max_dynm_ctl    = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Max In Dyn"),      0.0, 10.0, 1.0, 4.0);
163 168
   cmDspInst_t* dynm_map_menu   = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, lbl("DynSel 0"), NULL, "measMenu", scaleRangeDfltSelId);
164 169
 
165
-  cmDspInst_t* min_even_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Min In Even"),    0.0, 1.0, 0.001, 0.75);
170
+  cmDspInst_t* val_even_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Even Meas"),      0.0, 3.0, 0.001, 0.5);  
171
+  cmDspInst_t* min_even_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Min In Even"),    0.0, 1.0, 0.001, 0.0);
166 172
   cmDspInst_t* max_even_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Max In Even"),    0.0, 3.0, 0.001, 1.0);
167
-  cmDspInst_t* even_map_menu  = cmDspSysAllocMsgListP( h,preGrpSymId, NULL, lbl("EvenSel"), NULL, "measMenu", scaleRangeDfltSelId);
173
+  cmDspInst_t* even_map_menu  = cmDspSysAllocMsgListP( h,preGrpSymId, NULL, lbl("EvenSel"), NULL, "measMenu", 4);
168 174
 
169 175
   cmDspSysNewColumn(h,0);
170
-  cmDspInst_t* min_tmpo_ctl  = cmDspSysAllocScalarP(   h,preGrpSymId, NULL, lbl("Min In Tempo"),   0.0, 200.0, 1.0, 80.0);
171
-  cmDspInst_t* max_tmpo_ctl  = cmDspSysAllocScalarP(   h,preGrpSymId, NULL, lbl("Max In Tempo"),   0.0, 200.0, 1.0, 120.0);
172
-  cmDspInst_t* tmpo_map_menu = cmDspSysAllocMsgListP(  h,preGrpSymId, NULL, lbl("TempoSel"), NULL, "measMenu", scaleRangeDfltSelId);
176
+  cmDspInst_t* val_tmpo_ctl   = cmDspSysAllocScalarP(   h,preGrpSymId, NULL, lbl("Tempo Meas"),     0.0, 200.0, 1.0, 100.0);  
177
+  cmDspInst_t* min_tmpo_ctl   = cmDspSysAllocScalarP(   h,preGrpSymId, NULL, lbl("Min In Tempo"),   0.0, 200.0, 1.0, 80.0);
178
+  cmDspInst_t* max_tmpo_ctl   = cmDspSysAllocScalarP(   h,preGrpSymId, NULL, lbl("Max In Tempo"),   0.0, 200.0, 1.0, 120.0);
179
+  cmDspInst_t* tmpo_map_menu  = cmDspSysAllocMsgListP(  h,preGrpSymId, NULL, lbl("TempoSel"), NULL, "measMenu", scaleRangeDfltSelId);
173 180
 
181
+  cmDspInst_t* val_cost_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Cost Meas"),        0.0, 1.0, 0.01, 0.5);  
174 182
   cmDspInst_t* min_cost_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Min In Cost"),      0.0, 1.0, 0.01, 0.0);
175 183
   cmDspInst_t* max_cost_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Max In Cost"),      0.0, 1.0, 0.01, 1.0);
176 184
   cmDspInst_t* cost_map_menu  = cmDspSysAllocMsgListP( h,preGrpSymId, NULL, lbl("CostSel"), NULL, "measMenu", scaleRangeDfltSelId);
177 185
 
186
+  cmDspSysInstallCb(h, val_dynm_ctl, "val",     dynm_sr, "val_in", NULL );  
178 187
   cmDspSysInstallCb(h, min_dynm_ctl, "val",     dynm_sr, "min_in", NULL );
179
-  cmDspSysInstallCb(h, max_dynm_ctl, "val",     dynm_sr, "min_in", NULL );
188
+  cmDspSysInstallCb(h, max_dynm_ctl, "val",     dynm_sr, "max_in", NULL );
180 189
   cmDspSysInstallCb(h, dynm_map_menu,"out",     dynm_rt, "sel",    NULL );   
181 190
   cmDspSysInstallCb(h, dynm_sr,      "val_out", dynm_rt, "f-in",   NULL );
182 191
 
192
+  cmDspSysInstallCb(h, val_even_ctl, "val",     even_sr, "val_in", NULL );  
183 193
   cmDspSysInstallCb(h, min_even_ctl, "val",     even_sr, "min_in", NULL );
184
-  cmDspSysInstallCb(h, max_even_ctl, "val",     even_sr, "min_in", NULL );
194
+  cmDspSysInstallCb(h, max_even_ctl, "val",     even_sr, "max_in", NULL );
185 195
   cmDspSysInstallCb(h, even_map_menu,"out",     even_rt, "sel",    NULL );   
186 196
   cmDspSysInstallCb(h, even_sr,      "val_out", even_rt, "f-in",   NULL );
187 197
 
198
+  cmDspSysInstallCb(h, val_tmpo_ctl, "val",     tmpo_sr, "val_in", NULL );
188 199
   cmDspSysInstallCb(h, min_tmpo_ctl, "val",     tmpo_sr, "min_in", NULL );
189
-  cmDspSysInstallCb(h, max_tmpo_ctl, "val",     tmpo_sr, "min_in", NULL );
200
+  cmDspSysInstallCb(h, max_tmpo_ctl, "val",     tmpo_sr, "max_in", NULL );
190 201
   cmDspSysInstallCb(h, tmpo_map_menu,"out",     tmpo_rt, "sel",    NULL );   
191 202
   cmDspSysInstallCb(h, tmpo_sr,      "val_out", tmpo_rt, "f-in",   NULL );
192 203
   
204
+  cmDspSysInstallCb(h, val_cost_ctl, "val",     cost_sr, "val_in", NULL );
193 205
   cmDspSysInstallCb(h, min_cost_ctl, "val",     cost_sr, "min_in", NULL );
194
-  cmDspSysInstallCb(h, max_cost_ctl, "val",     cost_sr, "min_in", NULL );
206
+  cmDspSysInstallCb(h, max_cost_ctl, "val",     cost_sr, "max_in", NULL );
195 207
   cmDspSysInstallCb(h, cost_map_menu,"out",     cost_rt, "sel",    NULL );   
196 208
   cmDspSysInstallCb(h, cost_sr,      "val_out", cost_rt, "f-in",   NULL );
197 209
 
@@ -226,6 +238,7 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
226 238
   cmDspInst_t* lwr_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Lwr slope"), 0.3,  10.0, 0.01,  2.0 );
227 239
   cmDspInst_t* wet_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Wet Dry"),   0.0,   1.0, 0.001, 1.0 );
228 240
 
241
+  
229 242
   cmDspSysInstallCb(h, wnd_ctl, "out",         wnd_rt, "f-in",    NULL );
230 243
   cmDspSysInstallCb(h, achan,   "ch",          wnd_rt, "sel",     NULL );   // ach->rt sel
231 244
   cmDspSysInstallCb(h, wnd_rt,  "f-out-0",     kr0,    "wndn",    NULL );   // wndn->kr
@@ -237,42 +250,6 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
237 250
   cmDspSysInstallCb(h, hop_rt,  "f-out-1",     kr1,    "hopf",    NULL );   // hopf->kr
238 251
 
239 252
 
240
-  cmDspSysInstallCb(h, min_cel_ctl, "val",     cel_sr, "min_out", NULL );
241
-  cmDspSysInstallCb(h, max_cel_ctl, "val",     cel_sr, "max_out", NULL );
242
-  cmDspSysInstallCb(h, even_rt,     "f-out-0", cel_sr, "val_in",  NULL );
243
-  cmDspSysInstallCb(h, dynm_rt,     "f-out-0", cel_sr, "val_in",  NULL );
244
-  cmDspSysInstallCb(h, tmpo_rt,     "f-out-0", cel_sr, "val_in",  NULL );
245
-  cmDspSysInstallCb(h, cost_rt,     "f-out-0", cel_sr, "val_in",  NULL );
246
-  cmDspSysInstallCb(h, cel_sr,      "val_out", cel_ctl,"val",     NULL );
247
-  cmDspSysInstallCb(h, cel_ctl,     "val",     cel_rt, "f-in",    NULL );
248
-  cmDspSysInstallCb(h, achan,       "ch",      cel_rt, "sel",     NULL );   // ach->rt sel
249
-  cmDspSysInstallCb(h, cel_rt,      "f-out-0", kr0,    "ceil",    NULL );   // cel->kr
250
-  cmDspSysInstallCb(h, cel_rt,      "f-out-1", kr1,    "ceil",    NULL );   // cel->kr
251
-
252
-  cmDspSysInstallCb(h, min_exp_ctl, "val",     exp_sr, "min_out", NULL );
253
-  cmDspSysInstallCb(h, max_exp_ctl, "val",     exp_sr, "max_out", NULL );
254
-  cmDspSysInstallCb(h, even_rt,     "f-out-0", exp_sr, "val_in",  NULL );
255
-  cmDspSysInstallCb(h, dynm_rt,     "f-out-0", exp_sr, "val_in",  NULL );
256
-  cmDspSysInstallCb(h, tmpo_rt,     "f-out-0", exp_sr, "val_in",  NULL );
257
-  cmDspSysInstallCb(h, cost_rt,     "f-out-0", exp_sr, "val_in",  NULL );
258
-  cmDspSysInstallCb(h, exp_sr,      "val_out", exp_ctl,"val",     NULL );
259
-  cmDspSysInstallCb(h, exp_ctl,     "val",     exp_rt, "f-in",    NULL );
260
-  cmDspSysInstallCb(h, achan,       "ch",      exp_rt, "sel",     NULL );   // ach->rt sel
261
-  cmDspSysInstallCb(h, exp_rt,      "f-out-0", kr0,    "expo",    NULL );   // exp->kr
262
-  cmDspSysInstallCb(h, exp_rt,      "f-out-1", kr1,    "expo",    NULL );   // exp->kr
263
-
264
-  cmDspSysInstallCb(h, min_mix_ctl, "val",     mix_sr, "min_out", NULL );
265
-  cmDspSysInstallCb(h, max_mix_ctl, "val",     mix_sr, "max_out", NULL );
266
-  cmDspSysInstallCb(h, even_rt,     "f-out-0", mix_sr, "val_in",  NULL );
267
-  cmDspSysInstallCb(h, dynm_rt,     "f-out-0", mix_sr, "val_in",  NULL );
268
-  cmDspSysInstallCb(h, tmpo_rt,     "f-out-0", mix_sr, "val_in",  NULL );
269
-  cmDspSysInstallCb(h, cost_rt,     "f-out-0", mix_sr, "val_in",  NULL );
270
-  cmDspSysInstallCb(h, mix_sr,      "val_out", mix_ctl,"val",     NULL );
271
-  cmDspSysInstallCb(h, mix_ctl,     "val",     mix_rt, "f-in",    NULL );
272
-  cmDspSysInstallCb(h, achan,       "ch",      mix_rt, "sel",     NULL );   // ach->rt sel
273
-  cmDspSysInstallCb(h, mix_rt,      "f-out-0", kr0,    "mix",    NULL );   // mix->kr
274
-  cmDspSysInstallCb(h, mix_rt,      "f-out-1", kr1,    "mix",    NULL );   // mix->kr
275
-  
276 253
   cmDspSysInstallCb(h, min_thr_ctl, "val",     thr_sr, "min_out", NULL );
277 254
   cmDspSysInstallCb(h, max_thr_ctl, "val",     thr_sr, "max_out", NULL );
278 255
   cmDspSysInstallCb(h, even_rt,     "f-out-0", thr_sr, "val_in",  NULL );
@@ -311,15 +288,56 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
311 288
   
312 289
   cmDspSysInstallCb(h, min_wet_ctl, "val",     wet_sr, "min_out", NULL );
313 290
   cmDspSysInstallCb(h, max_wet_ctl, "val",     wet_sr, "max_out", NULL );
314
-  cmDspSysInstallCb(h, even_rt,     "f-out-4", wet_sr, "val_in",  NULL );
315
-  cmDspSysInstallCb(h, dynm_rt,     "f-out-4", wet_sr, "val_in",  NULL );
316
-  cmDspSysInstallCb(h, tmpo_rt,     "f-out-4", wet_sr, "val_in",  NULL );
317
-  cmDspSysInstallCb(h, cost_rt,     "f-out-4", wet_sr, "val_in",  NULL );
291
+  cmDspSysInstallCb(h, even_rt,     "f-out-3", wet_sr, "val_in",  NULL );
292
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-3", wet_sr, "val_in",  NULL );
293
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-3", wet_sr, "val_in",  NULL );
294
+  cmDspSysInstallCb(h, cost_rt,     "f-out-3", wet_sr, "val_in",  NULL );
318 295
   cmDspSysInstallCb(h, wet_sr,      "val_out", wet_ctl,"val",     NULL );
319 296
   cmDspSysInstallCb(h, wet_ctl,     "val",     wet_rt, "f-in",    NULL );
320 297
   cmDspSysInstallCb(h, achan,       "ch",      wet_rt, "sel",     NULL );   // ach->rt sel
321 298
   cmDspSysInstallCb(h, wet_rt,      "f-out-0", kr0,    "wet",     NULL );   // wet->kr
322 299
   cmDspSysInstallCb(h, wet_rt,      "f-out-1", kr1,    "wet",     NULL );   // wet->kr
300
+
301
+
302
+  cmDspSysInstallCb(h, wet_rt, "f-out-0", p_wet, "in", NULL );
303
+  cmDspSysInstallCb(h, wet_rt, "f-out-1", p_wet, "in", NULL );
304
+  
305
+  cmDspSysInstallCb(h, min_cel_ctl, "val",     cel_sr, "min_out", NULL );
306
+  cmDspSysInstallCb(h, max_cel_ctl, "val",     cel_sr, "max_out", NULL );
307
+  cmDspSysInstallCb(h, even_rt,     "f-out-4", cel_sr, "val_in",  NULL );
308
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-4", cel_sr, "val_in",  NULL );
309
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-4", cel_sr, "val_in",  NULL );
310
+  cmDspSysInstallCb(h, cost_rt,     "f-out-4", cel_sr, "val_in",  NULL );
311
+  cmDspSysInstallCb(h, cel_sr,      "val_out", cel_ctl,"val",     NULL );
312
+  cmDspSysInstallCb(h, cel_ctl,     "val",     cel_rt, "f-in",    NULL );
313
+  cmDspSysInstallCb(h, achan,       "ch",      cel_rt, "sel",     NULL );   // ach->rt sel
314
+  cmDspSysInstallCb(h, cel_rt,      "f-out-0", kr0,    "ceil",    NULL );   // cel->kr
315
+  cmDspSysInstallCb(h, cel_rt,      "f-out-1", kr1,    "ceil",    NULL );   // cel->kr
316
+
317
+  cmDspSysInstallCb(h, min_exp_ctl, "val",     exp_sr, "min_out", NULL );
318
+  cmDspSysInstallCb(h, max_exp_ctl, "val",     exp_sr, "max_out", NULL );
319
+  cmDspSysInstallCb(h, even_rt,     "f-out-5", exp_sr, "val_in",  NULL );
320
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-5", exp_sr, "val_in",  NULL );
321
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-5", exp_sr, "val_in",  NULL );
322
+  cmDspSysInstallCb(h, cost_rt,     "f-out-5", exp_sr, "val_in",  NULL );
323
+  cmDspSysInstallCb(h, exp_sr,      "val_out", exp_ctl,"val",     NULL );
324
+  cmDspSysInstallCb(h, exp_ctl,     "val",     exp_rt, "f-in",    NULL );
325
+  cmDspSysInstallCb(h, achan,       "ch",      exp_rt, "sel",     NULL );   // ach->rt sel
326
+  cmDspSysInstallCb(h, exp_rt,      "f-out-0", kr0,    "expo",    NULL );   // exp->kr
327
+  cmDspSysInstallCb(h, exp_rt,      "f-out-1", kr1,    "expo",    NULL );   // exp->kr
328
+
329
+  cmDspSysInstallCb(h, min_mix_ctl, "val",     mix_sr, "min_out", NULL );
330
+  cmDspSysInstallCb(h, max_mix_ctl, "val",     mix_sr, "max_out", NULL );
331
+  cmDspSysInstallCb(h, even_rt,     "f-out-6", mix_sr, "val_in",  NULL );
332
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-6", mix_sr, "val_in",  NULL );
333
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-6", mix_sr, "val_in",  NULL );
334
+  cmDspSysInstallCb(h, cost_rt,     "f-out-6", mix_sr, "val_in",  NULL );
335
+  cmDspSysInstallCb(h, mix_sr,      "val_out", mix_ctl,"val",     NULL );
336
+  cmDspSysInstallCb(h, mix_ctl,     "val",     mix_rt, "f-in",    NULL );
337
+  cmDspSysInstallCb(h, achan,       "ch",      mix_rt, "sel",     NULL );   // ach->rt sel
338
+  cmDspSysInstallCb(h, mix_rt,      "f-out-0", kr0,    "mix",    NULL );   // mix->kr
339
+  cmDspSysInstallCb(h, mix_rt,      "f-out-1", kr1,    "mix",    NULL );   // mix->kr
340
+  
323 341
   
324 342
 
325 343
   cmDspSysNewColumn(h,0);
@@ -374,7 +392,7 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
374 392
   cmDspSysInstallCb(h, modp, mlbl("thr"),  thr_ctl, "val", NULL );
375 393
   cmDspSysInstallCb(h, modp, mlbl("upr"),  upr_ctl, "val", NULL );
376 394
   cmDspSysInstallCb(h, modp, mlbl("lwr"),  lwr_ctl, "val", NULL );
377
-  cmDspSysInstallCb(h, modp, mlbl("wet"),  wet_ctl, "val", NULL );
395
+  //cmDspSysInstallCb(h, modp, mlbl("wet"),  wet_ctl, "val", NULL );
378 396
   cmDspSysInstallCb(h, modp, mlbl("minc"), min_cel_ctl, "val", NULL );
379 397
   cmDspSysInstallCb(h, modp, mlbl("maxc"), max_cel_ctl, "val", NULL );
380 398
   cmDspSysInstallCb(h, modp, mlbl("mine"), min_exp_ctl, "val", NULL );
@@ -389,13 +407,14 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
389 407
   cmDspSysInstallCb(h, modp, mlbl("maxl"), max_lwr_ctl, "val", NULL );
390 408
   cmDspSysInstallCb(h, modp, mlbl("mino"), min_off_ctl, "val", NULL );
391 409
   cmDspSysInstallCb(h, modp, mlbl("maxo"), max_off_ctl, "val", NULL );
392
-  cmDspSysInstallCb(h, modp, mlbl("sw"),   achan,       "trig", NULL ); // See also: amp.sfloc->achan.trig
410
+  //cmDspSysInstallCb(h, modp, mlbl("sw"),   achan,       "trig", NULL ); // See also: amp.sfloc->achan.trig
393 411
 
394 412
   
395 413
   c->achan = achan; 
396 414
   c->kr0   = kr0; 
397 415
   c->kr1   = kr1;
398
-  c->cmp   = cmp; 
416
+  c->cmp   = cmp;
417
+  c->even_ctl = val_even_ctl;
399 418
 
400 419
 }
401 420
 #endif
@@ -405,7 +424,7 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
405 424
 //  KR2 Modeless Transform based on cmDspKr2 and cmSpecDist2
406 425
 //=======================================================================================================================
407 426
 //=======================================================================================================================
408
-
427
+/*
409 428
 #ifdef KR2
410 429
 void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpSymId, unsigned cmpPreGrpSymId, cmDspInst_t* modp, unsigned ach, unsigned mch )
411 430
 {
@@ -584,3 +603,4 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
584 603
 }
585 604
 
586 605
 #endif
606
+*/

+ 1
- 0
dsp/cmDspPgmKrChain.h View File

@@ -31,6 +31,7 @@ typedef struct
31 31
   cmDspInst_t* kr0;  // audio input
32 32
   cmDspInst_t* kr1;
33 33
   cmDspInst_t* cmp;  // audio output
34
+  cmDspInst_t* even_ctl;
34 35
 } cmDspTlXform_t;
35 36
 
36 37
 

+ 44
- 21
dsp/cmDspPgmKrTimeLineLite.c View File

@@ -58,9 +58,12 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
58 58
   if( krLoadRsrc(h,&err,&r) != kOkDspRC )
59 59
     return rc;
60 60
 
61
+  
62
+
61 63
   cmDspInst_t* ai0 = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 0);
62 64
   cmDspInst_t* ai1 = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 1);
63
-  cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn",      NULL,  2, "MOTU - Traveler mk3", "MIDI Port");
65
+  //cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn",      NULL,  2, "MOTU - Traveler mk3", "MIDI Port");
66
+  cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn",      NULL,  2, "Apple Inc. - IAC Driver", "Bus 1");
64 67
   
65 68
   cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.tlPrefixPath );
66 69
   cmDspInst_t* scp  = cmDspSysAllocInst(h,"Score",       "sc",  1, r.scFn );
@@ -70,7 +73,7 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
70 73
   cmDspInst_t* nmp  = cmDspSysAllocInst(h,"NanoMap",     NULL,  0 );
71 74
   cmDspInst_t* mop  = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, r.midiDevice,r.midiOutPort);
72 75
   cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, r.midiDevice,r.midiOutPort2);
73
-  cmDspInst_t* sfp  = cmDspSysAllocInst(h,"ScFol",       NULL,  1, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
76
+  cmDspInst_t* sfp  = cmDspSysAllocInst(h,"ScFol",       NULL,  5, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
74 77
   cmDspInst_t* amp  = cmDspSysAllocInst(h,"ActiveMeas",  NULL,  1, 100 );
75 78
   cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod",       NULL,  2, r.modFn, "m1" );
76 79
  
@@ -88,23 +91,23 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
88 91
 
89 92
   cmDspInst_t* ao0 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 4 ); // 4 Piano     1 Output
90 93
   cmDspInst_t* ao1 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 5 ); // 5          2
91
-  cmDspInst_t* ao2 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 2 ); // 2 Transform 1 OUtput
92
-  cmDspInst_t* ao3 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 3 ); // 3          2
94
+  cmDspInst_t* ao2 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 0 ); // 2 Transform 1 OUtput
95
+  cmDspInst_t* ao3 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 1 ); // 3          2
93 96
 
94 97
   cmDspSysNewPage(h,"Main");
95 98
   cmDspInst_t* onb     = cmDspSysAllocInst(h,"Button", "start",   2, kButtonDuiId, 1.0 );
96 99
   cmDspInst_t* offb    = cmDspSysAllocInst(h,"Button", "stop",    2, kButtonDuiId, 1.0 );
97 100
   cmDspInst_t* mod_sel = cmDspSysAllocMsgList(h, NULL, "mod_sel", 1 );
98 101
   cmDspInst_t* prp     = cmDspSysAllocInst(h,"Printer", NULL,   1, ">" );
99
-  cmDspInst_t* prd     = cmDspSysAllocInst(h,"Printer", NULL,   1, "DYN:" );
102
+  cmDspInst_t* prd     = cmDspSysAllocInst(h,"Printer", NULL,   1, "DYNM:" );
100 103
   cmDspInst_t* pre     = cmDspSysAllocInst(h,"Printer", NULL,   1, "EVEN:" );
101
-  cmDspInst_t* prt     = cmDspSysAllocInst(h,"Printer", NULL,   1, "TEMPO:");
104
+  cmDspInst_t* prt     = cmDspSysAllocInst(h,"Printer", NULL,   1, "TMPO:");
102 105
   cmDspInst_t* prc     = cmDspSysAllocInst(h,"Printer", NULL,   1, "COST:");
103 106
 
104 107
   // Record <-> Live switches
105 108
   cmDspInst_t* tlRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);  // time line swich
106 109
   cmDspInst_t* mfpRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
107
-  cmDspInst_t* amRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
110
+  //cmDspInst_t* amRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
108 111
 
109 112
   //cmDspSysNewColumn(h,0);
110 113
   cmDspInst_t* igain0 = cmDspSysAllocInst(h,"Scalar", "In Gain-0",    5, kNumberDuiId, 0.0,   100.0,0.01,   1.0 );  
@@ -184,9 +187,10 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
184 187
   //cmDspSysInstallCb( h, prtBtn, "sym",    scp, "cmd",   NULL ); // print the score
185 188
   cmDspSysInstallCb( h, amCmd,  "add",    amp, "cmd",   NULL ); // add active meas
186 189
   cmDspSysInstallCb( h, amCmd,  "rewind", amp, "cmd",   NULL ); // rewind active meas
187
-  cmDspSysInstallCb( h, sfp,    "out",    amRt, "f-in", NULL ); // sfp-active meas router (rtr is switched by live btn)
188
-  cmDspSysInstallCb( h, amRt,   "f-out-0",amp, "sfloc", NULL ); 
189
-
190
+  //cmDspSysInstallCb( h, sfp,    "out",    amRt, "f-in", NULL ); // sfp-active meas router (rtr is switched by live btn)
191
+  //cmDspSysInstallCb( h, amRt,   "f-out-0",amp, "sfloc", NULL ); 
192
+  cmDspSysInstallCb( h, sfp,    "out",    amp, "sfloc", NULL );
193
+  
190 194
   cmDspSysInstallCb( h, sfp, "vloc", amp,   "loc",  NULL ); // live meas's to active meas unit
191 195
   cmDspSysInstallCb( h, sfp, "vval", amp,   "val",  NULL ); //
192 196
   cmDspSysInstallCb( h, sfp, "vcost",amp,   "cst",  NULL ); //
@@ -194,20 +198,37 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
194 198
   cmDspSysInstallCb( h, sfp, "vtyp", amCmd, "add",  NULL);  //
195 199
 
196 200
   // ***** delete this to prevent the score follower from driving the active-measure unit in 'live' mode
197
-  cmDspSysInstallCb( h, amRt,   "f-out-1",amp, "sfloc", NULL );
201
+  //cmDspSysInstallCb( h, amRt,   "f-out-1",amp, "sfloc", NULL );
198 202
   // *****
199 203
 
200 204
   // active measure loc to xfad channel trigger
205
+ 
201 206
   cmDspSysInstallCb( h, amp,       "scloc",c0.achan, "trig", NULL );  // See Also: modp.sw ->achan.trig
202 207
   cmDspSysInstallCb( h, amp,       "scloc",c1.achan, "trig", NULL );
203 208
   cmDspSysInstallCb( h, recallBtn, "sym",  c0.achan, "trig", NULL ); 
204 209
   cmDspSysInstallCb( h, recallBtn, "sym",  c1.achan, "trig", NULL );
205
-
210
+  
206 211
   cmDspSysInstallCb( h, amp,    "even",   pre,        "in",   NULL );  // active meas output to printers
212
+  //cmDspSysInstallCb( h, amp,    "even",   c0.even_ctl,  "val",   NULL );  
213
+  //cmDspSysInstallCb( h, amp,    "even",   c1.even_ctl,  "val",   NULL );
214
+  cmDspSysInstallCb( h, amp,    "even",   modp,       "even", NULL );
215
+
207 216
   cmDspSysInstallCb( h, amp,    "dyn",    prd,        "in",   NULL );
217
+  cmDspSysInstallCb( h, amp,    "dyn",    modp,       "dyn",  NULL );
218
+  
208 219
   cmDspSysInstallCb( h, amp,    "tempo",  prt,        "in",   NULL );
220
+  cmDspSysInstallCb( h, amp,    "tempo",  modp,       "tempo",NULL );
221
+  
209 222
   cmDspSysInstallCb( h, amp,    "cost",   prc,        "in",   NULL );
223
+  cmDspSysInstallCb( h, amp,    "cost",   modp,       "cost", NULL );
210 224
 
225
+  
226
+  /*
227
+  cmDspSysInstallCb( h, sfp, "vloc", pre,   "in",  NULL ); // live meas's to active meas unit
228
+  cmDspSysInstallCb( h, sfp, "vval", prd,   "in",  NULL ); //
229
+  cmDspSysInstallCb( h, sfp, "vcost",prt,   "in",  NULL ); //
230
+  cmDspSysInstallCb( h, sfp, "vtyp", prc,   "in", NULL ); //
231
+  */
211 232
   // wave-table to time-line cursor
212 233
   //cmDspSysInstallCb(   h, wtp, "fidx",tlp,  "curs", NULL); 
213 234
 
@@ -248,22 +269,24 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
248 269
   cmDspSysInstallCb(h, scp, "sel",    modp,"reset", NULL );
249 270
   cmDspSysInstallCb(h, scp, "sel",    prp, "in",    NULL );
250 271
 
272
+  cmDspInst_t* msrc = mfp;  // switch MIDI source (mfp or mip)
273
+  
251 274
   // MIDI file player to score follower and sampler
252
-  cmDspSysInstallCb(h, mip,  "smpidx",  sfp, "smpidx",NULL );
275
+  cmDspSysInstallCb(h, msrc,  "smpidx",  sfp, "smpidx",NULL );
253 276
   //cmDspSysInstallCb(h, mfp,  "id",      sfp, "muid",  NULL );
254 277
 
255
-  cmDspSysInstallCb(h, mip,   "d1",     sfp,  "d1",    NULL );
256
-  cmDspSysInstallCb(h, mip,   "d1",     nmp,  "d1",    NULL );
278
+  cmDspSysInstallCb(h, msrc,   "d1",     sfp,  "d1",    NULL );
279
+  cmDspSysInstallCb(h, msrc,   "d1",     nmp,  "d1",    NULL );
257 280
   cmDspSysInstallCb(h, nmp,   "d1",     mop,  "d1",    NULL );
258 281
   //cmDspSysInstallCb(h, nmp,   "d1",     mo2p, "d1",    NULL );
259 282
 
260
-  cmDspSysInstallCb(h, mip,  "d0",      sfp,  "d0",   NULL );
261
-  cmDspSysInstallCb(h, mip,  "d0",      nmp,  "d0",   NULL );
283
+  cmDspSysInstallCb(h, msrc,  "d0",      sfp,  "d0",   NULL );
284
+  cmDspSysInstallCb(h, msrc,  "d0",      nmp,  "d0",   NULL );
262 285
   cmDspSysInstallCb(h, nmp,  "d0",      mop,  "d0",   NULL );
263 286
   //cmDspSysInstallCb(h, nmp,  "d0",      mo2p, "d0",   NULL );
264 287
 
265
-  cmDspSysInstallCb(h, mip,  "status",  sfp,  "status",NULL );
266
-  cmDspSysInstallCb(h, mip,  "status",  nmp,  "status",NULL );
288
+  cmDspSysInstallCb(h, msrc,  "status",  sfp,  "status",NULL );
289
+  cmDspSysInstallCb(h, msrc,  "status",  nmp,  "status",NULL );
267 290
   cmDspSysInstallCb(h, nmp,  "status",  mop,  "status",NULL );
268 291
   //cmDspSysInstallCb(h, nmp,  "status",  mo2p, "status",NULL );
269 292
 
@@ -281,8 +304,8 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
281 304
   cmDspSysInstallCb(h, modp, "wgain0",  ogain2, "val",  NULL );
282 305
   cmDspSysInstallCb(h, modp, "wgain1",  ogain3, "val",  NULL );
283 306
 
284
-  cmDspSysInstallCb(h, ogain0, "val", ao0, "gain", NULL );   // output gain control - dry 0
285
-  cmDspSysInstallCb(h, ogain1, "val", ao1, "gain", NULL );   //                       dry 1
307
+  //cmDspSysInstallCb(h, ogain0, "val", ao0, "gain", NULL );   // output gain control - dry 0
308
+  //cmDspSysInstallCb(h, ogain1, "val", ao1, "gain", NULL );   //                       dry 1
286 309
   cmDspSysInstallCb(h, ogain2, "val", ao2, "gain", NULL );   //                       wet 0
287 310
   cmDspSysInstallCb(h, ogain3, "val", ao3, "gain", NULL );   //                       wet 1
288 311
 

Loading…
Cancel
Save