Browse Source

cmDspPgmKrTimeLineLite.c : Added dry piano through and dry output gain controls.

master
kevin 8 years ago
parent
commit
32cb6cdc47
1 changed files with 46 additions and 37 deletions
  1. 46
    37
      dsp/cmDspPgmKrTimeLineLite.c

+ 46
- 37
dsp/cmDspPgmKrTimeLineLite.c View File

@@ -58,8 +58,8 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
58 58
   if( krLoadRsrc(h,&err,&r) != kOkDspRC )
59 59
     return rc;
60 60
 
61
-  cmDspInst_t* ai0p = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 0);
62
-  cmDspInst_t* ai1p = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 1);
61
+  cmDspInst_t* ai0 = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 0);
62
+  cmDspInst_t* ai1 = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 1);
63 63
   
64 64
   cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.tlPrefixPath );
65 65
   cmDspInst_t* scp  = cmDspSysAllocInst(h,"Score",       "sc",  1, r.scFn );
@@ -85,8 +85,10 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
85 85
   _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, modp, 1, 1 );
86 86
 
87 87
 
88
-  cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 2 );
89
-  cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 3 );
88
+  cmDspInst_t* ao0 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 4 ); // Piano     1 Output
89
+  cmDspInst_t* ao1 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 5 ); //           2
90
+  cmDspInst_t* ao2 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 2 ); // Transform 1 OUtput
91
+  cmDspInst_t* ao3 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 3 ); //           2
90 92
 
91 93
   cmDspSysNewPage(h,"Main");
92 94
   cmDspInst_t* onb  = cmDspSysAllocInst(h,"Button", "start",   2, kButtonDuiId, 1.0 );
@@ -107,8 +109,10 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
107 109
   cmDspInst_t* igain1 = cmDspSysAllocInst(h,"Scalar", "In Gain-1",    5, kNumberDuiId, 0.0,   100.0,0.01,   1.0 );  
108 110
 
109 111
   //cmDspSysNewColumn(h,0);
110
-  cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Out Gain-0",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
111
-  cmDspInst_t* ogain1 = cmDspSysAllocInst(h,"Scalar", "Out Gain-1",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
112
+  cmDspInst_t* ogain0 = cmDspSysAllocInst(h,"Scalar", "Dry Out Gain-0",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
113
+  cmDspInst_t* ogain1 = cmDspSysAllocInst(h,"Scalar", "Dry Out Gain-1",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
114
+  cmDspInst_t* ogain2 = cmDspSysAllocInst(h,"Scalar", "Wet Out Gain-2",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
115
+  cmDspInst_t* ogain3 = cmDspSysAllocInst(h,"Scalar", "Wet Out Gain-3",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
112 116
 
113 117
   // Audio file recording
114 118
   cmDspInst_t* recdGain= cmDspSysAllocInst(h,"Scalar", "Recd Gain",  5, kNumberDuiId, 0.0,   100.0,0.01, 1.5 );  
@@ -152,25 +156,22 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
152 156
   cmDspSysInstallCb(h, recdChk, "out", recdPtS, "off",   NULL );
153 157
   cmDspSysInstallCb(h, recdPtS, "out", afop,    "sel",   NULL );
154 158
 
155
-
156 159
   // Audio connections
157
-  cmDspSysConnectAudio( h, ai0p,   "out", mi0p,   "in" );  //
158
-  cmDspSysConnectAudio( h, ai0p,   "out", c0.kr0, "in" );  // ain -> ch0.kr0
159
-  cmDspSysConnectAudio( h, ai0p,   "out", c0.kr1, "in" );  // ain -> ch0.kr1
160
-  cmDspSysConnectAudio( h, c0.cmp, "out", ao0p,   "in" );  // ch0.cmp -> aout
161
-  cmDspSysConnectAudio( h, c0.cmp, "out", afop,   "in0");  // ch0.cmp -> audio_file_out
162
-
163
-  cmDspSysConnectAudio( h, ai1p,   "out",   mi1p,   "in" );  //
164
-  cmDspSysConnectAudio( h, ai1p,   "out",   c1.kr0, "in" );  // ain -> ch1.kr0
165
-  cmDspSysConnectAudio( h, ai1p,   "out",   c1.kr1, "in" );  // ain -> ch1.kr1
166
-  cmDspSysConnectAudio( h, c1.cmp, "out",   ao1p,   "in" );  // ch1.cmp -> aout
167
-  cmDspSysConnectAudio( h, c1.cmp, "out",   afop,   "in1");  // ch1.cmp ->audio_file_out
160
+  cmDspSysConnectAudio( h, ai0,   "out", ao0,   "in" );  //  dry signal through 
161
+  cmDspSysConnectAudio( h, ai1,   "out", ao1,   "in" );  //
162
+  
163
+  cmDspSysConnectAudio( h, ai0,   "out", mi0p,   "in" );  //
164
+  cmDspSysConnectAudio( h, ai0,   "out", c0.kr0, "in" );  // ain -> ch0.kr0
165
+  cmDspSysConnectAudio( h, ai0,   "out", c0.kr1, "in" );  // ain -> ch0.kr1
166
+  cmDspSysConnectAudio( h, c0.cmp,"out", ao2,    "in" );  // ch0.cmp -> aout
167
+  cmDspSysConnectAudio( h, c0.cmp,"out", afop,   "in0");  // ch0.cmp -> audio_file_out
168
+
169
+  cmDspSysConnectAudio( h, ai1,   "out", mi1p,   "in" );  //
170
+  cmDspSysConnectAudio( h, ai1,   "out", c1.kr0, "in" );  // ain -> ch1.kr0
171
+  cmDspSysConnectAudio( h, ai1,   "out", c1.kr1, "in" );  // ain -> ch1.kr1
172
+  cmDspSysConnectAudio( h, c1.cmp,"out", ao3,    "in" );  // ch1.cmp -> aout
173
+  cmDspSysConnectAudio( h, c1.cmp,"out", afop,   "in1");  // ch1.cmp ->audio_file_out
168 174
   
169
-  //cmDspSysConnectAudio(h, ai0p, "out", afop, "in0" );    // comp -> audio_file_out
170
-  //cmDspSysConnectAudio(h, ai1p, "out", afop, "in1" );
171
-
172
-  //cmDspSysConnectAudio(h, ai0p, "out", ao0p, "in" );     // direct through from ain to aout
173
-  //cmDspSysConnectAudio(h, ai1p, "out", ao1p, "in" );     //    
174 175
 
175 176
 
176 177
   cmDspSysInstallCb( h, clrBtn, "sym",    amp, "cmd",   NULL ); // clear active meas.
@@ -215,19 +216,19 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
215 216
   cmDspSysInstallCb(h, onb,  "sym",    mfpRt,"s-in",  NULL );
216 217
   cmDspSysInstallCb(h, mfpRt,"s-out-0",mfp,  "sel",   NULL );
217 218
 
218
-  cmDspSysInstallCb(h, onb, "sym",     pts,   "on",    NULL );
219
-  cmDspSysInstallCb(h, pts, "on",      modp,  "cmd",   NULL );
220
-  cmDspSysInstallCb(h, onb, "sym",     amCmd, "rewind",NULL );
219
+  cmDspSysInstallCb(h, onb, "sym",     pts,     "on",     NULL );
220
+  cmDspSysInstallCb(h, pts, "on",      modp,    "cmd",    NULL );
221
+  cmDspSysInstallCb(h, onb, "sym",     amCmd,   "rewind", NULL );
221 222
   cmDspSysInstallCb(h, onb, "out",     c0.achan,"reset",  NULL );
222 223
   cmDspSysInstallCb(h, onb, "out",     c1.achan,"reset",  NULL );
223 224
 
224 225
   // stop connections
225
-  cmDspSysInstallCb(h, tlp,  "mfn", pts, "off", NULL ); // Prevents WT start on new audio file from TL.
226
-  cmDspSysInstallCb(h, offb, "sym", mfp, "sel", NULL ); 
227
-  cmDspSysInstallCb(h, offb, "sym", pts, "off", NULL );
228
-  cmDspSysInstallCb(h, pts,  "off", modp,"cmd", NULL );
226
+  cmDspSysInstallCb(h, tlp,  "mfn", pts, "off",   NULL ); // Prevents WT start on new audio file from TL.
227
+  cmDspSysInstallCb(h, offb, "sym", mfp, "sel",   NULL ); 
228
+  cmDspSysInstallCb(h, offb, "sym", pts, "off",   NULL );
229
+  cmDspSysInstallCb(h, pts,  "off", modp,"cmd",   NULL );
229 230
   cmDspSysInstallCb(h, offb, "sym", mop, "reset", NULL );
230
-  cmDspSysInstallCb(h, offb, "sym", mo2p, "reset", NULL );
231
+  cmDspSysInstallCb(h, offb, "sym", mo2p,"reset", NULL );
231 232
 
232 233
 
233 234
   // time-line to MIDI file player selection
@@ -236,9 +237,9 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
236 237
   cmDspSysInstallCb(h, tlp, "mfn",  mfp, "fn",    NULL );
237 238
   
238 239
   // score to score follower - to set initial search location
239
-  cmDspSysInstallCb(h, scp, "sel",    sfp, "index",  NULL );
240
+  cmDspSysInstallCb(h, scp, "sel",    sfp, "index", NULL );
240 241
   cmDspSysInstallCb(h, scp, "sel",    modp,"reset", NULL );
241
-  cmDspSysInstallCb(h, scp, "sel",    prp, "in", NULL );
242
+  cmDspSysInstallCb(h, scp, "sel",    prp, "in",    NULL );
242 243
 
243 244
   // MIDI file player to score follower and sampler
244 245
   cmDspSysInstallCb(h, mfp,  "smpidx",  sfp, "smpidx",NULL );
@@ -264,11 +265,19 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
264 265
   cmDspSysInstallCb(h, sfp, "out",     modp,    "index", NULL );
265 266
   cmDspSysInstallCb(h, sfp, "recent",  prp,     "in",  NULL );  // report 'recent' but only act on 'max' loc index
266 267
 
267
-  cmDspSysInstallCb(h, igain0, "val", ai0p, "gain", NULL );   // input gain control
268
-  cmDspSysInstallCb(h, igain1, "val", ai1p, "gain", NULL );
268
+  cmDspSysInstallCb(h, igain0, "val", ai0, "gain", NULL );   // input gain control
269
+  cmDspSysInstallCb(h, igain1, "val", ai1, "gain", NULL );
270
+
271
+
272
+  cmDspSysInstallCb(h, modp, "dgain0",  ogain0, "val",  NULL );
273
+  cmDspSysInstallCb(h, modp, "dgain1",  ogain1, "val",  NULL );
274
+  cmDspSysInstallCb(h, modp, "wgain0",  ogain2, "val",  NULL );
275
+  cmDspSysInstallCb(h, modp, "wgain1",  ogain3, "val",  NULL );
269 276
 
270
-  cmDspSysInstallCb(h, ogain0, "val", ao0p, "gain", NULL );   // output gain control
271
-  cmDspSysInstallCb(h, ogain1, "val", ao1p, "gain", NULL );
277
+  cmDspSysInstallCb(h, ogain0, "val", ao0, "gain", NULL );   // output gain control - dry 0
278
+  cmDspSysInstallCb(h, ogain1, "val", ao1, "gain", NULL );   //                       dry 1
279
+  cmDspSysInstallCb(h, ogain2, "val", ao2, "gain", NULL );   //                       wet 0
280
+  cmDspSysInstallCb(h, ogain3, "val", ao3, "gain", NULL );   //                       wet 1
272 281
 
273 282
 
274 283
   return rc;

Loading…
Cancel
Save