Quellcode durchsuchen

cmDspPgmKr.c:Many changes to _cmDspSysPgm_TimeLine() to support

crossfading transforms.
master
kpl vor 11 Jahren
Ursprung
Commit
0dd72e910c
1 geänderte Dateien mit 757 neuen und 111 gelöschten Zeilen
  1. 757
    111
      dsp/cmDspPgmKr.c

+ 757
- 111
dsp/cmDspPgmKr.c Datei anzeigen

@@ -36,7 +36,7 @@
36 36
 typedef struct
37 37
 {
38 38
   const cmChar_t* tlFn;
39
-  const cmChar_t* audPath;
39
+  const cmChar_t* tlPrefixPath;
40 40
   const cmChar_t* scFn;
41 41
   const cmChar_t* modFn;
42 42
   const cmChar_t* measFn;
@@ -48,8 +48,8 @@ cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
48 48
   if((rc = cmDspSysLastRC(h)) != kOkDspRC )
49 49
     return rc;
50 50
 
51
-  cmDspRsrcString(h,&r->tlFn,   "timeLineFn",      NULL);
52
-  cmDspRsrcString(h,&r->audPath,"tlAudioFilePath", NULL);
51
+  cmDspRsrcString(h,&r->tlFn,   "timeLineFn",   NULL);
52
+  cmDspRsrcString(h,&r->tlPrefixPath,"tlPrefixPath",    NULL);
53 53
   cmDspRsrcString(h,&r->scFn,   "scoreFn",         NULL);
54 54
   cmDspRsrcString(h,&r->modFn,  "modFn",           NULL);
55 55
   cmDspRsrcString(h,&r->measFn, "measFn",          NULL);
@@ -60,6 +60,7 @@ cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
60 60
   return rc;
61 61
 }
62 62
 
63
+/*
63 64
 cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
64 65
 {
65 66
   cmDspRC_t       rc         = kOkDspRC;
@@ -95,10 +96,10 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
95 96
   if( krLoadRsrc(h,&err,&r) != kOkDspRC )
96 97
     return rc;
97 98
 
98
-  unsigned   preGrpSymId     = cmDspSysPresetRegisterGroup(h,"TimeLine");
99
-  unsigned   compPreGrpSymId = cmDspSysPresetRegisterGroup(h,"Compressor"); 
99
+  unsigned   preGrpSymId     = cmDspSysPresetRegisterGroup(h,"tl");
100
+  unsigned   compPreGrpSymId = cmDspSysPresetRegisterGroup(h,"tl_cmp"); 
100 101
 
101
-  cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.audPath );
102
+  cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.tlPrefixPath );
102 103
   cmDspInst_t* scp  = cmDspSysAllocInst(h,"Score",       "sc",  1, r.scFn );
103 104
   cmDspInst_t* php  = cmDspSysAllocInst(h,"Phasor",      NULL,  1, cmDspSysSampleRate(h) );
104 105
   cmDspInst_t* wtp  = cmDspSysAllocInst(h,"WaveTable",   NULL,  4, wtSmpCnt, wtInitMode, NULL, wtLoopCnt );
@@ -171,7 +172,7 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
171 172
   cmDspSysInstallCb(   h, storeBtn,  "sym", preset, "cmd", NULL );
172 173
   cmDspSysInstallCb(   h, recallBtn, "sym", preset, "cmd", NULL );
173 174
 
174
-  cmDspInst_t* adir    = cmDspSysAllocInst(   h, "Fname",  "audDir",   3, true,NULL,r.audPath);
175
+  cmDspInst_t* prePath    = cmDspSysAllocInst(   h, "Fname",  "prePath",   3, true,NULL,r.tlPrefixPath);
175 176
   
176 177
 
177 178
   //--------------- Recorded evaluation and Active Measurement related controls
@@ -319,16 +320,16 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
319 320
   // wave-table to time-line cursor
320 321
   cmDspSysInstallCb(   h, wtp, "fidx",tlp,  "curs", NULL); 
321 322
 
322
-  cmDspSysInstallCb(h, adir, "out", tlp, "path", NULL );
323
+  cmDspSysInstallCb(h, prePath, "out", tlp, "path", NULL );
323 324
 
324 325
   // start connections
325 326
   cmDspSysInstallCb(h, onb, "sym", tlp, "reset", NULL );
326 327
   cmDspSysInstallCb(h, onb, "sym", scp, "send",  NULL );
327 328
   cmDspSysInstallCb(h, onb, "sym", mfp, "sel",   NULL );
328 329
   cmDspSysInstallCb(h, onb, "sym", pts, "on",    NULL );
329
-  cmDspSysInstallCb(h, onb, "sym", amCmd, "rewind", NULL );
330 330
   cmDspSysInstallCb(h, pts, "on",  wtp, "cmd",   NULL );
331 331
   cmDspSysInstallCb(h, pts, "on",  modp,"cmd",   NULL );
332
+  cmDspSysInstallCb(h, onb, "sym", amCmd, "rewind", NULL );
332 333
 
333 334
   // stop connections
334 335
   cmDspSysInstallCb(h, wtp,  "done",offb,"in",  NULL ); // 'done' from WT simulates pressing Stop btn.
@@ -411,17 +412,16 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
411 412
   cmDspSysInstallCb(h, tlp, "mfn",  prp, "in",  NULL );
412 413
   cmDspSysInstallCb(h, tlp, "sel",  prp, "in",  NULL );
413 414
 
414
-  /*
415
-  cmDspSysInstallCb(h, modp, "mod0", md0p, "val", NULL );
416
-  cmDspSysInstallCb(h, modp, "win0", kr0p, "wndn",NULL );
417
-  cmDspSysInstallCb(h, modp, "thr0", th0p, "val", NULL );
418
-  cmDspSysInstallCb(h, modp, "upr0", us0p, "val", NULL );
419
-  cmDspSysInstallCb(h, modp, "lwr0", ls0p, "val", NULL );
420
-  cmDspSysInstallCb(h, modp, "off0", of0p, "val", NULL );
421
-  cmDspSysInstallCb(h, modp, "inv0", iv0p, "val", NULL );
422
-  cmDspSysInstallCb(h, modp, "wet0", wet0, "val", NULL );
423
-  cmDspSysInstallCb(h, modp, "xf0",  xfad, "gate-0", NULL );
424
-  */
415
+  //cmDspSysInstallCb(h, modp, "mod0", md0p, "val", NULL );
416
+  //cmDspSysInstallCb(h, modp, "win0", kr0p, "wndn",NULL );
417
+  //cmDspSysInstallCb(h, modp, "thr0", th0p, "val", NULL );
418
+  //cmDspSysInstallCb(h, modp, "upr0", us0p, "val", NULL );
419
+  //cmDspSysInstallCb(h, modp, "lwr0", ls0p, "val", NULL );
420
+  //cmDspSysInstallCb(h, modp, "off0", of0p, "val", NULL );
421
+  //cmDspSysInstallCb(h, modp, "inv0", iv0p, "val", NULL );
422
+  //cmDspSysInstallCb(h, modp, "wet0", wet0, "val", NULL );
423
+  //cmDspSysInstallCb(h, modp, "xf0",  xfad, "gate-0", NULL );
424
+
425 425
   cmDspSysInstallCb(h, modp, "thr0", th0p, "val", NULL );
426 426
   cmDspSysInstallCb(h, modp, "mint0", min_thrh_0, "val", NULL );
427 427
   cmDspSysInstallCb(h, modp, "maxt0", max_thrh_0, "val", NULL );
@@ -431,16 +431,16 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
431 431
   cmDspSysInstallCb(h, modp, "maxl0", max_lwr_0, "val", NULL );
432 432
 
433 433
 
434
-  /*
435
-  cmDspSysInstallCb(h, modp, "mod1", md1p, "val", NULL );
436
-  cmDspSysInstallCb(h, modp, "win1", kr1p, "wndn",NULL );
437
-  cmDspSysInstallCb(h, modp, "upr1", us1p, "val", NULL );
438
-  cmDspSysInstallCb(h, modp, "lwr1", ls1p, "val", NULL );
439
-  cmDspSysInstallCb(h, modp, "off1", of1p, "val", NULL );
440
-  cmDspSysInstallCb(h, modp, "inv1", iv1p, "val", NULL );
441
-  cmDspSysInstallCb(h, modp, "wet1", wet1, "val", NULL );
442
-  cmDspSysInstallCb(h, modp, "xf1",  xfad, "gate-1", NULL );
443
-  */
434
+ 
435
+  //cmDspSysInstallCb(h, modp, "mod1", md1p, "val", NULL );
436
+  //cmDspSysInstallCb(h, modp, "win1", kr1p, "wndn",NULL );
437
+  //cmDspSysInstallCb(h, modp, "upr1", us1p, "val", NULL );
438
+  //cmDspSysInstallCb(h, modp, "lwr1", ls1p, "val", NULL );
439
+  //cmDspSysInstallCb(h, modp, "off1", of1p, "val", NULL );
440
+  //cmDspSysInstallCb(h, modp, "inv1", iv1p, "val", NULL );
441
+  //cmDspSysInstallCb(h, modp, "wet1", wet1, "val", NULL );
442
+  //cmDspSysInstallCb(h, modp, "xf1",  xfad, "gate-1", NULL );
443
+  
444 444
   cmDspSysInstallCb(h, modp, "thr1", th1p, "val", NULL );
445 445
   cmDspSysInstallCb(h, modp, "mint1", min_thrh_1, "val", NULL );
446 446
   cmDspSysInstallCb(h, modp, "maxt1", max_thrh_1, "val", NULL );
@@ -584,10 +584,6 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
584 584
 
585 585
 
586 586
 
587
-
588
-
589
-
590
-
591 587
   cmDspSysNewPage(h,"Compressor");
592 588
 
593 589
   cmDspInst_t* cmp0_byp   = cmDspSysAllocCheckP(  h,  compPreGrpSymId, NULL, "Bypass0", 1.0 );
@@ -647,91 +643,741 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
647 643
 
648 644
   return rc;
649 645
 }
646
+*/
650 647
 
651 648
 
652
-cmDspRC_t _cmDspSysPgm_Switcher( cmDspSysH_t h, void** userPtrPtr )
649
+cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
653 650
 {
654
-  bool            useBuiltInFl = true;
655
-  const char*     fn0          = "media/audio/20110723-Kriesberg/Audio Files/Piano 3_01.wav";
656
-  const cmChar_t* fn           = cmFsMakeFn(cmFsUserDir(),fn0,NULL,NULL );
657
-
658
-  bool   dsBypassFl   = false;
659
-  double dsInGain     = 1.0;
660
-  double dsSrate      = 96000.0;
661
-  double dsBits       = 24.0;
662
-  bool   dsRectifyFl  = false;
663
-  bool   dsFullRectFl = false;
664
-  double dsClipDb     = -10.0;
665
-
666
-  double cfMinHz      = 20.0;
667
-  double cfHz         = 1000.0;
668
-  double cfAlpha      = 0.9;
669
-  bool   cfFbFl       = true;
670
-  bool   cfBypassFl   = false;
671
-
672
-  unsigned xfChCnt = 2;
673
-  double   xfMs    = 250;
674
-
675
-  cmDspInst_t* ofp =  cmDspSysAllocInst(h,"Scalar", "Offset",  5, kNumberDuiId, 0.0,  cmDspSysSampleRate(h)*600.0, 1.0,  0.0);
676
-  cmDspInst_t* fnp =  cmDspSysAllocInst(h,"Fname",    NULL,  3, false,"Audio Files (*.wav,*.aiff,*.aif)\tAudio Files (*.{wav,aiff,aif})",fn);
677
-  cmDspInst_t* php =  cmDspSysAllocInst(h,"Phasor",   NULL,  0 );
678
-  cmDspInst_t* wtp =  cmDspSysAllocInst(h,"WaveTable",NULL,  2, ((int)cmDspSysSampleRate(h)), 1 );
651
+  cmDspRC_t       rc         = kOkDspRC;
652
+  cmCtx_t*        cmCtx      = cmDspSysPgmCtx(h);
653
+  cmErr_t         err;
654
+  krRsrc_t        r;
655
+  unsigned        wtLoopCnt  = 1;                            // 1=play once (-1=loop forever)
656
+  unsigned        wtInitMode = 0;                            // initial wt mode is 'silence'
657
+  unsigned        wtSmpCnt   = floor(cmDspSysSampleRate(h)); // wt length == srate
658
+  int             krWndSmpCnt = 2048;
659
+  int             krHopFact   = 4;
660
+
661
+  unsigned        xfadeChCnt  = 2;
662
+  double          xfadeMs     = 50;
663
+  bool            xfadeInitFl = true;
664
+  double          mixGain     = 1.0;
665
+
666
+  unsigned        measRtChCnt = 4; // note: router channel 4 is not connected
667
+
668
+  bool            cmpBypassFl  = false;
669
+  double          cmpInGain    = 3.0;
670
+  double          cmpThreshDb  = -40.0;
671
+  double          cmpRatio_num = 5.0;
672
+  double          cmpAtkMs     = 20.0;
673
+  double          cmpRlsMs     = 100.0;
674
+  double          cmpMakeup    = 1.0;
675
+  double          cmpWndMaxMs  = 1000.0;
676
+  double          cmpWndMs     = 200.0;
677
+
678
+
679
+
680
+  memset(&r,0,sizeof(r));
681
+  cmErrSetup(&err,&cmCtx->rpt,"Kr Timeline");
682
+
683
+  if( krLoadRsrc(h,&err,&r) != kOkDspRC )
684
+    return rc;
685
+
686
+  unsigned   preGrpSymId     = cmDspSysPresetRegisterGroup(h,"tl");
687
+  unsigned   compPreGrpSymId = cmDspSysPresetRegisterGroup(h,"tl_cmp"); 
688
+
689
+  cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.tlPrefixPath );
690
+  cmDspInst_t* scp  = cmDspSysAllocInst(h,"Score",       "sc",  1, r.scFn );
691
+  cmDspInst_t* php  = cmDspSysAllocInst(h,"Phasor",      NULL,  1, cmDspSysSampleRate(h) );
692
+  cmDspInst_t* wtp  = cmDspSysAllocInst(h,"WaveTable",   NULL,  4, wtSmpCnt, wtInitMode, NULL, wtLoopCnt );
693
+  cmDspInst_t* pts  = cmDspSysAllocInst(h,"PortToSym",   NULL,  2, "on", "off" );
694
+  cmDspInst_t* mfp  = cmDspSysAllocInst(h,"MidiFilePlay",NULL,  0 );
695
+  cmDspInst_t* sfp  = cmDspSysAllocInst(h,"ScFol",       NULL,  1, r.scFn );
696
+  cmDspInst_t* amp  = cmDspSysAllocInst(h,"ActiveMeas",  NULL,  1, 100 );
697
+  cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod",       NULL,  2, r.modFn, "m1" );
698
+
699
+  cmDspInst_t* achan       = cmDspSysAllocInst(h, "AvailCh",     NULL, 1, xfadeChCnt );
700
+  cmDspInst_t* xf_even_rt  = cmDspSysAllocInst(h, "Router",      NULL,  2,  2, 0 );
701
+  cmDspInst_t* xf_dyn_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  2, 0 );
702
+  cmDspInst_t* xf_tempo_rt = cmDspSysAllocInst(h, "Router",      NULL,  2,  2, 0 );
703
+  cmDspInst_t* xf_cost_rt  = cmDspSysAllocInst(h, "Router",      NULL,  2,  2, 0 );
704
+
705
+
706
+  cmDspInst_t* even_sr_00  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.8,   1.1, 0.0, 1.0 );
707
+  cmDspInst_t* even_rt_00  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
708
+  cmDspInst_t* dyn_sr_00   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,   4.0, 0.01, 1.0 );
709
+  cmDspInst_t* dyn_rt_00   = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
710
+  cmDspInst_t* tempo_sr_00 = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4, 80.0, 120.0, 0.01, 1.0 );
711
+  cmDspInst_t* tempo_rt_00 = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
712
+  cmDspInst_t* cost_sr_00  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,    1.0, 0.001, 1.0 );
713
+  cmDspInst_t* cost_rt_00  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
714
+  cmDspInst_t* thrh_sr_00  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, 0.01, 100.0 );
715
+  cmDspInst_t* upr_sr_00   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -1.0, 5.0 );
716
+  cmDspInst_t* lwr_sr_00   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -5.0, 5.0 );
717
+
718
+  cmDspInst_t* even_sr_01  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.8,   1.1, 0.0, 1.0 );
719
+  cmDspInst_t* even_rt_01  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
720
+  cmDspInst_t* dyn_sr_01   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,   4.0, 0.01, 1.0 );
721
+  cmDspInst_t* dyn_rt_01   = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
722
+  cmDspInst_t* tempo_sr_01 = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4, 80.0, 120.0, 0.01, 1.0 );
723
+  cmDspInst_t* tempo_rt_01 = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
724
+  cmDspInst_t* cost_sr_01  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,    1.0, 0.001, 1.0 );
725
+  cmDspInst_t* cost_rt_01  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
726
+  cmDspInst_t* thrh_sr_01  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, 0.01, 100.0 );
727
+  cmDspInst_t* upr_sr_01   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -1.0, 5.0 );
728
+  cmDspInst_t* lwr_sr_01   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -5.0, 5.0 );
729
+
730
+  cmDspInst_t* even_sr_10  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.8,   1.1, 0.0, 1.0 );
731
+  cmDspInst_t* even_rt_10  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
732
+  cmDspInst_t* dyn_sr_10   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,   4.0, 0.01, 1.0 );
733
+  cmDspInst_t* dyn_rt_10   = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
734
+  cmDspInst_t* tempo_sr_10 = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4, 80.0, 120.0, 0.01, 1.0 );
735
+  cmDspInst_t* tempo_rt_10 = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
736
+  cmDspInst_t* cost_sr_10  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,    1.0, 0.001, 1.0 );
737
+  cmDspInst_t* cost_rt_10  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
738
+  cmDspInst_t* thrh_sr_10  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, 0.01, 100.0 );
739
+  cmDspInst_t* upr_sr_10   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -1.0, 5.0 );
740
+  cmDspInst_t* lwr_sr_10   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -5.0, 5.0 );
741
+
742
+  cmDspInst_t* even_sr_11  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.8,   1.1, 0.0, 1.0 );
743
+  cmDspInst_t* even_rt_11  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
744
+  cmDspInst_t* dyn_sr_11   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,   4.0, 0.01, 1.0 );
745
+  cmDspInst_t* dyn_rt_11   = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
746
+  cmDspInst_t* tempo_sr_11 = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4, 80.0, 120.0, 0.01, 1.0 );
747
+  cmDspInst_t* tempo_rt_11 = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
748
+  cmDspInst_t* cost_sr_11  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,    1.0, 0.001, 1.0 );
749
+  cmDspInst_t* cost_rt_11  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtChCnt, measRtChCnt-1 );
750
+  cmDspInst_t* thrh_sr_11  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, 0.01, 100.0 );
751
+  cmDspInst_t* upr_sr_11   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -1.0, 5.0 );
752
+  cmDspInst_t* lwr_sr_11   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -5.0, 5.0 );
753
+
754
+
755
+  cmDspInst_t* kr00 = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
756
+  cmDspInst_t* kr01 = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
757
+  cmDspInst_t* fad0 = cmDspSysAllocInst(h, "Xfader",     NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
758
+  cmDspInst_t* mix0 = cmDspSysAllocInst(h, "AMix",       NULL,   3, xfadeChCnt, mixGain, mixGain );
759
+  cmDspInst_t* cmp0 =  cmDspSysAllocInst(h,"Compressor", NULL,   8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs ); 
760
+  cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 0 );
679 761
   
680
-  cmDspInst_t* ds  =  cmDspSysAllocInst(h,"DistDs",   NULL, 3, dsBypassFl, dsInGain, dsSrate, dsBits  ); 
681
-  cmDspInst_t* cf  = cmDspSysAllocInst( h,"CombFilt", NULL, 5, cfBypassFl, cfMinHz, cfFbFl, cfMinHz, cfAlpha );
762
+  cmDspInst_t* kr10 = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
763
+  cmDspInst_t* kr11 = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
764
+  cmDspInst_t* fad1 = cmDspSysAllocInst(h, "Xfader",     NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
765
+  cmDspInst_t* mix1 = cmDspSysAllocInst(h, "AMix",       NULL,   3, xfadeChCnt, mixGain, mixGain );
766
+  cmDspInst_t* cmp1 =  cmDspSysAllocInst(h,"Compressor", NULL,   8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs ); 
767
+  cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 1 );
768
+
769
+  //cmDspInst_t* af0p = cmDspSysAllocInst(h,"AudioFileOut",NULL,  2, "/home/kevin/temp/debug0.wav",1);
682 770
 
683
-  cmDspInst_t* xfad  = cmDspSysAllocInst(h,"Xfader", NULL,    2, xfChCnt, xfMs );
771
+  cmDspSysNewPage(h,"Controls");
772
+  cmDspInst_t* onb  = cmDspSysAllocInst(h,"Button", "start",  2, kButtonDuiId, 1.0 );
773
+  cmDspInst_t* offb = cmDspSysAllocInst(h,"Button", "stop",   2, kButtonDuiId, 1.0 );
774
+  cmDspInst_t* prtb = cmDspSysAllocInst(h,"Button", "print",  2, kButtonDuiId, 1.0 );
775
+  cmDspInst_t* qtb  = cmDspSysAllocInst(h,"Button", "quiet",  2, kButtonDuiId, 1.0 );
776
+  cmDspInst_t* prp  = cmDspSysAllocInst(h,"Printer", NULL,   1, ">" );
777
+  cmDspInst_t* prd  = cmDspSysAllocInst(h,"Printer", NULL,   1, "DYN:" );
778
+  cmDspInst_t* pre  = cmDspSysAllocInst(h,"Printer", NULL,   1, "EVEN:" );
779
+  cmDspInst_t* prt  = cmDspSysAllocInst(h,"Printer", NULL,   1, "TEMPO:");
780
+  cmDspInst_t* prc  = cmDspSysAllocInst(h,"Printer", NULL,   1, "COST:");
781
+  //cmDspInst_t* prv  = cmDspSysAllocInst(h,"Printer", NULL,   1, "Value:");
684 782
 
685
-  cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",NULL,   1, useBuiltInFl ? 0 : 2 );
686
-  cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",NULL,   1, useBuiltInFl ? 1 : 3 );
783
+  //--------------- Preset controls
784
+  cmDspInst_t* preset    = cmDspSysAllocInst(   h, "Preset", NULL, 1, preGrpSymId );
785
+  cmDspInst_t* presetLbl = cmDspSysAllocInst(   h, "Text",   "Preset",      1, "" );
786
+  cmDspInst_t* storeBtn  = cmDspSysAllocButton( h, "store",  0);
787
+  cmDspInst_t* recallBtn = cmDspSysAllocButton( h, "recall", 0);
788
+  cmDspSysInstallCb(   h, presetLbl, "val", preset, "label",NULL);
789
+  cmDspSysInstallCb(   h, storeBtn,  "sym", preset, "cmd", NULL );
790
+  cmDspSysInstallCb(   h, recallBtn, "sym", preset, "cmd", NULL );
687 791
 
792
+  cmDspInst_t* prePath    = cmDspSysAllocInst(   h, "Fname",  "prePath",   3, true,NULL,r.tlPrefixPath);
688 793
   
689
-  cmDspInst_t* ign   = cmDspSysAllocScalar( h, "In Gain",      0.0, 10.0, 0.01, 1.0);
690
-  cmDspInst_t* rct   = cmDspSysAllocCheck(  h, "Rectify",     dsRectifyFl);
691
-  cmDspInst_t* ful   = cmDspSysAllocCheck(  h, "Full/Half",   dsFullRectFl);
692
-  cmDspInst_t* dsr   = cmDspSysAllocScalar( h, "Srate",        0.0, 96000, 1.0, dsSrate);
693
-  cmDspInst_t* dbt   = cmDspSysAllocScalar( h, "bits",         2.0,  32.0, 1.0, dsBits);
694
-  cmDspInst_t* clip  = cmDspSysAllocScalar( h, "Clip dB",   -100.0,   0.0, 0.1, dsClipDb);
695
-  cmDspInst_t* ogn   = cmDspSysAllocScalar( h, "Out Gain",    0.0, 10.0, 0.01, 1.0);
696
-
697
-  cmDspInst_t* cfhz    = cmDspSysAllocScalar( h, "CF Hz",     25, 10000, 1, cfHz );
698
-  cmDspInst_t* cfalpha = cmDspSysAllocScalar( h, "CF Alpha",   0.0, 2.0, 0.001, cfAlpha);
699
-  cmDspInst_t* cfgain  = cmDspSysAllocScalar( h, "CF Gain",    0.0, 20.0, 0.001, 1.0);
700
-  cmDspInst_t* cffb    = cmDspSysAllocInst(   h,"Button", "CF Fb",  2, kCheckDuiId, 0.0 );
701
-
702
-  cmDspInst_t* dfdb    = cmDspSysAllocInst(   h,"Button", "Dist Fader",  2, kCheckDuiId, 0.0 );
703
-  cmDspInst_t* cfdb    = cmDspSysAllocInst(   h,"Button", "CF Fade",     2, kCheckDuiId, 0.0 );
704
-
705
-
706
-  cmDspSysConnectAudio(h, php, "out",   wtp,  "phs" );  // phasor -> wave table
707
-  cmDspSysConnectAudio(h, wtp, "out",   cf,   "in" );
708
-  cmDspSysConnectAudio(h, cf,  "out",   xfad, "in-0" ); 
709
-  cmDspSysConnectAudio(h, xfad,"out-0", ao0p, "in");
710
-  cmDspSysConnectAudio(h, wtp, "out",   ds,   "in" );
711
-  cmDspSysConnectAudio(h, ds,  "out",   xfad, "in-1" );   // 
712
-  cmDspSysConnectAudio(h, xfad,"out-1", ao1p, "in");
713
-
714
-  cmDspSysInstallCb(h, ofp, "val", wtp, "beg", NULL ); 
715
-  cmDspSysInstallCb(h, fnp, "out", wtp, "fn", NULL);    
716
-
717
-  // Distortion control connections
718
-  cmDspSysInstallCb(h, ign,  "val", ds, "igain", NULL );
719
-  cmDspSysInstallCb(h, dsr,  "val", ds, "srate", NULL );
720
-  cmDspSysInstallCb(h, dbt,  "val", ds, "bits",  NULL );
721
-  cmDspSysInstallCb(h, rct,  "out", ds, "rect",  NULL );
722
-  cmDspSysInstallCb(h, ful,  "out", ds, "full",  NULL );
723
-  cmDspSysInstallCb(h, clip, "val", ds, "clip",  NULL );
724
-  cmDspSysInstallCb(h, ogn,  "val", ds, "ogain", NULL );
725
-
726
-  cmDspSysInstallCb(h, cfhz,    "val", cf,   "hz",    NULL );  
727
-  cmDspSysInstallCb(h, cfalpha, "val", cf,   "alpha", NULL );
728
-  cmDspSysInstallCb(h, cffb,    "out", cf,   "fb",    NULL );
729
-  cmDspSysInstallCb(h, cfgain,  "val", ao1p, "gain",  NULL );
730
-
731
-  cmDspSysInstallCb(h, cfdb, "out", xfad, "gate-0", NULL);
732
-  cmDspSysInstallCb(h, dfdb, "out", xfad, "gate-1", NULL);
733
-
734
-  return kOkDspRC;
794
+
795
+  //--------------- Recorded evaluation and Active Measurement related controls
796
+  cmDspInst_t* clrBtn  = cmDspSysAllocButton( h, "clear",  0);
797
+  cmDspInst_t* prtBtn  = cmDspSysAllocButton( h, "dump",  0);
798
+  cmDspInst_t* mlst    = cmDspSysAllocInst(   h, "MsgList",   NULL, 3, "meas", r.measFn, 2);
799
+  cmDspInst_t* amCmd   = cmDspSysAllocInst(   h, "PortToSym", NULL, 2, "add", "rewind" );  
800
+
801
+  cmDspSysInstallCb( h, clrBtn, "sym",    amp, "cmd",  NULL );
802
+  cmDspSysInstallCb( h, prtBtn, "sym",    amp, "cmd",  NULL );
803
+  cmDspSysInstallCb( h, amCmd, "add",     amp, "cmd",  NULL );
804
+  cmDspSysInstallCb( h, amCmd, "rewind",  amp, "cmd",  NULL );
805
+  cmDspSysInstallCb( h, mlst,   "loc",    amp, "loc", NULL );
806
+  cmDspSysInstallCb( h, mlst,   "typeId", amp, "type",NULL );
807
+  cmDspSysInstallCb( h, mlst,   "val",    amp, "val", NULL );
808
+  cmDspSysInstallCb( h, mlst,   "cost",   amp, "cst", NULL );
809
+  cmDspSysInstallCb( h, mlst,   "typeId", amCmd, "add", NULL );
810
+  cmDspSysInstallCb( h, sfp,    "out",    amp, "sfloc", NULL );
811
+  cmDspSysInstallCb( h, amp,    "even",   pre, "in", NULL );
812
+  cmDspSysInstallCb( h, amp,    "dyn",    prd, "in", NULL );
813
+  cmDspSysInstallCb( h, amp,    "tempo",  prt, "in", NULL );
814
+  cmDspSysInstallCb( h, amp,    "cost",   prc, "in", NULL );
815
+
816
+  cmDspSysNewColumn(h,0);
817
+
818
+  double dfltOffset = 2.0; // 30.0;
819
+
820
+  // ------   Spectral distortion controls 0
821
+  cmDspInst_t* md00p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "Mode-00",      0.0, 4.0, 1.0, 1.0);
822
+  cmDspInst_t* ws00p = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, "wndSmpCnt-00", NULL, "wndSmpCnt", 2);
823
+  cmDspInst_t* hf00p = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, "hopFact-00",   NULL, "hopFact",   2);
824
+  cmDspInst_t* th00p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "threshold-00", 0.0, 100.0, 1.0,  60.0 );
825
+  cmDspInst_t* us00p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "upr slope-00", 0.0,  10.0, 0.01,  0.0 ); 
826
+  cmDspInst_t* ls00p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "lwr slope-00", 0.3,  10.0, 0.01,  2.0 );
827
+  cmDspInst_t* of00p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "offset-00",    0.0, 100.0, 0.01, dfltOffset );
828
+  cmDspInst_t* iv00p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "invert-00",    0.0,   1.0, 1.0,   0.0 );  
829
+  cmDspInst_t* wet00p  = cmDspSysAllocScalarP(h,preGrpSymId,NULL, "wet-00",       0.0,   1.0,0.001,  1.0 );  
830
+
831
+  cmDspInst_t* th01p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "threshold-01", 0.0, 100.0, 1.0,  60.0 );
832
+  cmDspInst_t* us01p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "upr slope-01", 0.0,  10.0, 0.01,  0.0 ); 
833
+  cmDspInst_t* ls01p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "lwr slope-01", 0.3,  10.0, 0.01,  2.0 );
834
+  cmDspSysNewColumn(h,0);
835
+
836
+
837
+  // ------   Spectral distortion controls 1
838
+  cmDspInst_t* md10p  = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "Mode-10",      0.0, 4.0, 1.0, 1.0);
839
+  cmDspInst_t* ws10p  = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, "wndSmpCnt-10", NULL, "wndSmpCnt", 2);
840
+  cmDspInst_t* hf10p  = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, "hopFact-10",   NULL, "hopFact",   2);
841
+  cmDspInst_t* th10p  = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "threshold-10", 0.0, 100.0, 1.0,  60.0 );
842
+  cmDspInst_t* us10p  = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "upr slope-10", 0.0,  10.0, 0.01,  0.0 ); 
843
+  cmDspInst_t* ls10p  = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "lwr slope-10", 0.3,  10.0, 0.01,  2.0 );
844
+  cmDspInst_t* of10p  = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "offset-10",    0.0, 100.0, 0.01, dfltOffset );
845
+  cmDspInst_t* iv10p  = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "invert-10",    0.0,   1.0, 1.0,   0.0 );  
846
+  cmDspInst_t* wet10p  = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "wet-10",       0.0,    1.0,0.001,  1.0 );  
847
+
848
+  cmDspInst_t* th11p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "threshold-11", 0.0, 100.0, 1.0,  60.0 );
849
+  cmDspInst_t* us11p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "upr slope-11", 0.0,  10.0, 0.01,  0.0 ); 
850
+  cmDspInst_t* ls11p = cmDspSysAllocScalarP( h,preGrpSymId,NULL, "lwr slope-11", 0.3,  10.0, 0.01,  2.0 );
851
+
852
+  cmDspSysNewColumn(h,0);
853
+  cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Out Gain-0",   5, kNumberDuiId, 0.0,   10.0,0.01,   3.0 );  
854
+  cmDspInst_t* ogain1 = cmDspSysAllocInst(h,"Scalar", "Out Gain-1",   5, kNumberDuiId, 0.0,   10.0,0.01,   3.0 );  
855
+
856
+  //cmDspInst_t* reload = cmDspSysAllocInst(h,"Button", "Reload",     2, kButtonDuiId, 0.0 );
857
+
858
+  cmDspSysNewPage(h,"Sc/Rgn");
859
+
860
+  // -------- Measurement Scale/Ranges controls 0
861
+  cmDspInst_t* min_dyn_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min In Dyn 0",      0.0, 10.0, 1.0, 0.0);
862
+  cmDspInst_t* max_dyn_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max In Dyn 0",      0.0, 10.0, 1.0, 4.0);
863
+  cmDspInst_t* menu_dyn_0  = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, "DynSel 0", NULL, "measMenu", measRtChCnt-1);
864
+
865
+  cmDspInst_t* min_even_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min In Even 0",    0.0, 1.0, 0.001, 0.75);
866
+  cmDspInst_t* max_even_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max In Even 0",    0.0, 3.0, 0.001, 1.0);
867
+  cmDspInst_t* menu_even_0  = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, "EvenSel 0", NULL, "measMenu", measRtChCnt-1);
868
+
869
+  cmDspSysNewColumn(h,0);
870
+  cmDspInst_t* min_tempo_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min In Tempo 0",   0.0, 200.0, 1.0, 80.0);
871
+  cmDspInst_t* max_tempo_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max In Tempo 0",   0.0, 200.0, 1.0, 120.0);
872
+  cmDspInst_t* menu_tempo_0  = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, "TempoSel 0", NULL, "measMenu", measRtChCnt-1);
873
+
874
+  cmDspInst_t* min_cost_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min In Cost 0",      0.0, 1.0, 0.01, 0.0);
875
+  cmDspInst_t* max_cost_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max In Cost 0",      0.0, 1.0, 0.01, 1.0);
876
+  cmDspInst_t* menu_cost_0  = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, "CostSel 0", NULL, "measMenu", measRtChCnt-1);
877
+
878
+  // -------- Parameter Scale/Ranges controls 0
879
+  cmDspSysNewColumn(h,0);
880
+  cmDspInst_t* min_thrh_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min Thresh 0",      0.0, 100.0, 1.0, 30.0);
881
+  cmDspInst_t* max_thrh_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max Thresh 0",      0.0, 100.0, 1.0, 80.0);
882
+
883
+  cmDspInst_t* min_upr_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min Upr 0",          -1.0, 1.0, 0.001, -0.5);
884
+  cmDspInst_t* max_upr_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max Upr 0",          -1.0, 1.0, 0.001, 0.5);
885
+
886
+  cmDspInst_t* min_lwr_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min Lwr 0",          0.0, -1.0, 5.0, 1.0);
887
+  cmDspInst_t* max_lwr_0   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max Lwr 0",          0.0, -1.0, 5.0, 3.0);
888
+
889
+
890
+  // -------- Measurement Scale/Ranges controls 0
891
+  cmDspSysNewColumn(h,0);
892
+  cmDspInst_t* min_dyn_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min In Dyn 1",      0.0, 10.0, 1.0, 0.0);
893
+  cmDspInst_t* max_dyn_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max In Dyn 1",      0.0, 10.0, 1.0, 4.0);
894
+  cmDspInst_t* menu_dyn_1  = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, "DynSel 1", NULL, "measMenu", measRtChCnt-1);
895
+
896
+  cmDspInst_t* min_even_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min In Even 1",    0.0, 1.0, 0.001, 0.75);
897
+  cmDspInst_t* max_even_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max In Even 1",    0.0, 3.0, 0.001, 1.0);
898
+  cmDspInst_t* menu_even_1  = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, "EvenSel 1", NULL, "measMenu", measRtChCnt-1);
899
+
900
+  cmDspSysNewColumn(h,0);
901
+  cmDspInst_t* min_tempo_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min In Tempo 1",   0.0, 200.0, 1.0, 80.0);
902
+  cmDspInst_t* max_tempo_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max In Tempo 1",   0.0, 200.0, 1.0, 120.0);
903
+  cmDspInst_t* menu_tempo_1  = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, "TempoSel 1", NULL, "measMenu", measRtChCnt-1);
904
+
905
+  cmDspInst_t* min_cost_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min In Cost 1",      0.0, 1.0, 0.01, 0.0);
906
+  cmDspInst_t* max_cost_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max In Cost 1",      0.0, 1.0, 0.01, 1.0);
907
+  cmDspInst_t* menu_cost_1  = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, "CostSel 1", NULL, "measMenu", measRtChCnt-1);
908
+
909
+  // -------- Parameter Scale/Ranges controls 0
910
+  cmDspSysNewColumn(h,0);
911
+  cmDspInst_t* min_thrh_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min Thresh 1",      0.0, 100.0, 1.0, 30.0);
912
+  cmDspInst_t* max_thrh_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max Thresh 1",      0.0, 100.0, 1.0, 80.0);
913
+
914
+  cmDspInst_t* min_upr_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min Upr 1",          -1.0, 1.0, 0.001, -0.5);
915
+  cmDspInst_t* max_upr_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max Upr 1",          -1.0, 1.0, 0.001, 0.5);
916
+
917
+  cmDspInst_t* min_lwr_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Min Lwr 1",          0.0, -1.0, 5.0, 1.0);
918
+  cmDspInst_t* max_lwr_1   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, "Max Lwr 1",          0.0, -1.0, 5.0, 3.0);
919
+
920
+
921
+  if((rc = cmDspSysLastRC(h)) != kOkDspRC )
922
+    return rc;
923
+
924
+  // phasor->wt->aout
925
+  cmDspSysConnectAudio(h, php,  "out", wtp,  "phs" );   // phs -> wt
926
+
927
+  cmDspSysConnectAudio(h, wtp,  "out",   kr00, "in"  );  // wt -> kr
928
+  cmDspSysConnectAudio(h, kr00, "out",   fad0,"in-0");  
929
+  cmDspSysConnectAudio(h, fad0,"out-0", mix0, "in-0");
930
+  cmDspSysConnectAudio(h, wtp,  "out",   kr01, "in"  );  // wt -> kr
931
+  cmDspSysConnectAudio(h, kr01, "out",   fad0,"in-1");  
932
+  cmDspSysConnectAudio(h, fad0,"out-1", mix0, "in-1");
933
+  cmDspSysConnectAudio(h, mix0, "out",   cmp0, "in");
934
+  cmDspSysConnectAudio(h, cmp0, "out",   ao0p, "in" );    // comp -> aout
935
+
936
+  cmDspSysConnectAudio(h, wtp,  "out",   kr10,  "in"  );  // wt -> kr
937
+  cmDspSysConnectAudio(h, kr10, "out",   fad1, "in-0");
938
+  cmDspSysConnectAudio(h, fad1,"out-0", mix1,  "in-0");
939
+  cmDspSysConnectAudio(h, wtp,  "out",   kr11,  "in"  );  // wt -> kr
940
+  cmDspSysConnectAudio(h, kr11, "out",   fad1, "in-1");  
941
+  cmDspSysConnectAudio(h, fad1,"out-1", mix1,  "in-1");
942
+  cmDspSysConnectAudio(h, mix1, "out",   cmp1,  "in");
943
+  cmDspSysConnectAudio(h, cmp1, "out",   ao1p,  "in" );   // comp -> aout
944
+
945
+  // wave-table to time-line cursor
946
+  cmDspSysInstallCb(   h, wtp, "fidx",tlp,  "curs", NULL); 
947
+
948
+  cmDspSysInstallCb(h, prePath, "out", tlp, "path", NULL );
949
+
950
+  // start connections
951
+  cmDspSysInstallCb(h, onb, "sym", tlp, "reset", NULL );
952
+  cmDspSysInstallCb(h, onb, "sym", scp, "send",  NULL );
953
+  cmDspSysInstallCb(h, onb, "sym", mfp, "sel",   NULL );
954
+  cmDspSysInstallCb(h, onb, "sym", pts, "on",    NULL );
955
+  cmDspSysInstallCb(h, pts, "on",  wtp, "cmd",   NULL );
956
+  cmDspSysInstallCb(h, pts, "on",  modp,"cmd",   NULL );
957
+  cmDspSysInstallCb(h, onb, "sym", amCmd, "rewind", NULL );
958
+
959
+  // stop connections
960
+  cmDspSysInstallCb(h, wtp,  "done",offb,"in",  NULL ); // 'done' from WT simulates pressing Stop btn.
961
+  cmDspSysInstallCb(h, tlp,  "mfn", pts, "off", NULL ); // Prevents WT start on new audio file from TL.
962
+  cmDspSysInstallCb(h, offb, "sym", mfp, "sel", NULL ); 
963
+  cmDspSysInstallCb(h, offb, "sym", pts, "off", NULL );
964
+  cmDspSysInstallCb(h, pts,  "off", wtp, "cmd", NULL );
965
+  cmDspSysInstallCb(h, pts,  "off", modp,"cmd", NULL );
966
+
967
+  // time-line to wave-table selection 
968
+  cmDspSysInstallCb(h, tlp, "absi", wtp, "beg", NULL );  
969
+  cmDspSysInstallCb(h, tlp, "aesi", wtp, "end", NULL );
970
+  cmDspSysInstallCb(h, tlp, "afn",  wtp, "fn",  NULL );
971
+
972
+  // time-line to MIDI file player selection
973
+  cmDspSysInstallCb(h, tlp, "mbsi", mfp, "bsi",   NULL );
974
+  cmDspSysInstallCb(h, tlp, "mesi", mfp, "esi",   NULL );
975
+  cmDspSysInstallCb(h, tlp, "mfn",  mfp, "fn",    NULL );
976
+  
977
+  cmDspSysInstallCb(h, scp, "sel",    sfp, "index",  NULL ); // score to score follower - to set initial search location
978
+  cmDspSysInstallCb(h, scp, "sel",    modp,"reset", NULL );
979
+  
980
+  //cmDspSysInstallCb(h, reload,"out",  modp, "reload", NULL );
981
+
982
+
983
+  // MIDI file player to score follower
984
+  cmDspSysInstallCb(h, mfp, "smpidx", sfp, "smpidx", NULL );
985
+  cmDspSysInstallCb(h, mfp, "d1",     sfp, "d1",     NULL );
986
+  cmDspSysInstallCb(h, mfp, "d0",     sfp, "d0",     NULL );
987
+  cmDspSysInstallCb(h, mfp, "status", sfp, "status", NULL );
988
+
989
+  // score follower to modulator and printers
990
+  cmDspSysInstallCb(h, sfp, "out",  modp,    "index", NULL );
991
+  cmDspSysInstallCb(h, sfp, "out",  prp,     "in",  NULL );
992
+
993
+  cmDspSysInstallCb(h, prtb, "sym", sfp, "cmd", NULL );
994
+  cmDspSysInstallCb(h, qtb,  "sym", sfp, "cmd", NULL );
995
+
996
+
997
+  cmDspSysInstallCb(h, ws00p, "out", kr00, "wndn", NULL );   // wndSmpCnt->kr
998
+  cmDspSysInstallCb(h, hf00p, "out", kr00, "hopf", NULL );   // hopFact->kr
999
+  cmDspSysInstallCb(h, md00p, "val", kr00, "mode", NULL );   // mode->kr
1000
+  cmDspSysInstallCb(h, th00p, "val", kr00, "thrh", NULL );   // thresh->kr
1001
+  cmDspSysInstallCb(h, ls00p, "val", kr00, "lwrs", NULL );   // lwrSlope->kr
1002
+  cmDspSysInstallCb(h, us00p, "val", kr00, "uprs", NULL );   // uprSlope->kr
1003
+  cmDspSysInstallCb(h, of00p, "val", kr00, "offs", NULL );   // offset->kr
1004
+  cmDspSysInstallCb(h, iv00p, "val", kr00, "invt", NULL );   // invert->kr
1005
+  cmDspSysInstallCb(h, wet00p, "val", kr00, "wet", NULL );    //  wet->kr
1006
+
1007
+  cmDspSysInstallCb(h, ws00p, "out", kr01, "wndn", NULL );   // wndSmpCnt->kr
1008
+  cmDspSysInstallCb(h, hf00p, "out", kr01, "hopf", NULL );   // hopFact->kr
1009
+  cmDspSysInstallCb(h, md00p, "val", kr01, "mode", NULL );   // mode->kr
1010
+  cmDspSysInstallCb(h, th01p, "val", kr01, "thrh", NULL );   // thresh->kr
1011
+  cmDspSysInstallCb(h, ls01p, "val", kr01, "lwrs", NULL );   // lwrSlope->kr
1012
+  cmDspSysInstallCb(h, us01p, "val", kr01, "uprs", NULL );   // uprSlope->kr
1013
+  cmDspSysInstallCb(h, of00p, "val", kr01, "offs", NULL );   // offset->kr
1014
+  cmDspSysInstallCb(h, iv00p, "val", kr01, "invt", NULL );   // invert->kr
1015
+  cmDspSysInstallCb(h, wet00p, "val", kr01, "wet", NULL );    //  wet->kr
1016
+
1017
+  cmDspSysInstallCb(h, ws10p, "out", kr10, "wndn", NULL );   // wndSmpCnt->kr
1018
+  cmDspSysInstallCb(h, hf10p, "out", kr10, "hopf", NULL );   // hopFact->kr
1019
+  cmDspSysInstallCb(h, md10p, "val", kr10, "mode", NULL );   // mode->kr
1020
+  cmDspSysInstallCb(h, th10p, "val", kr10, "thrh", NULL );   // thresh->kr
1021
+  cmDspSysInstallCb(h, ls10p, "val", kr10, "lwrs", NULL );   // lwrSlope->kr
1022
+  cmDspSysInstallCb(h, us10p, "val", kr10, "uprs", NULL );   // uprSlope->kr
1023
+  cmDspSysInstallCb(h, of10p, "val", kr10, "offs", NULL );   // offset->kr
1024
+  cmDspSysInstallCb(h, iv10p, "val", kr10, "invt", NULL );   // invert->kr
1025
+  cmDspSysInstallCb(h, wet10p, "val", kr10, "wet", NULL );    //  wet->kr
1026
+
1027
+  cmDspSysInstallCb(h, ws10p, "out", kr11, "wndn", NULL );   // wndSmpCnt->kr
1028
+  cmDspSysInstallCb(h, hf10p, "out", kr11, "hopf", NULL );   // hopFact->kr
1029
+  cmDspSysInstallCb(h, md10p, "val", kr11, "mode", NULL );   // mode->kr
1030
+  cmDspSysInstallCb(h, th11p, "val", kr11, "thrh", NULL );   // thresh->kr
1031
+  cmDspSysInstallCb(h, ls11p, "val", kr11, "lwrs", NULL );   // lwrSlope->kr
1032
+  cmDspSysInstallCb(h, us11p, "val", kr11, "uprs", NULL );   // uprSlope->kr
1033
+  cmDspSysInstallCb(h, of10p, "val", kr11, "offs", NULL );   // offset->kr
1034
+  cmDspSysInstallCb(h, iv10p, "val", kr11, "invt", NULL );   // invert->kr
1035
+  cmDspSysInstallCb(h, wet10p, "val", kr11, "wet", NULL );    //  wet->kr
1036
+
1037
+  cmDspSysInstallCb(h, ogain0, "val", ao0p, "gain", NULL );   // output gain control
1038
+  cmDspSysInstallCb(h, ogain1, "val", ao1p, "gain", NULL );
1039
+
1040
+  // Printer connections
1041
+  cmDspSysInstallCb(h, tlp, "afn",  prp, "in",  NULL );
1042
+  cmDspSysInstallCb(h, tlp, "mfn",  prp, "in",  NULL );
1043
+  cmDspSysInstallCb(h, tlp, "sel",  prp, "in",  NULL );
1044
+
1045
+  cmDspSysInstallCb(h, modp, "thr0", th00p, "val", NULL );
1046
+  cmDspSysInstallCb(h, modp, "mint0", min_thrh_0, "val", NULL );
1047
+  cmDspSysInstallCb(h, modp, "maxt0", max_thrh_0, "val", NULL );
1048
+  cmDspSysInstallCb(h, modp, "minu0", min_upr_0, "val", NULL );
1049
+  cmDspSysInstallCb(h, modp, "maxu0", max_upr_0, "val", NULL );
1050
+  cmDspSysInstallCb(h, modp, "minl0", min_lwr_0, "val", NULL );
1051
+  cmDspSysInstallCb(h, modp, "maxl0", max_lwr_0, "val", NULL );
1052
+
1053
+  cmDspSysInstallCb(h, modp, "thr1", th10p, "val", NULL );
1054
+  cmDspSysInstallCb(h, modp, "mint1", min_thrh_1, "val", NULL );
1055
+  cmDspSysInstallCb(h, modp, "maxt1", max_thrh_1, "val", NULL );
1056
+  cmDspSysInstallCb(h, modp, "minu1", min_upr_1, "val", NULL );
1057
+  cmDspSysInstallCb(h, modp, "maxu1", max_upr_1, "val", NULL );
1058
+  cmDspSysInstallCb(h, modp, "minl1", min_lwr_1, "val", NULL );
1059
+  cmDspSysInstallCb(h, modp, "maxl1", max_lwr_1, "val", NULL );
1060
+
1061
+  // =========================================================================
1062
+  //  Cross fade connections for measurments
1063
+  //
1064
+
1065
+  // xfade router channel selection
1066
+  cmDspSysInstallCb( h, achan, "ch",  xf_even_rt,  "sel", NULL );   
1067
+  cmDspSysInstallCb( h, achan, "ch",  xf_dyn_rt,   "sel", NULL );
1068
+  cmDspSysInstallCb( h, achan, "ch",  xf_tempo_rt, "sel", NULL );
1069
+  cmDspSysInstallCb( h, achan, "ch",  xf_cost_rt,  "sel", NULL );
1070
+   
1071
+  // cross fade router input 
1072
+  cmDspSysInstallCb( h, amp,    "scloc",  achan,   "trig", NULL );
1073
+  cmDspSysInstallCb( h, amp,    "even",   xf_even_rt, "f-in", NULL );
1074
+  cmDspSysInstallCb( h, amp,    "dyn",    xf_dyn_rt,  "f-in", NULL );
1075
+  cmDspSysInstallCb( h, amp,    "tempo",  xf_tempo_rt,"f-in", NULL );
1076
+  cmDspSysInstallCb( h, amp,    "cost",   xf_cost_rt, "f-in", NULL );
1077
+
1078
+  // cross fader router output to scale-range chains
1079
+  cmDspSysInstallCb(h, xf_even_rt,   "f-out-0",   even_sr_00, "val_in", NULL );
1080
+  cmDspSysInstallCb(h, xf_even_rt,   "f-out-1",   even_sr_01, "val_in", NULL );
1081
+  cmDspSysInstallCb(h, xf_dyn_rt,    "f-out-0",   dyn_sr_00,  "val_in", NULL );
1082
+  cmDspSysInstallCb(h, xf_dyn_rt,    "f-out-1",   dyn_sr_01,  "val_in", NULL );
1083
+  cmDspSysInstallCb(h, xf_tempo_rt,  "f-out-0",   tempo_sr_00,"val_in", NULL );
1084
+  cmDspSysInstallCb(h, xf_tempo_rt,  "f-out-1",   tempo_sr_01,"val_in", NULL );
1085
+  cmDspSysInstallCb(h, xf_cost_rt,   "f-out-0",   cost_sr_00, "val_in", NULL );
1086
+  cmDspSysInstallCb(h, xf_cost_rt,   "f-out-1",   cost_sr_01, "val_in", NULL );
1087
+
1088
+  // active-channel to cross-fade connections
1089
+  cmDspSysInstallCb(h, achan, "gate-0",  fad0, "gate-0", NULL );
1090
+  cmDspSysInstallCb(h, fad0, "state-0", achan, "dis-0",  NULL );
1091
+  cmDspSysInstallCb(h, achan, "gate-1",  fad1, "gate-1", NULL );
1092
+  cmDspSysInstallCb(h, fad1, "state-1", achan, "dis-1",  NULL );
1093
+
1094
+
1095
+  // =========================================================================
1096
+  //  Scale Range Connections 00
1097
+  //
1098
+
1099
+  // DYN -> scaleRange -> Router -> var scaleRange
1100
+  cmDspSysInstallCb(h, min_dyn_0,  "val",     dyn_sr_00,  "min_in",  NULL );
1101
+  cmDspSysInstallCb(h, max_dyn_0,  "val",     dyn_sr_00,  "max_in",  NULL );
1102
+  cmDspSysInstallCb(h, dyn_sr_00,   "val_out", dyn_rt_00,  "f-in",    NULL );
1103
+  cmDspSysInstallCb(h, menu_dyn_0, "out",     dyn_rt_00,  "sel",     NULL );
1104
+  cmDspSysInstallCb(h, dyn_rt_00,   "f-out-0", thrh_sr_00, "val_in",  NULL );
1105
+  cmDspSysInstallCb(h, dyn_rt_00,   "f-out-1", upr_sr_00,  "val_in",  NULL );
1106
+  cmDspSysInstallCb(h, dyn_rt_00,   "f-out-2", lwr_sr_00,  "val_in",  NULL );
1107
+
1108
+  // EVEN -> scaleRange -> Router  -> var scaleRange
1109
+  cmDspSysInstallCb(h, min_even_0,  "val",     even_sr_00,  "min_in",  NULL );
1110
+  cmDspSysInstallCb(h, max_even_0,  "val",     even_sr_00,  "max_in",  NULL );
1111
+  cmDspSysInstallCb(h, even_sr_00,   "val_out", even_rt_00,  "f-in",    NULL );
1112
+  cmDspSysInstallCb(h, menu_even_0, "out",     even_rt_00,  "sel",     NULL );
1113
+  cmDspSysInstallCb(h, even_rt_00,   "f-out-0", thrh_sr_00, "val_in",  NULL );
1114
+  cmDspSysInstallCb(h, even_rt_00,   "f-out-1", upr_sr_00,  "val_in",  NULL );
1115
+  cmDspSysInstallCb(h, even_rt_00,   "f-out-2", lwr_sr_00,  "val_in",  NULL );
1116
+
1117
+  // TEMPO -> scaleRange -> Router  -> var scaleRange
1118
+  cmDspSysInstallCb(h, min_tempo_0,  "val",     tempo_sr_00,  "min_in",  NULL );
1119
+  cmDspSysInstallCb(h, max_tempo_0,  "val",     tempo_sr_00,  "max_in",  NULL );
1120
+  cmDspSysInstallCb(h, tempo_sr_00,   "val_out", tempo_rt_00,  "f-in",    NULL );
1121
+  cmDspSysInstallCb(h, menu_tempo_0, "out",     tempo_rt_00,  "sel",     NULL );
1122
+  cmDspSysInstallCb(h, tempo_rt_00,   "f-out-0", thrh_sr_00, "val_in",  NULL );
1123
+  cmDspSysInstallCb(h, tempo_rt_00,   "f-out-1", upr_sr_00,  "val_in",  NULL );
1124
+  cmDspSysInstallCb(h, tempo_rt_00,   "f-out-2", lwr_sr_00,  "val_in",  NULL );
1125
+
1126
+  // COST -> scaleRange -> Router  -> var scaleRange 
1127
+  cmDspSysInstallCb(h, min_cost_0,  "val",     cost_sr_00,  "min_in",  NULL );
1128
+  cmDspSysInstallCb(h, max_cost_0,  "val",     cost_sr_00,  "max_in",  NULL );
1129
+  cmDspSysInstallCb(h, cost_sr_00,   "val_out", cost_rt_00,  "f-in",    NULL );
1130
+  cmDspSysInstallCb(h, menu_cost_0, "out",     cost_rt_00,  "sel",     NULL );
1131
+  cmDspSysInstallCb(h, cost_rt_00,   "f-out-0", thrh_sr_00, "val_in",  NULL );
1132
+  cmDspSysInstallCb(h, cost_rt_00,   "f-out-1", upr_sr_00,  "val_in",  NULL );
1133
+  cmDspSysInstallCb(h, cost_rt_00,   "f-out-2", lwr_sr_00,  "val_in",  NULL );
1134
+
1135
+
1136
+  // THRESH scaleRange -> FX
1137
+  cmDspSysInstallCb(h, min_thrh_0, "val",     thrh_sr_00, "min_out", NULL );
1138
+  cmDspSysInstallCb(h, max_thrh_0, "val",     thrh_sr_00, "max_out", NULL );
1139
+  cmDspSysInstallCb(h, thrh_sr_00,  "val_out", th00p,    "val",     NULL );
1140
+
1141
+
1142
+  // UPR scaleRange -> FX
1143
+  cmDspSysInstallCb(h, min_upr_0, "val",     upr_sr_00, "min_out", NULL );
1144
+  cmDspSysInstallCb(h, max_upr_0, "val",     upr_sr_00, "max_out", NULL );
1145
+  cmDspSysInstallCb(h, upr_sr_00,  "val_out", us00p,    "val",     NULL );
1146
+
1147
+
1148
+  // LWR scaleRange -> FX
1149
+  cmDspSysInstallCb(h, min_lwr_0, "val",     lwr_sr_00, "min_out", NULL );
1150
+  cmDspSysInstallCb(h, max_lwr_0, "val",     lwr_sr_00, "max_out", NULL );
1151
+  cmDspSysInstallCb(h, lwr_sr_00,  "val_out", ls00p,    "val",     NULL );
1152
+
1153
+  // =========================================================================
1154
+  //  Scale Range Connections 01
1155
+  //
1156
+
1157
+  // DYN -> scaleRange -> Router -> var scaleRange
1158
+  cmDspSysInstallCb(h, min_dyn_0,  "val",     dyn_sr_01,  "min_in",  NULL );
1159
+  cmDspSysInstallCb(h, max_dyn_0,  "val",     dyn_sr_01,  "max_in",  NULL );
1160
+  cmDspSysInstallCb(h, dyn_sr_01,   "val_out", dyn_rt_01,  "f-in",    NULL );
1161
+  cmDspSysInstallCb(h, menu_dyn_0, "out",     dyn_rt_01,  "sel",     NULL );
1162
+  cmDspSysInstallCb(h, dyn_rt_01,   "f-out-0", thrh_sr_01, "val_in",  NULL );
1163
+  cmDspSysInstallCb(h, dyn_rt_01,   "f-out-1", upr_sr_01,  "val_in",  NULL );
1164
+  cmDspSysInstallCb(h, dyn_rt_01,   "f-out-2", lwr_sr_01,  "val_in",  NULL );
1165
+
1166
+  // EVEN -> scaleRange -> Router  -> var scaleRange
1167
+  cmDspSysInstallCb(h, min_even_0,  "val",     even_sr_01,  "min_in",  NULL );
1168
+  cmDspSysInstallCb(h, max_even_0,  "val",     even_sr_01,  "max_in",  NULL );
1169
+  cmDspSysInstallCb(h, even_sr_01,   "val_out", even_rt_01,  "f-in",    NULL );
1170
+  cmDspSysInstallCb(h, menu_even_0, "out",     even_rt_01,  "sel",     NULL );
1171
+  cmDspSysInstallCb(h, even_rt_01,   "f-out-0", thrh_sr_01, "val_in",  NULL );
1172
+  cmDspSysInstallCb(h, even_rt_01,   "f-out-1", upr_sr_01,  "val_in",  NULL );
1173
+  cmDspSysInstallCb(h, even_rt_01,   "f-out-2", lwr_sr_01,  "val_in",  NULL );
1174
+
1175
+  // TEMPO -> scaleRange -> Router  -> var scaleRange
1176
+  cmDspSysInstallCb(h, min_tempo_0,  "val",     tempo_sr_01,  "min_in",  NULL );
1177
+  cmDspSysInstallCb(h, max_tempo_0,  "val",     tempo_sr_01,  "max_in",  NULL );
1178
+  cmDspSysInstallCb(h, tempo_sr_01,   "val_out", tempo_rt_01,  "f-in",    NULL );
1179
+  cmDspSysInstallCb(h, menu_tempo_0, "out",     tempo_rt_01,  "sel",     NULL );
1180
+  cmDspSysInstallCb(h, tempo_rt_01,   "f-out-0", thrh_sr_01, "val_in",  NULL );
1181
+  cmDspSysInstallCb(h, tempo_rt_01,   "f-out-1", upr_sr_01,  "val_in",  NULL );
1182
+  cmDspSysInstallCb(h, tempo_rt_01,   "f-out-2", lwr_sr_01,  "val_in",  NULL );
1183
+
1184
+  // COST -> scaleRange -> Router  -> var scaleRange 
1185
+  cmDspSysInstallCb(h, min_cost_0,  "val",     cost_sr_01,  "min_in",  NULL );
1186
+  cmDspSysInstallCb(h, max_cost_0,  "val",     cost_sr_01,  "max_in",  NULL );
1187
+  cmDspSysInstallCb(h, cost_sr_01,   "val_out", cost_rt_01,  "f-in",    NULL );
1188
+  cmDspSysInstallCb(h, menu_cost_0, "out",     cost_rt_01,  "sel",     NULL );
1189
+  cmDspSysInstallCb(h, cost_rt_01,   "f-out-0", thrh_sr_01, "val_in",  NULL );
1190
+  cmDspSysInstallCb(h, cost_rt_01,   "f-out-1", upr_sr_01,  "val_in",  NULL );
1191
+  cmDspSysInstallCb(h, cost_rt_01,   "f-out-2", lwr_sr_01,  "val_in",  NULL );
1192
+
1193
+  // THRESH scaleRange -> FX
1194
+  cmDspSysInstallCb(h, min_thrh_0, "val",     thrh_sr_01, "min_out", NULL );
1195
+  cmDspSysInstallCb(h, max_thrh_0, "val",     thrh_sr_01, "max_out", NULL );
1196
+  cmDspSysInstallCb(h, thrh_sr_01,  "val_out", th01p,    "val",     NULL );
1197
+
1198
+  // UPR scaleRange -> FX
1199
+  cmDspSysInstallCb(h, min_upr_0, "val",     upr_sr_01, "min_out", NULL );
1200
+  cmDspSysInstallCb(h, max_upr_0, "val",     upr_sr_01, "max_out", NULL );
1201
+  cmDspSysInstallCb(h, upr_sr_01,  "val_out", us01p,    "val",     NULL );
1202
+
1203
+  // LWR scaleRange -> FX
1204
+  cmDspSysInstallCb(h, min_lwr_0, "val",     lwr_sr_01, "min_out", NULL );
1205
+  cmDspSysInstallCb(h, max_lwr_0, "val",     lwr_sr_01, "max_out", NULL );
1206
+  cmDspSysInstallCb(h, lwr_sr_01,  "val_out", ls01p,    "val",     NULL );
1207
+
1208
+  // =========================================================================
1209
+  //  Scale Range Connections 10
1210
+  //
1211
+
1212
+  // DYN -> scaleRange -> Router -> var scaleRange
1213
+  cmDspSysInstallCb(h, min_dyn_1,  "val",     dyn_sr_10,  "min_in",  NULL );
1214
+  cmDspSysInstallCb(h, max_dyn_1,  "val",     dyn_sr_10,  "max_in",  NULL );
1215
+  cmDspSysInstallCb(h, dyn_sr_10,   "val_out", dyn_rt_10,  "f-in",    NULL );
1216
+  cmDspSysInstallCb(h, menu_dyn_1, "out",     dyn_rt_10,  "sel",     NULL );
1217
+  cmDspSysInstallCb(h, dyn_rt_10,   "f-out-0", thrh_sr_10, "val_in",  NULL );
1218
+  cmDspSysInstallCb(h, dyn_rt_10,   "f-out-1", upr_sr_10,  "val_in",  NULL );
1219
+  cmDspSysInstallCb(h, dyn_rt_10,   "f-out-2", lwr_sr_10,  "val_in",  NULL );
1220
+
1221
+  // EVEN -> scaleRange -> Router  -> var scaleRange
1222
+  cmDspSysInstallCb(h, min_even_1,  "val",     even_sr_10,  "min_in",  NULL );
1223
+  cmDspSysInstallCb(h, max_even_1,  "val",     even_sr_10,  "max_in",  NULL );
1224
+  cmDspSysInstallCb(h, even_sr_10,   "val_out", even_rt_10,  "f-in",    NULL );
1225
+  cmDspSysInstallCb(h, menu_even_1, "out",     even_rt_10,  "sel",     NULL );
1226
+  cmDspSysInstallCb(h, even_rt_10,   "f-out-0", thrh_sr_10, "val_in",  NULL );
1227
+  cmDspSysInstallCb(h, even_rt_10,   "f-out-1", upr_sr_10,  "val_in",  NULL );
1228
+  cmDspSysInstallCb(h, even_rt_10,   "f-out-2", lwr_sr_10,  "val_in",  NULL );
1229
+
1230
+  // TEMPO -> scaleRange -> Router  -> var scaleRange
1231
+  cmDspSysInstallCb(h, min_tempo_1,  "val",     tempo_sr_10,  "min_in",  NULL );
1232
+  cmDspSysInstallCb(h, max_tempo_1,  "val",     tempo_sr_10,  "max_in",  NULL );
1233
+  cmDspSysInstallCb(h, tempo_sr_10,   "val_out", tempo_rt_10,  "f-in",    NULL );
1234
+  cmDspSysInstallCb(h, menu_tempo_1, "out",     tempo_rt_10,  "sel",     NULL );
1235
+  cmDspSysInstallCb(h, tempo_rt_10,   "f-out-0", thrh_sr_10, "val_in",  NULL );
1236
+  cmDspSysInstallCb(h, tempo_rt_10,   "f-out-1", upr_sr_10,  "val_in",  NULL );
1237
+  cmDspSysInstallCb(h, tempo_rt_10,   "f-out-2", lwr_sr_10,  "val_in",  NULL );
1238
+
1239
+  // COST -> scaleRange -> Router  -> var scaleRange 
1240
+  cmDspSysInstallCb(h, min_cost_1,  "val",     cost_sr_10,  "min_in",  NULL );
1241
+  cmDspSysInstallCb(h, max_cost_1,  "val",     cost_sr_10,  "max_in",  NULL );
1242
+  cmDspSysInstallCb(h, cost_sr_10,   "val_out", cost_rt_10,  "f-in",    NULL );
1243
+  cmDspSysInstallCb(h, menu_cost_1, "out",     cost_rt_10,  "sel",     NULL );
1244
+  cmDspSysInstallCb(h, cost_rt_10,   "f-out-0", thrh_sr_10, "val_in",  NULL );
1245
+  cmDspSysInstallCb(h, cost_rt_10,   "f-out-1", upr_sr_10,  "val_in",  NULL );
1246
+  cmDspSysInstallCb(h, cost_rt_10,   "f-out-2", lwr_sr_10,  "val_in",  NULL );
1247
+
1248
+  // THRESH scaleRange -> FX
1249
+  cmDspSysInstallCb(h, min_thrh_1, "val",     thrh_sr_10, "min_out", NULL );
1250
+  cmDspSysInstallCb(h, max_thrh_1, "val",     thrh_sr_10, "max_out", NULL );
1251
+  cmDspSysInstallCb(h, thrh_sr_10,  "val_out", th10p,    "val",     NULL );
1252
+
1253
+  // UPR scaleRange -> FX
1254
+  cmDspSysInstallCb(h, min_upr_1, "val",     upr_sr_10, "min_out", NULL );
1255
+  cmDspSysInstallCb(h, max_upr_1, "val",     upr_sr_10, "max_out", NULL );
1256
+  cmDspSysInstallCb(h, upr_sr_10,  "val_out", us10p,    "val",     NULL );
1257
+
1258
+  // LWR scaleRange -> FX
1259
+  cmDspSysInstallCb(h, min_lwr_1, "val",     lwr_sr_10, "min_out", NULL );
1260
+  cmDspSysInstallCb(h, max_lwr_1, "val",     lwr_sr_10, "max_out", NULL );
1261
+  cmDspSysInstallCb(h, lwr_sr_10,  "val_out", ls10p,    "val",     NULL );
1262
+
1263
+  // =========================================================================
1264
+  //  Scale Range Connections 11
1265
+  //
1266
+
1267
+  // DYN -> scaleRange -> Router -> var scaleRange
1268
+  cmDspSysInstallCb(h, min_dyn_1,  "val",     dyn_sr_11,  "min_in",  NULL );
1269
+  cmDspSysInstallCb(h, max_dyn_1,  "val",     dyn_sr_11,  "max_in",  NULL );
1270
+  cmDspSysInstallCb(h, dyn_sr_11,   "val_out", dyn_rt_11,  "f-in",    NULL );
1271
+  cmDspSysInstallCb(h, menu_dyn_1, "out",     dyn_rt_11,  "sel",     NULL );
1272
+  cmDspSysInstallCb(h, dyn_rt_11,   "f-out-0", thrh_sr_11, "val_in",  NULL );
1273
+  cmDspSysInstallCb(h, dyn_rt_11,   "f-out-1", upr_sr_11,  "val_in",  NULL );
1274
+  cmDspSysInstallCb(h, dyn_rt_11,   "f-out-2", lwr_sr_11,  "val_in",  NULL );
1275
+
1276
+  // EVEN -> scaleRange -> Router  -> var scaleRange
1277
+  cmDspSysInstallCb(h, min_even_1,  "val",     even_sr_11,  "min_in",  NULL );
1278
+  cmDspSysInstallCb(h, max_even_1,  "val",     even_sr_11,  "max_in",  NULL );
1279
+  cmDspSysInstallCb(h, even_sr_11,   "val_out", even_rt_11,  "f-in",    NULL );
1280
+  cmDspSysInstallCb(h, menu_even_1, "out",     even_rt_11,  "sel",     NULL );
1281
+  cmDspSysInstallCb(h, even_rt_11,   "f-out-0", thrh_sr_11, "val_in",  NULL );
1282
+  cmDspSysInstallCb(h, even_rt_11,   "f-out-1", upr_sr_11,  "val_in",  NULL );
1283
+  cmDspSysInstallCb(h, even_rt_11,   "f-out-2", lwr_sr_11,  "val_in",  NULL );
1284
+
1285
+  // TEMPO -> scaleRange -> Router  -> var scaleRange
1286
+  cmDspSysInstallCb(h, min_tempo_1,  "val",     tempo_sr_11,  "min_in",  NULL );
1287
+  cmDspSysInstallCb(h, max_tempo_1,  "val",     tempo_sr_11,  "max_in",  NULL );
1288
+  cmDspSysInstallCb(h, tempo_sr_11,   "val_out", tempo_rt_11,  "f-in",    NULL );
1289
+  cmDspSysInstallCb(h, menu_tempo_1, "out",     tempo_rt_11,  "sel",     NULL );
1290
+  cmDspSysInstallCb(h, tempo_rt_11,   "f-out-0", thrh_sr_11, "val_in",  NULL );
1291
+  cmDspSysInstallCb(h, tempo_rt_11,   "f-out-1", upr_sr_11,  "val_in",  NULL );
1292
+  cmDspSysInstallCb(h, tempo_rt_11,   "f-out-2", lwr_sr_11,  "val_in",  NULL );
1293
+
1294
+  // COST -> scaleRange -> Router  -> var scaleRange 
1295
+  cmDspSysInstallCb(h, min_cost_1,  "val",     cost_sr_11,  "min_in",  NULL );
1296
+  cmDspSysInstallCb(h, max_cost_1,  "val",     cost_sr_11,  "max_in",  NULL );
1297
+  cmDspSysInstallCb(h, cost_sr_11,   "val_out", cost_rt_11,  "f-in",    NULL );
1298
+  cmDspSysInstallCb(h, menu_cost_1, "out",     cost_rt_11,  "sel",     NULL );
1299
+  cmDspSysInstallCb(h, cost_rt_11,   "f-out-0", thrh_sr_11, "val_in",  NULL );
1300
+  cmDspSysInstallCb(h, cost_rt_11,   "f-out-1", upr_sr_11,  "val_in",  NULL );
1301
+  cmDspSysInstallCb(h, cost_rt_11,   "f-out-2", lwr_sr_11,  "val_in",  NULL );
1302
+
1303
+  // THRESH scaleRange -> FX
1304
+  cmDspSysInstallCb(h, min_thrh_1, "val",     thrh_sr_11, "min_out", NULL );
1305
+  cmDspSysInstallCb(h, max_thrh_1, "val",     thrh_sr_11, "max_out", NULL );
1306
+  cmDspSysInstallCb(h, thrh_sr_11,  "val_out", th11p,    "val",     NULL );
1307
+
1308
+
1309
+  // UPR scaleRange -> FX
1310
+  cmDspSysInstallCb(h, min_upr_1, "val",     upr_sr_11, "min_out", NULL );
1311
+  cmDspSysInstallCb(h, max_upr_1, "val",     upr_sr_11, "max_out", NULL );
1312
+  cmDspSysInstallCb(h, upr_sr_11,  "val_out", us11p,    "val",     NULL );
1313
+
1314
+  // LWR scaleRange -> FX
1315
+  cmDspSysInstallCb(h, min_lwr_1, "val",     lwr_sr_11, "min_out", NULL );
1316
+  cmDspSysInstallCb(h, max_lwr_1, "val",     lwr_sr_11, "max_out", NULL );
1317
+  cmDspSysInstallCb(h, lwr_sr_11,  "val_out", ls11p,    "val",     NULL );
1318
+
1319
+
1320
+
1321
+  cmDspSysNewPage(h,"Compressor");
1322
+
1323
+  cmDspInst_t* cmp0_byp   = cmDspSysAllocCheckP(  h,  compPreGrpSymId, NULL, "Bypass0", 1.0 );
1324
+  cmDspInst_t* cmp0_igain = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "In Gain0", 0.0,   10.0, 0.1, cmpInGain );
1325
+  cmDspInst_t* cmp0_thr   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "ThreshDb0", -100.0, 0.0, 0.1, cmpThreshDb);
1326
+  cmDspInst_t* cmp0_rat   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Ratio0",    0.1, 100, 0.1, cmpRatio_num);
1327
+  cmDspInst_t* cmp0_atk   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Atk Ms0",   0.0, 1000.0, 0.1, cmpAtkMs);
1328
+  cmDspInst_t* cmp0_rls   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Rls Ms0",   0.0, 1000.0, 0.1, cmpRlsMs);
1329
+  cmDspInst_t* cmp0_mkup  = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Makeup0",   0.0, 10.0,   0.01, cmpMakeup);
1330
+  cmDspInst_t* cmp0_wnd   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Wnd Ms0",   1.0, cmpWndMaxMs, 1.0, cmpWndMs );
1331
+  cmDspInst_t* cmp0_mtr   = cmDspSysAllocInst(h,"Meter","Env0", 3, 0.0, 0.0, 1.0);
1332
+
1333
+  cmDspSysInstallCb(h, cmp0_byp,  "out", cmp0, "bypass", NULL );
1334
+  cmDspSysInstallCb(h, cmp0_igain,"val", cmp0, "igain", NULL );
1335
+  cmDspSysInstallCb(h, cmp0_thr,  "val", cmp0, "thr", NULL );
1336
+  cmDspSysInstallCb(h, cmp0_rat,  "val", cmp0, "ratio", NULL );
1337
+  cmDspSysInstallCb(h, cmp0_atk,  "val", cmp0, "atk", NULL );
1338
+  cmDspSysInstallCb(h, cmp0_rls,  "val", cmp0, "rls", NULL );
1339
+  cmDspSysInstallCb(h, cmp0_mkup, "val", cmp0, "ogain", NULL );
1340
+  cmDspSysInstallCb(h, cmp0_wnd,  "val", cmp0, "wnd", NULL );
1341
+  cmDspSysInstallCb(h, cmp0,      "env", cmp0_mtr, "in", NULL );
1342
+
1343
+  cmDspSysNewColumn(h,0);
1344
+  cmDspInst_t* cmp1_byp   = cmDspSysAllocCheckP(  h, compPreGrpSymId, NULL, "Bypass1", 1.0 );
1345
+  cmDspInst_t* cmp1_igain = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "In Gain1",  0.0,   10.0, 0.1, cmpInGain);
1346
+  cmDspInst_t* cmp1_thr   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "ThreshDb1", -100.0, 0.0, 0.1, cmpThreshDb);
1347
+  cmDspInst_t* cmp1_rat   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Ratio1",    0.1, 100, 0.1, cmpRatio_num);
1348
+  cmDspInst_t* cmp1_atk   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Atk Ms1",   0.0, 1000.0, 0.1, cmpAtkMs);
1349
+  cmDspInst_t* cmp1_rls   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Rls Ms1",   0.0, 1000.0, 0.1, cmpRlsMs);
1350
+  cmDspInst_t* cmp1_mkup  = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Makeup1",   0.0, 10.0,   0.01, cmpMakeup);
1351
+  cmDspInst_t* cmp1_wnd   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Wnd Ms1",   1.0, cmpWndMaxMs, 1.0, cmpWndMs );
1352
+  cmDspInst_t* cmp1_mtr   = cmDspSysAllocInst(h,"Meter","Env1", 3, 0.0, 0.0, 1.0);
1353
+
1354
+  cmDspSysInstallCb(h, cmp1_byp,  "out", cmp1, "bypass", NULL );
1355
+  cmDspSysInstallCb(h, cmp1_igain,"val", cmp1, "igain", NULL );
1356
+  cmDspSysInstallCb(h, cmp1_thr,  "val", cmp1, "thr", NULL );
1357
+  cmDspSysInstallCb(h, cmp1_rat,  "val", cmp1, "ratio", NULL );
1358
+  cmDspSysInstallCb(h, cmp1_atk,  "val", cmp1, "atk", NULL );
1359
+  cmDspSysInstallCb(h, cmp1_rls,  "val", cmp1, "rls", NULL );
1360
+  cmDspSysInstallCb(h, cmp1_mkup, "val", cmp1, "ogain", NULL );
1361
+  cmDspSysInstallCb(h, cmp1_wnd,  "val", cmp1, "wnd", NULL );
1362
+  cmDspSysInstallCb(h, cmp1,      "env", cmp1_mtr, "in", NULL );
1363
+
1364
+  //--------------- Compressor Preset controls
1365
+  cmDspSysNewColumn(h,0);
1366
+  cmDspInst_t* comp_preset    = cmDspSysAllocInst(   h, "Preset", NULL, 1, compPreGrpSymId );
1367
+  cmDspInst_t* comp_presetLbl = cmDspSysAllocInst(   h, "Text",   "Comp_Preset",      1, "" );
1368
+  cmDspInst_t* comp_storeBtn  = cmDspSysAllocButton( h, "comp_store",  0);
1369
+  cmDspInst_t* comp_recallBtn = cmDspSysAllocButton( h, "comp_recall", 0);
1370
+  cmDspInst_t* comp_pts       = cmDspSysAllocInst(   h, "PortToSym", NULL, 2, "store", "recall");
1371
+
1372
+  cmDspSysInstallCb(   h, comp_presetLbl, "val",    comp_preset, "label",NULL);
1373
+  cmDspSysInstallCb(   h, comp_storeBtn,  "out",    comp_pts,    "store", NULL );
1374
+  cmDspSysInstallCb(   h, comp_recallBtn, "out",    comp_pts,    "recall", NULL );
1375
+  cmDspSysInstallCb(   h, comp_pts,       "store",  comp_preset, "cmd", NULL );
1376
+  cmDspSysInstallCb(   h, comp_pts,       "recall", comp_preset, "cmd", NULL );
1377
+
1378
+  return rc;
735 1379
 }
736 1380
 
737 1381
 
1382
+
1383
+

Laden…
Abbrechen
Speichern