瀏覽代碼

cmDspPgmKr.c : Added the cmDspRecdPlay object to the patch.

master
kpl 11 年之前
父節點
當前提交
691d0ef278
共有 1 個檔案被更改,包括 12 行新增4 行删除
  1. 12
    4
      dsp/cmDspPgmKr.c

+ 12
- 4
dsp/cmDspPgmKr.c 查看文件

@@ -97,7 +97,8 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
97 97
   double          cmpWndMaxMs  = 1000.0;
98 98
   double          cmpWndMs     = 200.0;
99 99
 
100
-
100
+  double          recdPlayInitAllocSecs    = 10.0;
101
+  double          recdPlayFadeRateDbPerSec = 4.0;
101 102
 
102 103
   memset(&r,0,sizeof(r));
103 104
   cmErrSetup(&err,&cmCtx->rpt,"Kr Timeline");
@@ -122,6 +123,7 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
122 123
   cmDspInst_t* mop  = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, r.midiDevice,r.midiOutPort);
123 124
   cmDspInst_t* sfp  = cmDspSysAllocInst(h,"ScFol",       NULL,  1, r.scFn );
124 125
   cmDspInst_t* amp  = cmDspSysAllocInst(h,"ActiveMeas",  NULL,  1, 100 );
126
+  cmDspInst_t* rpp  = cmDspSysAllocInst(h,"RecdPlay",    NULL,  4, 2, r.scFn, recdPlayInitAllocSecs, recdPlayFadeRateDbPerSec );
125 127
   cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod",       NULL,  2, r.modFn, "m1" );
126 128
   cmDspInst_t* asp  = cmDspSysAllocInst(h,"AmSync",      NULL,  0 );
127 129
 
@@ -173,14 +175,14 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
173 175
   cmDspInst_t* kr00 = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
174 176
   cmDspInst_t* kr01 = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
175 177
   cmDspInst_t* fad0 = cmDspSysAllocInst(h, "Xfader",     NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
176
-  cmDspInst_t* mix0 = cmDspSysAllocInst(h, "AMix",       NULL,   3, xfadeChCnt, mixGain, mixGain );
178
+  cmDspInst_t* mix0 = cmDspSysAllocInst(h, "AMix",       NULL,   4, xfadeChCnt+1, mixGain, mixGain, mixGain );
177 179
   cmDspInst_t* cmp0 =  cmDspSysAllocInst(h,"Compressor", NULL,   8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs ); 
178 180
   cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 0 );
179 181
   
180 182
   cmDspInst_t* kr10 = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
181 183
   cmDspInst_t* kr11 = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
182 184
   cmDspInst_t* fad1 = cmDspSysAllocInst(h, "Xfader",     NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
183
-  cmDspInst_t* mix1 = cmDspSysAllocInst(h, "AMix",       NULL,   3, xfadeChCnt, mixGain, mixGain );
185
+  cmDspInst_t* mix1 = cmDspSysAllocInst(h, "AMix",       NULL,   4, xfadeChCnt+1, mixGain, mixGain, mixGain );
184 186
   cmDspInst_t* cmp1 =  cmDspSysAllocInst(h,"Compressor", NULL,   8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs ); 
185 187
   cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 1 );
186 188
 
@@ -377,12 +379,14 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
377 379
   cmDspSysConnectAudio(h, wtp,  "out",   au0Sw, "a-in-0" ); // wt  -> sw
378 380
   cmDspSysConnectAudio(h, ai0p, "out",   au0Sw, "a-in-1" ); // ain -> sw
379 381
   cmDspSysConnectAudio(h, ai0p, "out",   mi0p,  "in" );
382
+  cmDspSysConnectAudio(h, au0Sw,"a-out", rpp,   "in-0");    // sw  -> rcdply
380 383
   cmDspSysConnectAudio(h, au0Sw,"a-out", kr00, "in"  );     // sw  -> kr
381 384
   cmDspSysConnectAudio(h, kr00, "out",   fad0, "in-0");     // kr  -> fad
382 385
   cmDspSysConnectAudio(h, fad0, "out-0", mix0, "in-0");     // fad -> mix
383 386
   cmDspSysConnectAudio(h, au0Sw,"a-out", kr01, "in"  );     // sw  -> kr
384 387
   cmDspSysConnectAudio(h, kr01, "out",   fad0, "in-1");     // kr  -> fad
385 388
   cmDspSysConnectAudio(h, fad0, "out-1", mix0, "in-1");     // fad -> mix
389
+  cmDspSysConnectAudio(h, rpp,  "out-0", mix0, "in-2");
386 390
   cmDspSysConnectAudio(h, mix0, "out",   cmp0, "in");       // mix -> cmp
387 391
   cmDspSysConnectAudio(h, cmp0, "out",   ao0p, "in" );      // cmp -> aout
388 392
 
@@ -390,12 +394,14 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
390 394
   cmDspSysConnectAudio(h, wtp,  "out",   au1Sw, "a-in-0" );  // wt -> kr
391 395
   cmDspSysConnectAudio(h, ai1p, "out",   au1Sw, "a-in-1" );
392 396
   cmDspSysConnectAudio(h, ai1p, "out",   mi1p,  "in" );
397
+  cmDspSysConnectAudio(h, au1Sw,"a-out", rpp,   "in-1");    // sw  -> rcdply
393 398
   cmDspSysConnectAudio(h, au1Sw,"a-out", kr10, "in"  );  
394 399
   cmDspSysConnectAudio(h, kr10, "out",   fad1, "in-0");
395 400
   cmDspSysConnectAudio(h, fad1, "out-0", mix1, "in-0");
396 401
   cmDspSysConnectAudio(h, au1Sw,"a-out", kr11, "in"  );  // wt -> kr
397 402
   cmDspSysConnectAudio(h, kr11, "out",   fad1, "in-1");  
398 403
   cmDspSysConnectAudio(h, fad1, "out-1", mix1, "in-1");
404
+  cmDspSysConnectAudio(h, rpp,  "out-0", mix1, "in-2");
399 405
   cmDspSysConnectAudio(h, mix1, "out",   cmp1, "in");
400 406
   cmDspSysConnectAudio(h, cmp1, "out",   ao1p, "in" );   // comp -> aout
401 407
 
@@ -435,6 +441,7 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
435 441
   cmDspSysInstallCb(h, pts, "on",      wtRt,  "s-in",  NULL );
436 442
   cmDspSysInstallCb(h, wtRt,"s-out-0", wtp,   "cmd",   NULL );
437 443
   cmDspSysInstallCb(h, pts, "on",      modp,  "cmd",   NULL );
444
+  cmDspSysInstallCb(h, pts, "on",      rpp,   "cmd",   NULL );
438 445
   cmDspSysInstallCb(h, onb, "sym",     amCmd, "rewind",NULL );
439 446
   cmDspSysInstallCb(h, onb, "out",     achan0,"reset",  NULL );
440 447
   cmDspSysInstallCb(h, onb, "out",     achan1,"reset",  NULL );
@@ -491,7 +498,8 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
491 498
   cmDspSysInstallCb(h, mip, "d0",     sfp, "d0",     NULL );
492 499
   cmDspSysInstallCb(h, mip, "status", sfp, "status", NULL );
493 500
 
494
-  // score follower to modulator and printers
501
+  // score follower to recd_play,modulator and printers
502
+  cmDspSysInstallCb(h, sfp, "out",     rpp,     "index", NULL );
495 503
   cmDspSysInstallCb(h, sfp, "out",     modp,    "index", NULL );
496 504
   cmDspSysInstallCb(h, sfp, "recent",  prp,     "in",  NULL );  // report 'recent' but only act on 'max' loc index
497 505
 

Loading…
取消
儲存