Kaynağa Gözat

cmDspPgmKr.c : Added 'fragFl' to toggle fragment processing chains.

Added connection from 'Dump' button to score to print score location report.
master
kevin 11 yıl önce
ebeveyn
işleme
4b2f2e0398
1 değiştirilmiş dosya ile 69 ekleme ve 23 silme
  1. 69
    23
      dsp/cmDspPgmKr.c

+ 69
- 23
dsp/cmDspPgmKr.c Dosyayı Görüntüle

@@ -363,6 +363,7 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
363 363
   cmCtx_t*        cmCtx      = cmDspSysPgmCtx(h);
364 364
   cmErr_t         err;
365 365
   krRsrc_t        r;
366
+  bool            fragFl     = false;
366 367
   unsigned        wtLoopCnt  = 1;                            // 1=play once (-1=loop forever)
367 368
   unsigned        wtInitMode = 0;                            // initial wt mode is 'silence'
368 369
   unsigned        wtSmpCnt   = floor(cmDspSysSampleRate(h)); // wt length == srate
@@ -412,14 +413,21 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
412 413
   cmDspSysNewPage(h,"Controls-1");
413 414
   _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, modp, 1, 1 );
414 415
 
415
-  cmDspSysNewPage(h,"Ctl-R/P-0");
416
-  _cmDspSys_TlXformChain(h, &c2, preGrpSymId, cmpPreGrpSymId, modr, 2, 0 );
416
+  cmDspInst_t* mix0 = NULL;
417
+  cmDspInst_t* mix1 = NULL;
417 418
 
418
-  cmDspSysNewPage(h,"Ctl-R/P-1");
419
-  _cmDspSys_TlXformChain(h, &c3, preGrpSymId, cmpPreGrpSymId, modr, 3, 1 );
419
+  if( fragFl )
420
+  {
421
+    cmDspSysNewPage(h,"Ctl-R/P-0");
422
+    _cmDspSys_TlXformChain(h, &c2, preGrpSymId, cmpPreGrpSymId, modr, 2, 0 );
423
+
424
+    cmDspSysNewPage(h,"Ctl-R/P-1");
425
+    _cmDspSys_TlXformChain(h, &c3, preGrpSymId, cmpPreGrpSymId, modr, 3, 1 );
426
+
427
+    mix0 = cmDspSysAllocInst(h,"AMix",        NULL,   3, 2, 1.0, 1.0 );
428
+    mix1 = cmDspSysAllocInst(h,"AMix",        NULL,   3, 2, 1.0, 1.0 );
429
+  }
420 430
 
421
-  cmDspInst_t* mix0 = cmDspSysAllocInst(h,"AMix",        NULL,   3, 2, 1.0, 1.0 );
422
-  cmDspInst_t* mix1 = cmDspSysAllocInst(h,"AMix",        NULL,   3, 2, 1.0, 1.0 );
423 431
 
424 432
   cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 0 );
425 433
   cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 1 );
@@ -492,29 +500,60 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
492 500
 
493 501
   cmDspSysConnectAudio(h, wtp,    "out",   au0Sw, "a-in-0" ); // wt  -> sw
494 502
 
503
+  /*
495 504
   cmDspSysConnectAudio(h, ai0p,   "out",   au0Sw, "a-in-1" ); // ain -> sw
496 505
   cmDspSysConnectAudio(h, ai0p,   "out",   mi0p,  "in" );     
497 506
   cmDspSysConnectAudio(h, au0Sw,  "a-out", rpp,   "in-0");    // sw  -> rcdply
498 507
   cmDspSysConnectAudio(h, au0Sw,  "a-out", c0.kr0,"in"  );    // sw  -> kr
499 508
   cmDspSysConnectAudio(h, au0Sw,  "a-out", c0.kr1,"in"  );    // sw  -> kr
500
-  cmDspSysConnectAudio(h, c0.cmp, "out",   mix0,  "in-0" );   // cmp -> mix 0
501
-  cmDspSysConnectAudio(h, rpp,    "out-0", c2.kr0,"in" );
502
-  cmDspSysConnectAudio(h, rpp,    "out-0", c2.kr1,"in" );
503
-  cmDspSysConnectAudio(h, c2.cmp, "out",   mix0,  "in-1");    // rpp -> mix 1
504
-  cmDspSysConnectAudio(h, mix0,   "out",   ao0p,  "in" );     // mix -> aout
509
+  */
510
+
511
+
512
+  cmDspSysConnectAudio(h, ai0p,  "out", rpp,   "in-0");    // sw  -> rcdply
513
+  cmDspSysConnectAudio(h, ai0p,   "out",   c0.kr0, "in" ); // ain -> sw
514
+  cmDspSysConnectAudio(h, ai0p,   "out",   c0.kr1, "in" ); // ain -> sw
515
+  cmDspSysConnectAudio(h, ai0p,   "out",   mi0p,  "in" );     
516
+
517
+  if( fragFl )
518
+  {
519
+    cmDspSysConnectAudio(h, c0.cmp, "out",   mix0,  "in-0" );   // cmp -> mix 0
520
+    cmDspSysConnectAudio(h, rpp,    "out-0", c2.kr0,"in" );
521
+    cmDspSysConnectAudio(h, rpp,    "out-0", c2.kr1,"in" );
522
+    cmDspSysConnectAudio(h, c2.cmp, "out",   mix0,  "in-1");    // rpp -> mix 1
523
+    cmDspSysConnectAudio(h, mix0,   "out",   ao0p,  "in" );     // mix -> aout
524
+  }
525
+  else
526
+  {
527
+    cmDspSysConnectAudio(h, c0.cmp, "out", ao0p, "in" );
528
+  }
505 529
 
506 530
 
507 531
   cmDspSysConnectAudio(h, wtp,    "out",   au1Sw, "a-in-0" ); // wt  -> sw
532
+  /*
508 533
   cmDspSysConnectAudio(h, ai1p,   "out",   au1Sw, "a-in-1" ); // ain -> sw
509 534
   cmDspSysConnectAudio(h, ai1p,   "out",   mi1p,  "in" );
510 535
   cmDspSysConnectAudio(h, au1Sw,  "a-out", rpp,   "in-1");    // sw  -> rcdply
511 536
   cmDspSysConnectAudio(h, au1Sw,  "a-out", c1.kr0,"in"  );    // sw  -> kr
512 537
   cmDspSysConnectAudio(h, au1Sw,  "a-out", c1.kr1,"in"  );    // sw  -> kr
513
-  cmDspSysConnectAudio(h, c1.cmp, "out",   mix1,  "in-0" );   // cmp -> mix 0
514
-  cmDspSysConnectAudio(h, rpp,    "out-1", c3.kr0, "in" );
515
-  cmDspSysConnectAudio(h, rpp,    "out-1", c3.kr1, "in" );
516
-  cmDspSysConnectAudio(h, c3.cmp, "out",   mix1,   "in-1");    // rpp -> mix 1
517
-  cmDspSysConnectAudio(h, mix1,   "out",   ao1p,   "in" );     // mix -> aout
538
+  */
539
+
540
+  cmDspSysConnectAudio(h, ai1p,  "out", rpp,   "in-1");    // sw  -> rcdply
541
+  cmDspSysConnectAudio(h, ai1p,   "out",   c1.kr0, "in" ); // ain -> sw
542
+  cmDspSysConnectAudio(h, ai1p,   "out",   c1.kr1, "in" ); // ain -> sw
543
+  cmDspSysConnectAudio(h, ai1p,   "out",   mi1p,  "in" );
544
+
545
+  if( fragFl )
546
+  {
547
+    cmDspSysConnectAudio(h, c1.cmp, "out",   mix1,  "in-0" );   // cmp -> mix 0
548
+    cmDspSysConnectAudio(h, rpp,    "out-1", c3.kr0, "in" );
549
+    cmDspSysConnectAudio(h, rpp,    "out-1", c3.kr1, "in" );
550
+    cmDspSysConnectAudio(h, c3.cmp, "out",   mix1,   "in-1");    // rpp -> mix 1
551
+    cmDspSysConnectAudio(h, mix1,   "out",   ao1p,   "in" );     // mix -> aout
552
+  }
553
+  else
554
+  {
555
+    cmDspSysConnectAudio(h, c1.cmp, "out",   ao1p,  "in" );   // cmp -> mix 0
556
+  }
518 557
 
519 558
   cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" );    // comp -> audio_file_out
520 559
   cmDspSysConnectAudio(h, c1.cmp, "out", afop, "in1" );
@@ -548,6 +587,7 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
548 587
 
549 588
   cmDspSysInstallCb( h, clrBtn, "sym",    amp, "cmd",   NULL ); // clear active meas.
550 589
   cmDspSysInstallCb( h, prtBtn, "sym",    amp, "cmd",   NULL ); // print active meas
590
+  cmDspSysInstallCb( h, prtBtn, "sym",    scp, "cmd",   NULL ); 
551 591
   cmDspSysInstallCb( h, amCmd, "add",     amp, "cmd",   NULL ); // add active meas
552 592
   cmDspSysInstallCb( h, amCmd, "rewind",  amp, "cmd",   NULL ); // rewind active meas
553 593
   cmDspSysInstallCb( h, mlst,   "loc",    amp, "loc",   NULL ); // recorded meas's list to active meas unit
@@ -571,8 +611,12 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
571 611
   // active measure loc to xfad channel trigger
572 612
   cmDspSysInstallCb( h, amp,    "scloc",  c0.achan,   "trig", NULL );  // See Also: modp.sw ->achan.trig
573 613
   cmDspSysInstallCb( h, amp,    "scloc",  c1.achan,   "trig", NULL );
574
-  cmDspSysInstallCb( h, amp,    "scloc",  c2.achan,   "trig", NULL ); 
575
-  cmDspSysInstallCb( h, amp,    "scloc",  c3.achan,   "trig", NULL );
614
+
615
+  if( fragFl )
616
+  {
617
+    cmDspSysInstallCb( h, amp,    "scloc",  c2.achan,   "trig", NULL ); 
618
+    cmDspSysInstallCb( h, amp,    "scloc",  c3.achan,   "trig", NULL );
619
+  }
576 620
 
577 621
   cmDspSysInstallCb( h, amp,    "even",   pre,        "in",   NULL );  // active meas output to printers
578 622
   cmDspSysInstallCb( h, amp,    "dyn",    prd,        "in",   NULL );
@@ -691,11 +735,13 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
691 735
   cmDspSysInstallCb(h, igain0, "val", ai0p, "gain", NULL );   // input gain control
692 736
   cmDspSysInstallCb(h, igain1, "val", ai1p, "gain", NULL );
693 737
 
694
-  cmDspSysInstallCb(h, mutm,   "out", mix0, "gain-0", NULL );
695
-  cmDspSysInstallCb(h, mutm,   "out", mix1, "gain-0", NULL );
696
-  cmDspSysInstallCb(h, mutr,   "out", mix0, "gain-1", NULL );
697
-  cmDspSysInstallCb(h, mutr,   "out", mix1, "gain-1", NULL );
698
-  
738
+  if( fragFl )
739
+  {
740
+    cmDspSysInstallCb(h, mutm,   "out", mix0, "gain-0", NULL );
741
+    cmDspSysInstallCb(h, mutm,   "out", mix1, "gain-0", NULL );
742
+    cmDspSysInstallCb(h, mutr,   "out", mix0, "gain-1", NULL );
743
+    cmDspSysInstallCb(h, mutr,   "out", mix1, "gain-1", NULL );
744
+  }
699 745
 
700 746
   cmDspSysInstallCb(h, ogain0, "val", ao0p, "gain", NULL );   // output gain control
701 747
   cmDspSysInstallCb(h, ogain1, "val", ao1p, "gain", NULL );

Loading…
İptal
Kaydet