Преглед изворни кода

Broke cmDspPgmKr.c into multiple files cmDspPgm???.c.

master
kevin пре 8 година
родитељ
комит
8be69c82cd
8 измењених фајлова са 2061 додато и 1499 уклоњено
  1. 2
    2
      Makefile.am
  2. 7
    2
      dsp/cmDspPgm.c
  3. 2
    1495
      dsp/cmDspPgmKr.c
  4. 1
    0
      dsp/cmDspPgmKr.h
  5. 358
    0
      dsp/cmDspPgmKrChain.c
  6. 51
    0
      dsp/cmDspPgmKrChain.h
  7. 455
    0
      dsp/cmDspPgmKrTimeLineLite.c
  8. 1185
    0
      dsp/cmDspPgmKrTksb.c

+ 2
- 2
Makefile.am Прегледај датотеку

@@ -54,8 +54,8 @@ cmSRC += src/libcm/dsp/cmDspStore.c src/libcm/dsp/cmDspBuiltIn.c  src/libcm/dsp/
54 54
 cmHDR += src/libcm/dsp/cmDspPgm.h src/libcm/dsp/cmDspPgmPP.h src/libcm/dsp/cmDspPgmPPMain.h
55 55
 cmSRC += src/libcm/dsp/cmDspPgm.c src/libcm/dsp/cmDspPgmPP.c src/libcm/dsp/cmDspPgmPPMain.c
56 56
 
57
-cmHDR +=  src/libcm/dsp/cmDspKr.h src/libcm/dsp/cmDspPgmKr.h
58
-cmSRC +=  src/libcm/dsp/cmDspKr.c src/libcm/dsp/cmDspPgmKr.c
57
+cmHDR +=  src/libcm/dsp/cmDspKr.h src/libcm/dsp/cmDspPgmKr.h  src/libcm/dsp/cmDspPgmKrChain.h 
58
+cmSRC +=  src/libcm/dsp/cmDspKr.c src/libcm/dsp/cmDspPgmKr.c  src/libcm/dsp/cmDspPgmKrChain.c src/libcm/dsp/cmDspPgmKrTksb.c src/libcm/dsp/cmDspPgmKrTimeLineLite.c
59 59
 
60 60
 cmHDR += src/libcm/cmAudDsp.h src/libcm/cmAudDspIF.h src/libcm/cmAudDspLocal.h
61 61
 cmSRC += src/libcm/cmAudDsp.c src/libcm/cmAudDspIF.c src/libcm/cmAudDspLocal.c

+ 7
- 2
dsp/cmDspPgm.c Прегледај датотеку

@@ -2838,7 +2838,9 @@ cmDspRC_t _cmDspSysPgm_AvailCh( cmDspSysH_t h, void** userPtrPtr )
2838 2838
   cmDspInst_t* fwtp  =  cmDspSysAllocInst( h, "WaveTable", NULL,   5, ((int)cmDspSysSampleRate(h)), 1, fn, -1, 7000000 );
2839 2839
   cmDspInst_t* fad0  =  cmDspSysAllocInst( h, "Xfader",    NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
2840 2840
 
2841
-  cmDspInst_t*  prp  = cmDspSysAllocInst(  h, "Printer",  NULL, 1, ">" );
2841
+  cmDspInst_t*  prp   = cmDspSysAllocInst(  h, "Printer",  NULL, 1, "ch:" );
2842
+  cmDspInst_t*  prg0  = cmDspSysAllocInst(  h, "Printer",  NULL, 1, "g0:" );
2843
+  cmDspInst_t*  prg1  = cmDspSysAllocInst(  h, "Printer",  NULL, 1, "g1:" );
2842 2844
 
2843 2845
   cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",  NULL,   1, 0 );
2844 2846
   cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",  NULL,   1, 1 );
@@ -2861,7 +2863,7 @@ cmDspRC_t _cmDspSysPgm_AvailCh( cmDspSysH_t h, void** userPtrPtr )
2861 2863
   cmDspSysInstallCb(h, achp, "ch",      prp,  "in",     NULL); // availCh.ch -> printer
2862 2864
 
2863 2865
   
2864
-  cmDspSysInstallCb(h, achp, "gate-0",  fad0, "gate-0", NULL );   // availCh.gate->xfad.gate   
2866
+  cmDspSysInstallCb(h, achp, "gate-0",  fad0, "gate-0", NULL );  // availCh.gate->xfad.gate   
2865 2867
   cmDspSysInstallCb(h, fad0, "state-0", achp, "dis-0",  NULL );  // xfad->state ->availCh.dis
2866 2868
 
2867 2869
   cmDspSysInstallCb(h, achp, "gate-1",  fad0, "gate-1", NULL );
@@ -2869,6 +2871,8 @@ cmDspRC_t _cmDspSysPgm_AvailCh( cmDspSysH_t h, void** userPtrPtr )
2869 2871
   
2870 2872
   cmDspSysInstallCb(h, hz,   "val",     sphp, "mult",   NULL );
2871 2873
 
2874
+  cmDspSysInstallCb(h, achp, "gate-0",  prg0, "in", NULL ); 
2875
+  cmDspSysInstallCb(h, achp, "gate-1",  prg1, "in", NULL ); 
2872 2876
 
2873 2877
   return kOkDspRC;
2874 2878
 
@@ -3103,6 +3107,7 @@ _cmDspSysPgm_t _cmDspSysPgmArray[] =
3103 3107
   { "tksblite",     _cmDspSysPgm_TksbLite,     NULL, NULL }, 
3104 3108
   { "tksb",          _cmDspSysPgm_Tksb,         NULL, NULL },
3105 3109
   { "time_line",     _cmDspSysPgm_TimeLine,     NULL, NULL },
3110
+  { "time_line_lite",_cmDspSysPgm_TimeLineLite, NULL, NULL },  
3106 3111
   { "seq-bldr",      _cmDspSysPgm_TakeSeqBldr,  NULL, NULL },
3107 3112
   { "multi-out",     _cmDspSysPgm_MultiOut,     NULL, NULL },
3108 3113
   { "multi-in",      _cmDspSysPgm_MultiIn,     NULL, NULL },

+ 2
- 1495
dsp/cmDspPgmKr.c
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 1
- 0
dsp/cmDspPgmKr.h Прегледај датотеку

@@ -6,6 +6,7 @@ extern "C" {
6 6
 #endif
7 7
 
8 8
   cmDspRC_t _cmDspSysPgm_TimeLine( cmDspSysH_t h, void** userPtrPtr );
9
+  cmDspRC_t _cmDspSysPgm_TimeLineLite( cmDspSysH_t h, void** userPtrPtr );
9 10
   cmDspRC_t _cmDspSysPgm_Tksb(cmDspSysH_t h, void** userPtrPtr );
10 11
   cmDspRC_t _cmDspSysPgm_TksbLite(cmDspSysH_t h, void** userPtrPtr );
11 12
   

+ 358
- 0
dsp/cmDspPgmKrChain.c Прегледај датотеку

@@ -0,0 +1,358 @@
1
+#include "cmPrefix.h"
2
+#include "cmGlobal.h"
3
+#include "cmFloatTypes.h"
4
+#include "cmRpt.h"
5
+#include "cmErr.h"
6
+#include "cmCtx.h"
7
+#include "cmMem.h"
8
+#include "cmMallocDebug.h"
9
+#include "cmLinkedHeap.h"
10
+#include "cmText.h"
11
+#include "cmFileSys.h"
12
+#include "cmSymTbl.h"
13
+#include "cmJson.h"
14
+#include "cmPrefs.h"
15
+#include "cmDspValue.h"
16
+#include "cmMsgProtocol.h"
17
+#include "cmThread.h"
18
+#include "cmUdpPort.h"
19
+#include "cmUdpNet.h"
20
+#include "cmTime.h"
21
+#include "cmAudioSys.h"
22
+#include "cmProcObj.h"
23
+#include "cmDspCtx.h"
24
+#include "cmDspClass.h"
25
+#include "cmDspSys.h"
26
+#include "cmDspPgm.h"
27
+
28
+
29
+#include "cmAudioFile.h"
30
+#include "cmProcObj.h"
31
+#include "cmProc.h"
32
+#include "cmProc3.h"
33
+
34
+#include "cmVectOpsTemplateMain.h"
35
+#include "cmVectOps.h"
36
+
37
+#include "cmDspPgmKrChain.h"
38
+
39
+cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
40
+{
41
+  cmDspRC_t rc;
42
+  if((rc = cmDspSysLastRC(h)) != kOkDspRC )
43
+    return rc;
44
+
45
+  cmDspRsrcString(h,&r->tlFn,        "timeLineFn",   NULL);
46
+  cmDspRsrcString(h,&r->tlPrefixPath,"tlPrefixPath", NULL);
47
+  cmDspRsrcString(h,&r->scFn,        "scoreFn",      NULL);
48
+  cmDspRsrcString(h,&r->tksbFn,      "tksbFn",       NULL);
49
+  cmDspRsrcString(h,&r->modFn,       "modFn",        NULL);
50
+  cmDspRsrcString(h,&r->measFn,      "measFn",       NULL);
51
+  cmDspRsrcString(h,&r->recordDir,   "recordDir",    NULL);
52
+  cmDspRsrcString(h,&r->midiDevice,  "midiDevice",   NULL);
53
+  cmDspRsrcString(h,&r->midiOutPort, "midiOutPort",  NULL);
54
+  cmDspRsrcString(h,&r->midiOutPort2,"midiOutPort2", NULL);
55
+
56
+  if((rc = cmDspSysLastRC(h)) != kOkDspRC )
57
+    cmErrMsg(err,rc,"A KR DSP resource load failed.");
58
+    
59
+  return rc;
60
+}
61
+
62
+
63
+const cmChar_t* _mlbl(const cmChar_t* prefix, unsigned ch )
64
+{
65
+  static char s[128];
66
+  s[127]=0;
67
+  snprintf(s,127,"%s%i",prefix,ch);
68
+  return s;
69
+}
70
+
71
+#define mlbl(a)  _mlbl(a,mch)
72
+#define lbl(a) cmDspSysPrintLabel(a,ach)
73
+
74
+
75
+void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpSymId, unsigned cmpPreGrpSymId, cmDspInst_t* modp, unsigned ach, unsigned mch )
76
+{
77
+  unsigned        measRtrChCnt = 6; // note: router channel 6 is not connected
78
+
79
+  int             krWndSmpCnt = 2048;
80
+  int             krHopFact   = 4;
81
+
82
+  unsigned        xfadeChCnt  = 2;
83
+  double          xfadeMs     = 50;
84
+  bool            xfadeInitFl = true;
85
+  double          mixGain     = 1.0;
86
+
87
+  bool            cmpBypassFl  = false;
88
+  double          cmpInGain    = 3.0;
89
+  double          cmpThreshDb  = -40.0;
90
+  double          cmpRatio_num = 5.0;
91
+  double          cmpAtkMs     = 20.0;
92
+  double          cmpRlsMs     = 100.0;
93
+  double          cmpMakeup    = 1.0;
94
+  double          cmpWndMaxMs  = 1000.0;
95
+  double          cmpWndMs     = 200.0;
96
+
97
+  cmDspInst_t* achan = cmDspSysAllocInst(h, "AvailCh",     NULL, 1, xfadeChCnt );
98
+  
99
+  // Measurement scale/range 
100
+  cmDspInst_t* even_sr  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.8,   1.1, 0.0,   1.0 );
101
+  cmDspInst_t* dynm_sr  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,   4.0, 0.01,  1.0 );
102
+  cmDspInst_t* tmpo_sr  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4, 80.0, 120.0, 0.01,  1.0 );
103
+  cmDspInst_t* cost_sr  = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0,   1.0, 0.001, 1.0 );
104
+
105
+  // Measurement -> parameter mappers
106
+  cmDspInst_t* even_rt  = cmDspSysAllocInst(h, "Router",      lbl("even_rt"),  2,  measRtrChCnt, measRtrChCnt-1 );
107
+  cmDspInst_t* dynm_rt  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtrChCnt, measRtrChCnt-1 );
108
+  cmDspInst_t* tmpo_rt  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtrChCnt, measRtrChCnt-1 );
109
+  cmDspInst_t* cost_rt  = cmDspSysAllocInst(h, "Router",      NULL,  2,  measRtrChCnt, measRtrChCnt-1 );
110
+
111
+  // Scale/ranges applied to incoming measurements.
112
+  cmDspInst_t* thr_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, 0.01, 100.0 );
113
+  cmDspInst_t* upr_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -1.0, 5.0 );
114
+  cmDspInst_t* lwr_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0, -5.0, 5.0 );
115
+  cmDspInst_t* off_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0,  0.0, 100.0 );
116
+  cmDspInst_t* wet_sr   = cmDspSysAllocInst(h, "ScaleRange",  NULL,  4,  0.0, 1.0,  0.0, 1.0 );
117
+
118
+ 
119
+  // Parameter-> kr routers (routers used to cross-fade between the two kr units)
120
+  unsigned paramRtChCnt = 2;
121
+  cmDspInst_t* mod_rt   = cmDspSysAllocInst(h, "Router",      lbl("mod_rt"),  2,  paramRtChCnt, paramRtChCnt-1 );
122
+  cmDspInst_t* wnd_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
123
+  cmDspInst_t* hop_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
124
+  cmDspInst_t* thr_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
125
+  cmDspInst_t* upr_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
126
+  cmDspInst_t* lwr_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
127
+  cmDspInst_t* inv_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
128
+  cmDspInst_t* off_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
129
+  cmDspInst_t* wet_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
130
+
131
+  // Audio processors
132
+  cmDspInst_t* kr0  = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
133
+  cmDspInst_t* kr1  = cmDspSysAllocInst(h, "Kr",         NULL,   2, krWndSmpCnt, krHopFact );
134
+  cmDspInst_t* xfad = cmDspSysAllocInst(h, "Xfader",     NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
135
+  cmDspInst_t* mix  = cmDspSysAllocInst(h, "AMix",       NULL,   3, xfadeChCnt,  mixGain, mixGain );
136
+  cmDspInst_t* cmp  = cmDspSysAllocInst(h, "Compressor", NULL,   8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs ); 
137
+
138
+  // Internal audio connections
139
+  cmDspSysConnectAudio(h, kr0,  "out",   xfad, "in-0");
140
+  cmDspSysConnectAudio(h, kr1,  "out",   xfad, "in-1");
141
+  cmDspSysConnectAudio(h, xfad, "out-0", mix,  "in-0");
142
+  cmDspSysConnectAudio(h, xfad, "out-1", mix,  "in-1");
143
+  cmDspSysConnectAudio(h, mix,  "out",   cmp,  "in" );
144
+
145
+  // active channel <-> cross-fade connections
146
+  cmDspSysInstallCb(h, achan,  "reset",   xfad, "reset", NULL);
147
+  cmDspSysInstallCb(h, achan,  "gate-0",  xfad, "gate-0", NULL );
148
+  cmDspSysInstallCb(h, achan,  "gate-1",  xfad, "gate-1", NULL );
149
+  cmDspSysInstallCb(h, xfad,   "state-0", achan, "dis-0",  NULL );
150
+  cmDspSysInstallCb(h, xfad,   "state-1", achan, "dis-1",  NULL );
151
+
152
+  
153
+  //  Measurement Number Controls
154
+  cmDspInst_t* min_dynm_ctl    = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Min In Dyn"),      0.0, 10.0, 1.0, 0.0);
155
+  cmDspInst_t* max_dynm_ctl    = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Max In Dyn"),      0.0, 10.0, 1.0, 4.0);
156
+  cmDspInst_t* dynm_map_menu   = cmDspSysAllocMsgListP(h,preGrpSymId, NULL, lbl("DynSel 0"), NULL, "measMenu", measRtrChCnt-1);
157
+
158
+  cmDspInst_t* min_even_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Min In Even"),    0.0, 1.0, 0.001, 0.75);
159
+  cmDspInst_t* max_even_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Max In Even"),    0.0, 3.0, 0.001, 1.0);
160
+  cmDspInst_t* even_map_menu  = cmDspSysAllocMsgListP( h,preGrpSymId, NULL, lbl("EvenSel"), NULL, "measMenu", measRtrChCnt-1);
161
+
162
+  cmDspSysNewColumn(h,0);
163
+  cmDspInst_t* min_tmpo_ctl  = cmDspSysAllocScalarP(   h,preGrpSymId, NULL, lbl("Min In Tempo"),   0.0, 200.0, 1.0, 80.0);
164
+  cmDspInst_t* max_tmpo_ctl  = cmDspSysAllocScalarP(   h,preGrpSymId, NULL, lbl("Max In Tempo"),   0.0, 200.0, 1.0, 120.0);
165
+  cmDspInst_t* tmpo_map_menu = cmDspSysAllocMsgListP(  h,preGrpSymId, NULL, lbl("TempoSel"), NULL, "measMenu", measRtrChCnt-1);
166
+
167
+  cmDspInst_t* min_cost_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Min In Cost"),      0.0, 1.0, 0.01, 0.0);
168
+  cmDspInst_t* max_cost_ctl   = cmDspSysAllocScalarP(  h,preGrpSymId, NULL, lbl("Max In Cost"),      0.0, 1.0, 0.01, 1.0);
169
+  cmDspInst_t* cost_map_menu  = cmDspSysAllocMsgListP( h,preGrpSymId, NULL, lbl("CostSel"), NULL, "measMenu", measRtrChCnt-1);
170
+
171
+  cmDspSysInstallCb(h, min_dynm_ctl, "val",     dynm_sr, "min_in", NULL );
172
+  cmDspSysInstallCb(h, max_dynm_ctl, "val",     dynm_sr, "min_in", NULL );
173
+  cmDspSysInstallCb(h, dynm_map_menu,"out",     dynm_rt, "sel",    NULL );   
174
+  cmDspSysInstallCb(h, dynm_sr,      "val_out", dynm_rt, "f-in",   NULL );
175
+
176
+  cmDspSysInstallCb(h, min_even_ctl, "val",     even_sr, "min_in", NULL );
177
+  cmDspSysInstallCb(h, max_even_ctl, "val",     even_sr, "min_in", NULL );
178
+  cmDspSysInstallCb(h, even_map_menu,"out",     even_rt, "sel",    NULL );   
179
+  cmDspSysInstallCb(h, even_sr,      "val_out", even_rt, "f-in",   NULL );
180
+
181
+  cmDspSysInstallCb(h, min_tmpo_ctl, "val",     tmpo_sr, "min_in", NULL );
182
+  cmDspSysInstallCb(h, max_tmpo_ctl, "val",     tmpo_sr, "min_in", NULL );
183
+  cmDspSysInstallCb(h, tmpo_map_menu,"out",     tmpo_rt, "sel",    NULL );   
184
+  cmDspSysInstallCb(h, tmpo_sr,      "val_out", tmpo_rt, "f-in",   NULL );
185
+  
186
+  cmDspSysInstallCb(h, min_cost_ctl, "val",     cost_sr, "min_in", NULL );
187
+  cmDspSysInstallCb(h, max_cost_ctl, "val",     cost_sr, "min_in", NULL );
188
+  cmDspSysInstallCb(h, cost_map_menu,"out",     cost_rt, "sel",    NULL );   
189
+  cmDspSysInstallCb(h, cost_sr,      "val_out", cost_rt, "f-in",   NULL );
190
+
191
+  cmDspSysNewColumn(h,0);
192
+  cmDspInst_t* min_thr_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Min Thresh"),       0.0,100.0, 1.0, 30.0);
193
+  cmDspInst_t* max_thr_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Max Thresh"),       0.0,100.0, 1.0, 80.0);
194
+  cmDspInst_t* min_upr_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Min Upr"),         -1.0,  1.0, 0.001, -0.5);
195
+  cmDspInst_t* max_upr_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Max Upr"),         -1.0,  1.0, 0.001, 0.5);
196
+  cmDspInst_t* min_lwr_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Min Lwr"),          0.0, -1.0, 5.0, 1.0);
197
+  cmDspInst_t* max_lwr_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Max Lwr"),          0.0, -1.0, 5.0, 3.0);
198
+  cmDspInst_t* min_off_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Min Off"),          0.0, 50.0, 0.1, 30.0);
199
+  cmDspInst_t* max_off_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Max Off"),          0.0, 50.0, 0.1, 30.0);
200
+  cmDspInst_t* min_wet_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Min Wet"),          0.0,  1.0, 0.01, 1.0);
201
+  cmDspInst_t* max_wet_ctl   = cmDspSysAllocScalarP( h,preGrpSymId, NULL, lbl("Max Wet"),          0.0,  1.0, 0.01, 1.0);
202
+
203
+
204
+  // Parameter number controls 
205
+  cmDspSysNewColumn(h,0);
206
+  cmDspInst_t* mod_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Mode"),      0.0, 4.0, 1.0, 1.0);
207
+  cmDspInst_t* wnd_ctl = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, lbl("WndSmpCnt"), NULL, "wndSmpCnt", 2);
208
+  cmDspInst_t* hop_ctl = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, lbl("HopFact"),   NULL, "hopFact",   2);
209
+  cmDspInst_t* thr_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Threshold"), 0.0, 100.0, 1.0,  60.0 );
210
+  cmDspInst_t* upr_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Upr slope"), 0.0,  10.0, 0.01,  0.0 ); 
211
+  cmDspInst_t* lwr_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Lwr slope"), 0.3,  10.0, 0.01,  2.0 );
212
+  cmDspInst_t* off_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Offset"),    0.0, 100.0, 0.01, 20.0 );
213
+  cmDspInst_t* inv_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Invert"),    0.0,   1.0, 1.0,   0.0 );  
214
+  cmDspInst_t* wet_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Wet Dry"),   0.0,   1.0, 0.001, 1.0 );
215
+
216
+
217
+  cmDspSysInstallCb(h, mod_ctl, "val",         mod_rt, "f-in",    NULL );
218
+  cmDspSysInstallCb(h, achan,   "ch",          mod_rt, "sel",     NULL );   // ach->rt sel
219
+  cmDspSysInstallCb(h, mod_rt,  "f-out-0",     kr0,    "mode",    NULL );   // mode->kr
220
+  cmDspSysInstallCb(h, mod_rt,  "f-out-1",     kr1,    "mode",    NULL );   // mode->kr
221
+
222
+  cmDspSysInstallCb(h, wnd_ctl, "out",         wnd_rt, "f-in",    NULL );
223
+  cmDspSysInstallCb(h, achan,   "ch",          wnd_rt, "sel",     NULL );   // ach->rt sel
224
+  cmDspSysInstallCb(h, wnd_rt,  "f-out-0",     kr0,    "wndn",    NULL );   // wndn->kr
225
+  cmDspSysInstallCb(h, wnd_rt,  "f-out-1",     kr1,    "wndn",    NULL );   // wndn->kr
226
+
227
+  cmDspSysInstallCb(h, hop_ctl, "out",         hop_rt, "f-in",    NULL );
228
+  cmDspSysInstallCb(h, achan,   "ch",          hop_rt, "sel",     NULL );   // ach->rt sel
229
+  cmDspSysInstallCb(h, hop_rt,  "f-out-0",     kr0,    "hopf",    NULL );   // hopf->kr
230
+  cmDspSysInstallCb(h, hop_rt,  "f-out-1",     kr1,    "hopf",    NULL );   // hopf->kr
231
+
232
+  cmDspSysInstallCb(h, min_thr_ctl, "val",     thr_sr, "min_out", NULL );
233
+  cmDspSysInstallCb(h, max_thr_ctl, "val",     thr_sr, "max_out", NULL );
234
+  cmDspSysInstallCb(h, even_rt,     "f-out-0", thr_sr, "val_in",  NULL );
235
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-0", thr_sr, "val_in",  NULL );
236
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-0", thr_sr, "val_in",  NULL );
237
+  cmDspSysInstallCb(h, cost_rt,     "f-out-0", thr_sr, "val_in",  NULL );
238
+  cmDspSysInstallCb(h, thr_sr,      "val_out", thr_ctl,"val",     NULL );
239
+  cmDspSysInstallCb(h, thr_ctl,     "val",     thr_rt, "f-in",    NULL );
240
+  cmDspSysInstallCb(h, achan,       "ch",      thr_rt, "sel",     NULL );   // ach->rt sel
241
+  cmDspSysInstallCb(h, thr_rt,      "f-out-0", kr0,    "thrh",    NULL );   // thr->kr
242
+  cmDspSysInstallCb(h, thr_rt,      "f-out-1", kr1,    "thrh",    NULL );   // thr->kr
243
+
244
+  cmDspSysInstallCb(h, min_upr_ctl, "val",     upr_sr, "min_out", NULL );
245
+  cmDspSysInstallCb(h, max_upr_ctl, "val",     upr_sr, "max_out", NULL );
246
+  cmDspSysInstallCb(h, even_rt,     "f-out-1", upr_sr, "val_in",  NULL );
247
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-1", upr_sr, "val_in",  NULL );
248
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-1", upr_sr, "val_in",  NULL );
249
+  cmDspSysInstallCb(h, cost_rt,     "f-out-1", upr_sr, "val_in",  NULL );
250
+  cmDspSysInstallCb(h, upr_sr,      "val_out", upr_ctl,"val",     NULL );
251
+  cmDspSysInstallCb(h, upr_ctl,     "val",     upr_rt, "f-in",    NULL );
252
+  cmDspSysInstallCb(h, achan,       "ch",      upr_rt, "sel",     NULL );   // ach->rt sel
253
+  cmDspSysInstallCb(h, upr_rt,      "f-out-0", kr0,    "uprs",    NULL );   // upr->kr
254
+  cmDspSysInstallCb(h, upr_rt,      "f-out-1", kr1,    "uprs",    NULL );   // upr->kr
255
+
256
+  cmDspSysInstallCb(h, min_lwr_ctl, "val",     lwr_sr, "min_out", NULL );
257
+  cmDspSysInstallCb(h, max_lwr_ctl, "val",     lwr_sr, "max_out", NULL );
258
+  cmDspSysInstallCb(h, even_rt,     "f-out-2", lwr_sr, "val_in",  NULL );
259
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-2", lwr_sr, "val_in",  NULL );
260
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-2", lwr_sr, "val_in",  NULL );
261
+  cmDspSysInstallCb(h, cost_rt,     "f-out-2", lwr_sr, "val_in",  NULL );
262
+  cmDspSysInstallCb(h, lwr_sr,      "val_out", lwr_ctl,"val",     NULL );
263
+  cmDspSysInstallCb(h, lwr_ctl,     "val",     lwr_rt, "f-in",    NULL );
264
+  cmDspSysInstallCb(h, achan,       "ch",      lwr_rt, "sel",     NULL );   // ach->rt sel
265
+  cmDspSysInstallCb(h, lwr_rt,      "f-out-0", kr0,    "lwrs",    NULL );   // lwr->kr
266
+  cmDspSysInstallCb(h, lwr_rt,      "f-out-1", kr1,    "lwrs",    NULL );   // lwr->kr
267
+
268
+  cmDspSysInstallCb(h, min_off_ctl, "val",     off_sr, "min_out", NULL );
269
+  cmDspSysInstallCb(h, max_off_ctl, "val",     off_sr, "max_out", NULL );
270
+  cmDspSysInstallCb(h, even_rt,     "f-out-3", off_sr, "val_in",  NULL );
271
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-3", off_sr, "val_in",  NULL );
272
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-3", off_sr, "val_in",  NULL );
273
+  cmDspSysInstallCb(h, cost_rt,     "f-out-3", off_sr, "val_in",  NULL );
274
+  cmDspSysInstallCb(h, off_sr,      "val_out", off_ctl,"val",     NULL );
275
+  cmDspSysInstallCb(h, off_ctl,     "val",     off_rt, "f-in",    NULL );
276
+  cmDspSysInstallCb(h, achan,       "ch",      off_rt, "sel",     NULL );   // ach->rt sel
277
+  cmDspSysInstallCb(h, off_rt,      "f-out-0", kr0,    "offs",    NULL );   // off->kr
278
+  cmDspSysInstallCb(h, off_rt,      "f-out-1", kr1,    "offs",    NULL );   // off->kr
279
+
280
+  cmDspSysInstallCb(h, inv_ctl,     "val",     inv_rt, "f-in",   NULL );
281
+  cmDspSysInstallCb(h, achan,       "ch",      inv_rt, "sel",    NULL );   // ach->rt sel
282
+  cmDspSysInstallCb(h, inv_rt,      "f-out-0", kr0,    "invt",   NULL );   // inv->kr
283
+  cmDspSysInstallCb(h, inv_rt,      "f-out-1", kr1,    "invt",   NULL );   // inv->kr
284
+
285
+  cmDspSysInstallCb(h, min_wet_ctl, "val",     wet_sr, "min_out", NULL );
286
+  cmDspSysInstallCb(h, max_wet_ctl, "val",     wet_sr, "max_out", NULL );
287
+  cmDspSysInstallCb(h, even_rt,     "f-out-4", wet_sr, "val_in",  NULL );
288
+  cmDspSysInstallCb(h, dynm_rt,     "f-out-4", wet_sr, "val_in",  NULL );
289
+  cmDspSysInstallCb(h, tmpo_rt,     "f-out-4", wet_sr, "val_in",  NULL );
290
+  cmDspSysInstallCb(h, cost_rt,     "f-out-4", wet_sr, "val_in",  NULL );
291
+
292
+  cmDspSysInstallCb(h, wet_sr,      "val_out", wet_ctl,"val",     NULL );
293
+  cmDspSysInstallCb(h, wet_ctl,     "val",     wet_rt, "f-in",    NULL );
294
+  cmDspSysInstallCb(h, achan,       "ch",      wet_rt, "sel",     NULL );   // ach->rt sel
295
+  cmDspSysInstallCb(h, wet_rt,      "f-out-0", kr0,    "wet",     NULL );   // wet->kr
296
+  cmDspSysInstallCb(h, wet_rt,      "f-out-1", kr1,    "wet",     NULL );   // wet->kr
297
+  
298
+
299
+  cmDspSysNewColumn(h,0);
300
+  cmDspInst_t* cmp_byp   = cmDspSysAllocCheckP(  h, cmpPreGrpSymId, NULL, lbl("Bypass"), 1.0 );
301
+  cmDspInst_t* cmp_igain = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, lbl("In Gain"),  0.0,   10.0, 0.1, cmpInGain);
302
+  cmDspInst_t* cmp_thr   = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, lbl("ThreshDb"), -100.0, 0.0, 0.1, cmpThreshDb);
303
+  cmDspInst_t* cmp_rat   = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, lbl("Ratio"),    0.1, 100, 0.1, cmpRatio_num);
304
+  cmDspInst_t* cmp_atk   = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, lbl("Atk Ms"),   0.0, 1000.0, 0.1, cmpAtkMs);
305
+  cmDspInst_t* cmp_rls   = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, lbl("Rls Ms"),   0.0, 1000.0, 0.1, cmpRlsMs);
306
+  cmDspInst_t* cmp_mkup  = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, lbl("Makeup"),   0.0, 10.0,   0.01, cmpMakeup);
307
+  cmDspInst_t* cmp_wnd   = cmDspSysAllocScalarP( h, cmpPreGrpSymId, NULL, lbl("Wnd Ms"),   1.0, cmpWndMaxMs, 1.0, cmpWndMs );
308
+  cmDspInst_t* cmp_mtr   = cmDspSysAllocInst(h,"Meter",lbl("Env"), 3, 0.0, 0.0, 1.0);
309
+
310
+  cmDspSysInstallCb(h, cmp_byp,  "out", cmp, "bypass", NULL );
311
+  cmDspSysInstallCb(h, cmp_igain,"val", cmp, "igain", NULL );
312
+  cmDspSysInstallCb(h, cmp_thr,  "val", cmp, "thr", NULL );
313
+  cmDspSysInstallCb(h, cmp_rat,  "val", cmp, "ratio", NULL );
314
+  cmDspSysInstallCb(h, cmp_atk,  "val", cmp, "atk", NULL );
315
+  cmDspSysInstallCb(h, cmp_rls,  "val", cmp, "rls", NULL );
316
+  cmDspSysInstallCb(h, cmp_mkup, "val", cmp, "ogain", NULL );
317
+  cmDspSysInstallCb(h, cmp_wnd,  "val", cmp, "wnd", NULL );
318
+  cmDspSysInstallCb(h, cmp,      "env", cmp_mtr, "in", NULL );
319
+
320
+  cmDspSysInstallCb(h, modp, mlbl("cbyp"),    cmp_byp,  "in", NULL );
321
+  cmDspSysInstallCb(h, modp, mlbl("cigain"),  cmp_igain,"val", NULL );
322
+  cmDspSysInstallCb(h, modp, mlbl("cthrsh"),  cmp_thr,  "val", NULL );
323
+  cmDspSysInstallCb(h, modp, mlbl("cratio"),  cmp_rat,  "val", NULL );
324
+  cmDspSysInstallCb(h, modp, mlbl("catkms"),  cmp_atk,  "val", NULL );
325
+  cmDspSysInstallCb(h, modp, mlbl("crlsms"),  cmp_rls,  "val", NULL );
326
+  cmDspSysInstallCb(h, modp, mlbl("cmakeup"), cmp_mkup, "val", NULL );
327
+  cmDspSysInstallCb(h, modp, mlbl("cwndms"),  cmp_wnd,  "val", NULL );
328
+
329
+  // 
330
+  cmDspInst_t* xfadMs = cmDspSysAllocInst(h,"Scalar", lbl("Xfade Ms"),     5, kNumberDuiId, 0.0,   1000.0,0.01, 50.0 );  
331
+  cmDspSysInstallCb(h, xfadMs, "val", xfad, "ms", NULL );
332
+  cmDspSysInstallCb(h, modp, mlbl("xfad"), xfadMs,  "val", NULL);
333
+
334
+  cmDspSysInstallCb(h, modp, mlbl("win"),  wnd_ctl, "sel",  NULL );
335
+  cmDspSysInstallCb(h, modp, mlbl("hop"),  hop_ctl, "sel", NULL );
336
+  cmDspSysInstallCb(h, modp, mlbl("mod"),  mod_ctl, "val", NULL );
337
+  cmDspSysInstallCb(h, modp, mlbl("thr"),  thr_ctl, "val", NULL );
338
+  cmDspSysInstallCb(h, modp, mlbl("upr"),  upr_ctl, "val", NULL );
339
+  cmDspSysInstallCb(h, modp, mlbl("lwr"),  lwr_ctl, "val", NULL );
340
+  cmDspSysInstallCb(h, modp, mlbl("off"),  off_ctl, "val", NULL );
341
+  cmDspSysInstallCb(h, modp, mlbl("mint"), min_thr_ctl, "val", NULL );
342
+  cmDspSysInstallCb(h, modp, mlbl("maxt"), max_thr_ctl, "val", NULL );
343
+  cmDspSysInstallCb(h, modp, mlbl("minu"), min_upr_ctl, "val", NULL );
344
+  cmDspSysInstallCb(h, modp, mlbl("maxu"), max_upr_ctl, "val", NULL );
345
+  cmDspSysInstallCb(h, modp, mlbl("minl"), min_lwr_ctl, "val", NULL );
346
+  cmDspSysInstallCb(h, modp, mlbl("maxl"), max_lwr_ctl, "val", NULL );
347
+  cmDspSysInstallCb(h, modp, mlbl("mino"), min_off_ctl, "val", NULL );
348
+  cmDspSysInstallCb(h, modp, mlbl("maxo"), max_off_ctl, "val", NULL );
349
+  cmDspSysInstallCb(h, modp, mlbl("sw"),   achan,       "trig", NULL ); // See also: amp.sfloc->achan.trig
350
+
351
+  
352
+  c->achan = achan; 
353
+  c->kr0   = kr0; 
354
+  c->kr1   = kr1;
355
+  c->cmp   = cmp; 
356
+
357
+}
358
+

+ 51
- 0
dsp/cmDspPgmKrChain.h Прегледај датотеку

@@ -0,0 +1,51 @@
1
+
2
+#ifndef cmDspPgmKrChain_h
3
+#define cmDspPgmKrChain_h
4
+
5
+#ifdef __cplusplus
6
+extern "C" {
7
+#endif
8
+
9
+typedef struct
10
+{
11
+  const cmChar_t* tlFn;
12
+  const cmChar_t* tlPrefixPath;
13
+  const cmChar_t* scFn;
14
+  const cmChar_t* tksbFn;
15
+  const cmChar_t* modFn;
16
+  const cmChar_t* measFn;
17
+  const cmChar_t* recordDir;
18
+  const cmChar_t* midiDevice;
19
+  const cmChar_t* midiOutPort;
20
+  const cmChar_t* midiOutPort2;
21
+} krRsrc_t;
22
+
23
+
24
+cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r);
25
+
26
+
27
+  // connection information for 1 transform channel
28
+typedef struct
29
+{
30
+  cmDspInst_t* achan; 
31
+  cmDspInst_t* kr0;  // audio input
32
+  cmDspInst_t* kr1;
33
+  cmDspInst_t* cmp;  // audio output
34
+} cmDspTlXform_t;
35
+
36
+
37
+void _cmDspSys_TlXformChain(
38
+  cmDspSysH_t     h,
39
+  cmDspTlXform_t* c,
40
+  unsigned        preGrpSymId,
41
+  unsigned        cmpPreGrpSymId,
42
+  cmDspInst_t*    modp,
43
+  unsigned        ach,
44
+  unsigned        mch );
45
+
46
+
47
+#ifdef __cplusplus
48
+}
49
+#endif
50
+
51
+#endif

+ 455
- 0
dsp/cmDspPgmKrTimeLineLite.c Прегледај датотеку

@@ -0,0 +1,455 @@
1
+//( { file_desc:"'snap' Performance analysis Simplified Time Line program." kw:[snap]}
2
+
3
+#include "cmPrefix.h"
4
+#include "cmGlobal.h"
5
+#include "cmFloatTypes.h"
6
+#include "cmRpt.h"
7
+#include "cmErr.h"
8
+#include "cmCtx.h"
9
+#include "cmMem.h"
10
+#include "cmMallocDebug.h"
11
+#include "cmLinkedHeap.h"
12
+#include "cmText.h"
13
+#include "cmFileSys.h"
14
+#include "cmSymTbl.h"
15
+#include "cmJson.h"
16
+#include "cmPrefs.h"
17
+#include "cmDspValue.h"
18
+#include "cmMsgProtocol.h"
19
+#include "cmThread.h"
20
+#include "cmUdpPort.h"
21
+#include "cmUdpNet.h"
22
+#include "cmTime.h"
23
+#include "cmAudioSys.h"
24
+#include "cmProcObj.h"
25
+#include "cmDspCtx.h"
26
+#include "cmDspClass.h"
27
+#include "cmDspSys.h"
28
+#include "cmDspPgm.h"
29
+
30
+#include "cmAudioFile.h"
31
+#include "cmProcObj.h"
32
+#include "cmProc.h"
33
+#include "cmProc3.h"
34
+
35
+#include "cmVectOpsTemplateMain.h"
36
+#include "cmVectOps.h"
37
+#include "cmDspPgmKrChain.h"
38
+//)
39
+
40
+//( { label:cmDspPgm_TimeLineLite file_desc:"Simplified score vs. the performance and generating related audio transforms." kw:[spgm] }
41
+
42
+cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
43
+{
44
+  cmDspRC_t rc                       = kOkDspRC;
45
+  cmCtx_t*  cmCtx                    = cmDspSysPgmCtx(h);
46
+  cmErr_t   err;
47
+  krRsrc_t  r;
48
+
49
+  //unsigned  wtLoopCnt                = 1; // 1=play once (-1=loop forever)
50
+  //unsigned  wtInitMode               = 0; // initial wt mode is 'silence'
51
+  //unsigned  wtSmpCnt                 = floor(cmDspSysSampleRate(h)); // wt length == srate
52
+
53
+  unsigned  sfBufCnt                 = 7;     // length of the MIDI event buffer
54
+  unsigned  sfMaxWndCnt              = 10;    // length of the score event buffer
55
+  unsigned  sfMinVel                 = 5;     // ignore MIDI events below this velocity
56
+  bool      sfEnaMeasFl              = false;
57
+
58
+  double    recdPlayInitAllocSecs    = 10.0;
59
+  double    recdPlayMaxLaSecs        = 2.0;
60
+  double    recdPlayCurLaSecs        = 0.1;
61
+  double    recdPlayFadeRateDbPerSec = 4.0;
62
+
63
+
64
+  bool            apfBypassFl  = false;
65
+  unsigned        apfModeSymId  = cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"AP");
66
+  double          apfF0hz       = 100.0;
67
+  double          apfQ          = 1.0;
68
+  double          apfGain       = 1.0;
69
+ 
70
+  memset(&r,0,sizeof(r));
71
+  cmErrSetup(&err,&cmCtx->rpt,"Kr TimelineLite");
72
+
73
+  if( krLoadRsrc(h,&err,&r) != kOkDspRC )
74
+    return rc;
75
+
76
+  cmDspInst_t* ai0p = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 0);
77
+  cmDspInst_t* ai1p = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 1);
78
+  cmDspInst_t* ai2p = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 2);
79
+  cmDspInst_t* ai3p = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 3);
80
+
81
+  cmDspInst_t* mx0p = cmDspSysAllocInst( h, "AMix",      NULL, 3, 2, 0.5, 0.5);
82
+  cmDspInst_t* mx1p = cmDspSysAllocInst( h, "AMix",      NULL, 3, 2, 0.5, 0.5);
83
+
84
+  cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.tlPrefixPath );
85
+  cmDspInst_t* scp  = cmDspSysAllocInst(h,"Score",       "sc",  1, r.scFn );
86
+  //cmDspInst_t* php  = cmDspSysAllocInst(h,"Phasor",      NULL,  1, cmDspSysSampleRate(h) );
87
+  //cmDspInst_t* wtp  = cmDspSysAllocInst(h,"WaveTable",   NULL,  4, wtSmpCnt, wtInitMode, NULL, wtLoopCnt );
88
+  cmDspInst_t* pts  = cmDspSysAllocInst(h,"PortToSym",   NULL,  2, "on", "off" );
89
+  //cmDspInst_t* mip  = cmDspSysAllocInst(h,"MidiIn",      NULL,  0 );
90
+
91
+  cmDspInst_t* mfp  = cmDspSysAllocInst(h,"MidiFilePlay",NULL,  0 );
92
+  cmDspInst_t* nmp  = cmDspSysAllocInst(h,"NanoMap",     NULL,  0 );
93
+  cmDspInst_t* mop  = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, r.midiDevice,r.midiOutPort);
94
+  cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, r.midiDevice,r.midiOutPort2);
95
+  cmDspInst_t* sfp  = cmDspSysAllocInst(h,"ScFol",       NULL,  1, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
96
+  cmDspInst_t* amp  = cmDspSysAllocInst(h,"ActiveMeas",  NULL,  1, 100 );
97
+  cmDspInst_t* rpp  = cmDspSysAllocInst(h,"RecdPlay",    NULL,  6, 2, r.scFn, recdPlayInitAllocSecs, recdPlayMaxLaSecs, recdPlayCurLaSecs, recdPlayFadeRateDbPerSec);
98
+  cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod",       NULL,  2, r.modFn, "m1" );
99
+  cmDspInst_t* modr = cmDspSysAllocInst(h,"ScMod",       NULL,  2, r.modFn, "m1" );
100
+ 
101
+  unsigned   preGrpSymId     = cmDspSysPresetRegisterGroup(h,"tl");
102
+  unsigned   cmpPreGrpSymId  = cmDspSysPresetRegisterGroup(h,"tl_cmp"); 
103
+
104
+  cmDspTlXform_t c0,c1;
105
+
106
+  cmDspSysNewPage(h,"Controls-0");
107
+  _cmDspSys_TlXformChain(h, &c0, preGrpSymId, cmpPreGrpSymId, modp, 0, 0 );
108
+
109
+  cmDspSysNewPage(h,"Controls-1");
110
+  _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, modp, 1, 1 );
111
+
112
+
113
+  cmDspInst_t* apf0 =  cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+0, apfQ, apfGain  ); 
114
+  cmDspInst_t* apf1 =  cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+100.0, apfQ, apfGain  ); 
115
+  cmDspInst_t* apf2 =  cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+200.0, apfQ, apfGain  ); 
116
+  cmDspInst_t* apf3 =  cmDspSysAllocInst(h,"BiQuadEq",NULL, 5, apfBypassFl, apfModeSymId, apfF0hz+300.0, apfQ, apfGain  ); 
117
+
118
+  cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 2 );
119
+  cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 3 );
120
+  cmDspInst_t* ao2p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 4 );
121
+  cmDspInst_t* ao3p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 5 );
122
+
123
+  cmDspSysNewPage(h,"Main");
124
+  cmDspInst_t* liveb= cmDspSysAllocInst(h,"Button", "live",    2, kCheckDuiId,  0.0 );
125
+  cmDspInst_t* simb = cmDspSysAllocInst(h,"Button", "simulate",2, kCheckDuiId,  0.0 );
126
+  cmDspInst_t* ainb = cmDspSysAllocInst(h,"Button", "audio in",2, kCheckDuiId,  0.0 );
127
+  cmDspInst_t* measb= cmDspSysAllocInst(h,"Button", "meas",    2, kCheckDuiId,  0.0 );
128
+  cmDspInst_t* onb  = cmDspSysAllocInst(h,"Button", "start",   2, kButtonDuiId, 1.0 );
129
+  cmDspInst_t* offb = cmDspSysAllocInst(h,"Button", "stop",    2, kButtonDuiId, 1.0 );
130
+  //cmDspInst_t* prtb = cmDspSysAllocInst(h,"Button", "print",   2, kButtonDuiId, 1.0 );
131
+  //cmDspInst_t* qtb  = cmDspSysAllocInst(h,"Button", "quiet",   2, kButtonDuiId, 1.0 );
132
+  cmDspInst_t* prp  = cmDspSysAllocInst(h,"Printer", NULL,   1, ">" );
133
+  cmDspInst_t* prd  = cmDspSysAllocInst(h,"Printer", NULL,   1, "DYN:" );
134
+  cmDspInst_t* pre  = cmDspSysAllocInst(h,"Printer", NULL,   1, "EVEN:" );
135
+  cmDspInst_t* prt  = cmDspSysAllocInst(h,"Printer", NULL,   1, "TEMPO:");
136
+  cmDspInst_t* prc  = cmDspSysAllocInst(h,"Printer", NULL,   1, "COST:");
137
+  //cmDspInst_t* prv  = cmDspSysAllocInst(h,"Printer", NULL,   1, "Value:");
138
+
139
+  // Record <-> Live switches
140
+  cmDspInst_t* tlRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);  // time line swich
141
+  //cmDspInst_t* wtRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
142
+  cmDspInst_t* mfpRt = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
143
+  cmDspInst_t* amRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
144
+  cmDspInst_t* au0Sw = cmDspSysAllocInst(h,"1ofN",   NULL, 2, 2, 0);
145
+  cmDspInst_t* au1Sw = cmDspSysAllocInst(h,"1ofN",   NULL, 2, 2, 0);
146
+
147
+  cmDspInst_t* siRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);  
148
+  cmDspInst_t* muRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);  
149
+  cmDspInst_t* d0Rt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
150
+  cmDspInst_t* d1Rt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
151
+  cmDspInst_t* stRt  = cmDspSysAllocInst(h,"Router", NULL, 2, 2, 0);
152
+
153
+  cmDspSysNewColumn(h,0);
154
+  cmDspInst_t* igain0 = cmDspSysAllocInst(h,"Scalar", "In Gain-0",    5, kNumberDuiId, 0.0,   100.0,0.01,   1.0 );  
155
+  cmDspInst_t* igain1 = cmDspSysAllocInst(h,"Scalar", "In Gain-1",    5, kNumberDuiId, 0.0,   100.0,0.01,   1.0 );  
156
+  cmDspInst_t* igain2 = cmDspSysAllocInst(h,"Scalar", "In Gain-2",    5, kNumberDuiId, 0.0,   100.0,0.01,   1.0 );  
157
+  cmDspInst_t* igain3 = cmDspSysAllocInst(h,"Scalar", "In Gain-3",    5, kNumberDuiId, 0.0,   100.0,0.01,   1.0 );  
158
+
159
+  cmDspInst_t* lasecs = cmDspSysAllocInst(h,"Scalar", "LA Secs",      5, kNumberDuiId, 0.0,   recdPlayMaxLaSecs,0.01,   recdPlayCurLaSecs );  
160
+  cmDspInst_t* dbpsec = cmDspSysAllocInst(h,"Scalar", "Fade dBpSec",  5, kNumberDuiId, 0.0,   24.0, 0.01, recdPlayFadeRateDbPerSec);
161
+  cmDspInst_t* apfByp = cmDspSysAllocCheck(  h, "APF-Bypass", 0.0 );
162
+
163
+
164
+
165
+  cmDspSysNewColumn(h,0);
166
+  cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Out Gain-0",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
167
+  cmDspInst_t* ogain1 = cmDspSysAllocInst(h,"Scalar", "Out Gain-1",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
168
+  cmDspInst_t* ogain2 = cmDspSysAllocInst(h,"Scalar", "Out Gain-2",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
169
+  cmDspInst_t* ogain3 = cmDspSysAllocInst(h,"Scalar", "Out Gain-3",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
170
+
171
+  //cmDspInst_t* scLoc = cmDspSysAllocInst(h,"Scalar", "Sc Loc",   5, kNumberDuiId, 0.0,   3000.0, 1.0,   0.0 );  
172
+
173
+  // Audio file recording
174
+  cmDspInst_t* recdGain= cmDspSysAllocInst(h,"Scalar", "Recd Gain",  5, kNumberDuiId, 0.0,   100.0,0.01, 1.5 );  
175
+  cmDspInst_t* recdChk = cmDspSysAllocInst(h,"Button", "Record",     2, kCheckDuiId, 0.0 );
176
+  cmDspInst_t* recdPtS = cmDspSysAllocInst(h,"GateToSym", NULL,      2, cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"open"),cmSymTblRegisterStaticSymbol(cmDspSysSymbolTable(h),"close"));
177
+  cmDspInst_t* afop    = cmDspSysAllocInst(h,"AudioFileOut",NULL,    2, r.recordDir,2);
178
+  cmDspInst_t* mi0p    = cmDspSysAllocInst(h,"AMeter","In 0",  0);
179
+  cmDspInst_t* mi1p    = cmDspSysAllocInst(h,"AMeter","In 1",  0);
180
+  cmDspInst_t* mi2p    = cmDspSysAllocInst(h,"AMeter","In 2",  0);
181
+  cmDspInst_t* mi3p    = cmDspSysAllocInst(h,"AMeter","In 3",  0);
182
+
183
+
184
+  //--------------- Preset controls
185
+  cmDspSysNewColumn(h,0);
186
+  cmDspInst_t* preset    = cmDspSysAllocInst(   h, "Preset", NULL, 1, preGrpSymId );
187
+  cmDspInst_t* presetLbl = cmDspSysAllocInst(   h, "Text",   "Preset",      1, "" );
188
+  cmDspInst_t* storeBtn  = cmDspSysAllocButton( h, "store",  0);
189
+  cmDspInst_t* recallBtn = cmDspSysAllocButton( h, "recall", 0);
190
+  cmDspSysInstallCb(   h, presetLbl, "val", preset, "label",NULL);
191
+  cmDspSysInstallCb(   h, storeBtn,  "sym", preset, "cmd", NULL );
192
+  cmDspSysInstallCb(   h, recallBtn, "sym", preset, "cmd", NULL );
193
+
194
+  cmDspInst_t* prePath    = cmDspSysAllocInst(   h, "Fname",  "prePath",   3, true,NULL,r.tlPrefixPath);
195
+  
196
+
197
+  cmDspSysNewColumn(h,0);
198
+
199
+  //--------------- Recorded performance evaluation and Active Measurement related controls
200
+  cmDspInst_t* clrBtn  = cmDspSysAllocButton( h, "clear",  0);
201
+  cmDspInst_t* prtBtn  = cmDspSysAllocButton( h, "dump",  0);
202
+  cmDspInst_t* mlst    = cmDspSysAllocInst(   h, "MsgList",   NULL, 3, "meas", r.measFn, 2);
203
+  cmDspInst_t* amCmd   = cmDspSysAllocInst(   h, "PortToSym", NULL, 2, "add", "rewind" );  
204
+
205
+
206
+
207
+
208
+  if((rc = cmDspSysLastRC(h)) != kOkDspRC )
209
+    return rc;
210
+
211
+  // Output Audio file recording.
212
+  cmDspSysInstallCb(h, recdGain,"val", afop,    "gain0", NULL );
213
+  cmDspSysInstallCb(h, recdGain,"val", afop,    "gain1", NULL );
214
+  cmDspSysInstallCb(h, recdChk, "out", recdPtS, "on",    NULL );
215
+  cmDspSysInstallCb(h, recdChk, "out", recdPtS, "off",   NULL );
216
+  cmDspSysInstallCb(h, recdPtS, "out", afop,    "sel",   NULL );
217
+
218
+
219
+  // Audio connections
220
+  //cmDspSysConnectAudio(h, php,  "out",   wtp,  "phs" );     // phs -> wt
221
+
222
+  cmDspSysConnectAudio( h, ai0p, "out", mi0p, "in");
223
+  cmDspSysConnectAudio( h, ai1p, "out", mi1p, "in");
224
+  cmDspSysConnectAudio( h, ai2p, "out", mi2p, "in");
225
+  cmDspSysConnectAudio( h, ai3p, "out", mi3p, "in");
226
+
227
+
228
+  cmDspSysConnectAudio(h, ai0p, "out", mx0p, "in-0" );  // eqmix -> input mix
229
+  cmDspSysConnectAudio(h, ai1p, "out", mx1p, "in-0" );
230
+  cmDspSysConnectAudio(h, ai2p, "out", mx0p, "in-1" );
231
+  cmDspSysConnectAudio(h, ai3p, "out", mx1p, "in-1" );
232
+
233
+  cmDspSysConnectAudio(h, mx0p,  "out", rpp,   "in-0");    // sw  -> rcdply
234
+
235
+
236
+  cmDspSysConnectAudio(h, mx0p,   "out",   c0.kr0, "in" ); // ain -> sw
237
+
238
+
239
+  cmDspSysConnectAudio(h, c0.cmp, "out", apf0, "in" );
240
+  cmDspSysConnectAudio(h, c0.cmp, "out", apf2, "in" );
241
+  cmDspSysConnectAudio(h, apf0,  "out", ao0p,  "in" );
242
+  cmDspSysConnectAudio(h, apf2,  "out", ao2p,  "in" );
243
+
244
+
245
+  cmDspSysConnectAudio(h, mx1p,  "out", rpp,   "in-1");    // sw  -> rcdply
246
+
247
+  cmDspSysConnectAudio(h, mx1p,   "out",   c1.kr0, "in" ); // ain -> sw
248
+
249
+
250
+  cmDspSysConnectAudio(h, c1.cmp, "out",   apf1,  "in" );   // cmp -> mix 0
251
+  cmDspSysConnectAudio(h, c1.cmp, "out",   apf3,  "in" );   // cmp -> mix 0
252
+  cmDspSysConnectAudio(h, apf1,  "out",   ao1p,   "in" );
253
+  cmDspSysConnectAudio(h, apf3,  "out",   ao3p,   "in" );
254
+
255
+  cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" );    // comp -> audio_file_out
256
+  cmDspSysConnectAudio(h, c1.cmp, "out", afop, "in1" );
257
+
258
+  //cmDspSysConnectAudio(h, ai0p, "out", afop, "in0" );    // comp -> audio_file_out
259
+  //cmDspSysConnectAudio(h, ai1p, "out", afop, "in1" );
260
+
261
+  //cmDspSysConnectAudio(h, ai0p, "out", ao2p, "in" );     // direct through from input to 
262
+  //cmDspSysConnectAudio(h, ai1p, "out", ao3p, "in" );     //    output chs 2&3
263
+
264
+
265
+
266
+
267
+  cmDspSysInstallCb( h, clrBtn, "sym",    amp, "cmd",   NULL ); // clear active meas.
268
+  cmDspSysInstallCb( h, prtBtn, "sym",    amp, "cmd",   NULL ); // print active meas
269
+  cmDspSysInstallCb( h, prtBtn, "sym",    scp, "cmd",   NULL ); 
270
+  cmDspSysInstallCb( h, amCmd, "add",     amp, "cmd",   NULL ); // add active meas
271
+  cmDspSysInstallCb( h, amCmd, "rewind",  amp, "cmd",   NULL ); // rewind active meas
272
+  cmDspSysInstallCb( h, mlst,   "loc",    amp, "loc",   NULL ); // recorded meas's list to active meas unit
273
+  cmDspSysInstallCb( h, mlst,   "typeId", amp, "type",  NULL ); //
274
+  cmDspSysInstallCb( h, mlst,   "val",    amp, "val",   NULL ); //
275
+  cmDspSysInstallCb( h, mlst,   "cost",   amp, "cst",   NULL ); // 
276
+  cmDspSysInstallCb( h, mlst,   "typeId", amCmd, "add", NULL ); //
277
+  cmDspSysInstallCb( h, sfp,    "out",    amRt, "f-in", NULL ); // sfp-active meas router (rtr is switched by live btn)
278
+  cmDspSysInstallCb( h, amRt,   "f-out-0",amp, "sfloc", NULL ); 
279
+
280
+  cmDspSysInstallCb( h, sfp, "vloc", amp,   "loc",  NULL ); // live meas's to active meas unit
281
+  cmDspSysInstallCb( h, sfp, "vval", amp,   "val",  NULL ); //
282
+  cmDspSysInstallCb( h, sfp, "vcost",amp,   "cst",  NULL ); //
283
+  cmDspSysInstallCb( h, sfp, "vtyp", amp,   "type", NULL ); //
284
+  cmDspSysInstallCb( h, sfp, "vtyp", amCmd, "add",  NULL);  //
285
+
286
+  // ***** delete this to prevent the score follower from driving the active-measure unit in 'live' mode
287
+  cmDspSysInstallCb( h, amRt,   "f-out-1",amp, "sfloc", NULL );
288
+  // *****
289
+
290
+  // active measure loc to xfad channel trigger
291
+  cmDspSysInstallCb( h, amp,    "scloc",  c0.achan,   "trig", NULL );  // See Also: modp.sw ->achan.trig
292
+
293
+  cmDspSysInstallCb( h, amp,    "scloc",  c1.achan,   "trig", NULL );
294
+
295
+  cmDspSysInstallCb( h, amp,    "even",   pre,        "in",   NULL );  // active meas output to printers
296
+  cmDspSysInstallCb( h, amp,    "dyn",    prd,        "in",   NULL );
297
+  cmDspSysInstallCb( h, amp,    "tempo",  prt,        "in",   NULL );
298
+  cmDspSysInstallCb( h, amp,    "cost",   prc,        "in",   NULL );
299
+
300
+  // wave-table to time-line cursor
301
+  //cmDspSysInstallCb(   h, wtp, "fidx",tlp,  "curs", NULL); 
302
+
303
+  cmDspSysInstallCb(h, prePath, "out", tlp, "path", NULL );
304
+
305
+  // 'live' button -> live router selector switch 
306
+  //cmDspSysInstallCb(h, liveb, "out",  wtRt, "sel", NULL );
307
+  cmDspSysInstallCb(h, liveb, "out",  tlRt, "sel", NULL );
308
+  cmDspSysInstallCb(h, liveb, "out",  mfpRt,"sel", NULL );
309
+  cmDspSysInstallCb(h, liveb, "out",  amRt, "sel", NULL );
310
+  cmDspSysInstallCb(h, liveb, "out",  au0Sw, "chidx", NULL );
311
+  cmDspSysInstallCb(h, liveb, "out",  au1Sw, "chidx", NULL );
312
+  cmDspSysInstallCb(h, liveb, "out",  measb, "in",     NULL );
313
+  cmDspSysInstallCb(h, measb, "out",  sfp,   "measfl", NULL );
314
+
315
+  // 'simulate' button -> simulate router selector switch
316
+  cmDspSysInstallCb(h, simb,  "out",  ainb,  "in", NULL );
317
+  cmDspSysInstallCb(h, ainb,  "out",  au0Sw, "chidx", NULL );
318
+  cmDspSysInstallCb(h, ainb,  "out",  au1Sw, "chidx", NULL );
319
+  cmDspSysInstallCb(h, simb,  "out",  siRt,  "sel", NULL );
320
+  cmDspSysInstallCb(h, simb,  "out",  muRt,  "sel", NULL );
321
+  cmDspSysInstallCb(h, simb,  "out",  d1Rt,  "sel", NULL );
322
+  cmDspSysInstallCb(h, simb,  "out",  d0Rt,  "sel", NULL );
323
+  cmDspSysInstallCb(h, simb,  "out",  stRt,  "sel", NULL );
324
+  
325
+  
326
+  // start connections
327
+  cmDspSysInstallCb(h, onb,  "sym",    tlRt, "s-in",  NULL );
328
+  cmDspSysInstallCb(h, tlRt, "s-out-0",tlp,  "reset", NULL );
329
+  cmDspSysInstallCb(h, onb,  "sym",    scp,  "send",  NULL );
330
+  cmDspSysInstallCb(h, onb,  "sym",    mfpRt,"s-in",  NULL );
331
+  cmDspSysInstallCb(h, mfpRt,"s-out-0",mfp,  "sel",   NULL );
332
+
333
+  cmDspSysInstallCb(h, onb, "sym",     pts,   "on",    NULL );
334
+  //cmDspSysInstallCb(h, pts, "on",      wtRt,  "s-in",  NULL );
335
+  //cmDspSysInstallCb(h, wtRt,"s-out-0", wtp,   "cmd",   NULL );
336
+  cmDspSysInstallCb(h, pts, "on",      modp,  "cmd",   NULL );
337
+  cmDspSysInstallCb(h, pts, "on",      modr,  "cmd",   NULL );
338
+  cmDspSysInstallCb(h, pts, "on",      rpp,   "cmd",   NULL );
339
+  cmDspSysInstallCb(h, onb, "sym",     amCmd, "rewind",NULL );
340
+  cmDspSysInstallCb(h, onb, "out",     c0.achan,"reset",  NULL );
341
+  cmDspSysInstallCb(h, onb, "out",     c1.achan,"reset",  NULL );
342
+
343
+  // stop connections
344
+  //cmDspSysInstallCb(h, wtp,  "done",offb,"in",  NULL ); // 'done' from WT simulates pressing Stop btn.
345
+  cmDspSysInstallCb(h, tlp,  "mfn", pts, "off", NULL ); // Prevents WT start on new audio file from TL.
346
+  cmDspSysInstallCb(h, offb, "sym", mfp, "sel", NULL ); 
347
+  cmDspSysInstallCb(h, offb, "sym", pts, "off", NULL );
348
+  //cmDspSysInstallCb(h, pts,  "off", wtp, "cmd", NULL );
349
+  cmDspSysInstallCb(h, pts,  "off", modp,"cmd", NULL );
350
+  cmDspSysInstallCb(h, pts,  "off", modr,"cmd", NULL );
351
+  cmDspSysInstallCb(h, offb, "sym", mop, "reset", NULL );
352
+  cmDspSysInstallCb(h, offb, "sym", mo2p, "reset", NULL );
353
+
354
+
355
+  // time-line to wave-table selection 
356
+  //cmDspSysInstallCb(h, tlp, "absi", wtp, "beg", NULL );  
357
+  //cmDspSysInstallCb(h, tlp, "aesi", wtp, "end", NULL );
358
+  //cmDspSysInstallCb(h, tlp, "afn",  wtp, "fn",  NULL );
359
+
360
+  // time-line to MIDI file player selection
361
+  cmDspSysInstallCb(h, tlp, "mbsi", mfp, "bsi",   NULL );
362
+  cmDspSysInstallCb(h, tlp, "mesi", mfp, "esi",   NULL );
363
+  cmDspSysInstallCb(h, tlp, "mfn",  mfp, "fn",    NULL );
364
+  
365
+  // score to score follower - to set initial search location
366
+  cmDspSysInstallCb(h, scp, "sel",    sfp, "index",  NULL );
367
+  cmDspSysInstallCb(h, scp, "sel",    modp,"reset", NULL );
368
+  cmDspSysInstallCb(h, scp, "sel",    modr,"reset", NULL );
369
+  cmDspSysInstallCb(h, scp, "sel",    rpp, "initIdx", NULL );
370
+  cmDspSysInstallCb(h, scp, "sel",    prp, "in", NULL );
371
+
372
+  // NOTE: THIS IS A DUPLICATE OF THE scp.sel CONNECTIONS
373
+  /*
374
+    cmDspSysInstallCb(h, scLoc, "val",    sfp, "index",  NULL );
375
+    cmDspSysInstallCb(h, scLoc, "val",    modp,"reset", NULL );
376
+    cmDspSysInstallCb(h, scLoc, "val",    modr,"reset", NULL );
377
+    cmDspSysInstallCb(h, scLoc, "val",    rpp, "initIdx", NULL );
378
+    cmDspSysInstallCb(h, scLoc, "val",    prp, "in", NULL );
379
+  */
380
+
381
+  //cmDspSysInstallCb(h, reload,"out",  modp, "reload", NULL );
382
+
383
+
384
+  // MIDI file player to score follower
385
+  cmDspSysInstallCb(h, mfp,  "smpidx",  siRt, "f-in",NULL );
386
+  cmDspSysInstallCb(h, siRt, "f-out-1", sfp,  "smpidx",NULL ); 
387
+  // leave siRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
388
+
389
+  cmDspSysInstallCb(h, mfp,  "id",      muRt, "f-in",  NULL );
390
+  cmDspSysInstallCb(h, muRt, "f-out-1", sfp,  "muid",    NULL );
391
+  // leave muRt.f-out-1 unconnected because it should be ignored in 'simulate mode'
392
+
393
+  cmDspSysInstallCb(h, mfp,  "d1",      d1Rt, "f-in",  NULL );
394
+  cmDspSysInstallCb(h, d1Rt, "f-out-1", sfp,  "d1",    NULL );
395
+  cmDspSysInstallCb(h, d1Rt, "f-out-1", nmp,  "d1",    NULL );
396
+  cmDspSysInstallCb(h, nmp,   "d1",     mop,  "d1",    NULL );
397
+  cmDspSysInstallCb(h, nmp,   "d1",     mo2p,  "d1",    NULL );
398
+
399
+  cmDspSysInstallCb(h, mfp,  "d0",      d0Rt,  "f-in", NULL );
400
+  cmDspSysInstallCb(h, d0Rt, "f-out-1", sfp,   "d0",   NULL );
401
+  cmDspSysInstallCb(h, d0Rt, "f-out-1", nmp,  "d0",   NULL );
402
+  cmDspSysInstallCb(h, nmp,  "d0",      mop,  "d0",   NULL );
403
+  cmDspSysInstallCb(h, nmp,  "d0",      mo2p,  "d0",   NULL );
404
+
405
+  cmDspSysInstallCb(h, mfp, "status",   stRt, "f-in",  NULL );
406
+  cmDspSysInstallCb(h, stRt, "f-out-1", sfp,  "status",NULL );
407
+  cmDspSysInstallCb(h, stRt, "f-out-1", nmp,  "status",NULL );
408
+  cmDspSysInstallCb(h, nmp,  "status",  mop,  "status",NULL );
409
+  cmDspSysInstallCb(h, nmp,  "status",  mo2p,  "status",NULL );
410
+
411
+
412
+  // MIDI input port
413
+  //cmDspSysInstallCb(h, mip, "smpidx", sfp, "smpidx", NULL );
414
+  //cmDspSysInstallCb(h, mip, "d1",     sfp, "d1",     NULL );
415
+  //cmDspSysInstallCb(h, mip, "d0",     sfp, "d0",     NULL );
416
+  //cmDspSysInstallCb(h, mip, "status", sfp, "status", NULL );
417
+
418
+  // score follower to recd_play,modulator and printers
419
+  //cmDspSysInstallCb(h, sfp, "out",     rpp,     "index", NULL );
420
+  cmDspSysInstallCb(h, sfp, "out",     modp,    "index", NULL );
421
+  //cmDspSysInstallCb(h, sfp, "out",     modr,    "index", NULL );
422
+  cmDspSysInstallCb(h, sfp, "recent",  prp,     "in",  NULL );  // report 'recent' but only act on 'max' loc index
423
+
424
+  //cmDspSysInstallCb(h, prtb, "sym", sfp, "cmd", NULL );
425
+  //cmDspSysInstallCb(h, qtb,  "sym", sfp, "cmd", NULL );
426
+
427
+
428
+  cmDspSysInstallCb(   h, lasecs, "val", rpp, "curla", NULL ); // recd/play control
429
+  cmDspSysInstallCb(   h, dbpsec, "val", rpp, "frate", NULL );
430
+
431
+  cmDspSysInstallCb(h, igain0, "val", ai0p, "gain", NULL );   // input gain control
432
+  cmDspSysInstallCb(h, igain1, "val", ai1p, "gain", NULL );
433
+  cmDspSysInstallCb(h, igain2, "val", ai2p, "gain", NULL );   // input gain control
434
+  cmDspSysInstallCb(h, igain3, "val", ai3p, "gain", NULL );
435
+
436
+  cmDspSysInstallCb(h, apfByp, "out", apf0, "bypass", NULL );   // APF bypass
437
+  cmDspSysInstallCb(h, apfByp, "out", apf1, "bypass", NULL );   // 
438
+  cmDspSysInstallCb(h, apfByp, "out", apf2, "bypass", NULL );   // 
439
+  cmDspSysInstallCb(h, apfByp, "out", apf3, "bypass", NULL );   // 
440
+
441
+
442
+  cmDspSysInstallCb(h, ogain0, "val", ao0p, "gain", NULL );   // output gain control
443
+  cmDspSysInstallCb(h, ogain1, "val", ao1p, "gain", NULL );
444
+  cmDspSysInstallCb(h, ogain2, "val", ao2p, "gain", NULL );
445
+  cmDspSysInstallCb(h, ogain3, "val", ao3p, "gain", NULL );
446
+
447
+
448
+
449
+
450
+  return rc;
451
+}
452
+
453
+
454
+//------------------------------------------------------------------------------
455
+//)

+ 1185
- 0
dsp/cmDspPgmKrTksb.c
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


Loading…
Откажи
Сачувај