Bladeren bron

cmDspPgmKrChain2.c,cmDspPgmKrTimeLineLiteAf.c : many changes to refine output.

master
kevin 4 jaren geleden
bovenliggende
commit
4edc0c968d
2 gewijzigde bestanden met toevoegingen van 37 en 23 verwijderingen
  1. 13
    4
      src/dsp/cmDspPgmKrChain2.c
  2. 24
    19
      src/dsp/cmDspPgmKrTimeLineLiteAf.c

+ 13
- 4
src/dsp/cmDspPgmKrChain2.c Bestand weergeven

105
   unsigned paramRtChCnt = 2;
105
   unsigned paramRtChCnt = 2;
106
   cmDspInst_t* wnd_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
106
   cmDspInst_t* wnd_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
107
   cmDspInst_t* hop_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
107
   cmDspInst_t* hop_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
108
+  cmDspInst_t* ign_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
108
   cmDspInst_t* cel_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
109
   cmDspInst_t* cel_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
109
   cmDspInst_t* exp_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
110
   cmDspInst_t* exp_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
110
   cmDspInst_t* mix_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
111
   cmDspInst_t* mix_rt   = cmDspSysAllocInst(h, "Router",      NULL,  2,  paramRtChCnt, paramRtChCnt-1 );
118
   cmDspInst_t* kr1  = cmDspSysAllocInst(h, "Kr2",        NULL,   2, krWndSmpCnt, krHopFact );
119
   cmDspInst_t* kr1  = cmDspSysAllocInst(h, "Kr2",        NULL,   2, krWndSmpCnt, krHopFact );
119
   cmDspInst_t* xfad = cmDspSysAllocInst(h, "Xfader",     NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
120
   cmDspInst_t* xfad = cmDspSysAllocInst(h, "Xfader",     NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
120
   cmDspInst_t* mix  = cmDspSysAllocInst(h, "AMix",       NULL,   3, xfadeChCnt,  mixGain, mixGain );
121
   cmDspInst_t* mix  = cmDspSysAllocInst(h, "AMix",       NULL,   3, xfadeChCnt,  mixGain, mixGain );
121
-  cmDspInst_t* cmp  = cmDspSysAllocInst(h, "Compressor", NULL,   8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs ); 
122
+  cmDspInst_t* cmp  = cmDspSysAllocInst(h, "Compressor", NULL,   8, cmpBypassFl, cmpThreshDb, cmpRatio_num, cmpAtkMs, cmpRlsMs, cmpMakeup, cmpWndMs, cmpWndMaxMs );
123
+
124
+  
122
 
125
 
123
   // Internal audio connections
126
   // Internal audio connections
124
   cmDspSysConnectAudio(h, kr0,  "out",   xfad, "in-0");
127
   cmDspSysConnectAudio(h, kr0,  "out",   xfad, "in-0");
158
   cmDspSysNewColumn(h,0);
161
   cmDspSysNewColumn(h,0);
159
   cmDspInst_t* wnd_ctl = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, lbl("WndSmpCnt"), NULL, "wndSmpCnt", 2);
162
   cmDspInst_t* wnd_ctl = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, lbl("WndSmpCnt"), NULL, "wndSmpCnt", 2);
160
   cmDspInst_t* hop_ctl = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, lbl("HopFact"),   NULL, "hopFact",   2);
163
   cmDspInst_t* hop_ctl = cmDspSysAllocMsgListP(h,preGrpSymId,NULL, lbl("HopFact"),   NULL, "hopFact",   2);
164
+  cmDspInst_t* ign_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("In Gain"),   0.0,  10.0, 0.001, 1.0 );
161
   cmDspInst_t* cel_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Ceiling"),   0.0, 100.0, 0.1,  30.0 );
165
   cmDspInst_t* cel_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Ceiling"),   0.0, 100.0, 0.1,  30.0 );
162
   cmDspInst_t* exp_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Expo"),    -10.0,  10.0, 0.01,  2.0 );
166
   cmDspInst_t* exp_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Expo"),    -10.0,  10.0, 0.01,  2.0 );
163
   cmDspInst_t* mix_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Mix"),       0.0,   1.0, 0.01,  0.0 );    
167
   cmDspInst_t* mix_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Mix"),       0.0,   1.0, 0.01,  0.0 );    
166
   cmDspInst_t* lwr_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Lwr slope"), 0.3,  10.0, 0.01,  2.0 );
170
   cmDspInst_t* lwr_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Lwr slope"), 0.3,  10.0, 0.01,  2.0 );
167
   cmDspInst_t* wet_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Wet Dry"),   0.0,   1.0, 0.001, 1.0 );
171
   cmDspInst_t* wet_ctl = cmDspSysAllocScalarP( h,preGrpSymId,NULL, lbl("Wet Dry"),   0.0,   1.0, 0.001, 1.0 );
168
 
172
 
169
-  
170
   cmDspSysInstallCb(h, wnd_ctl, "out",         wnd_rt, "f-in",    NULL );
173
   cmDspSysInstallCb(h, wnd_ctl, "out",         wnd_rt, "f-in",    NULL );
171
   cmDspSysInstallCb(h, achan,   "ch",          wnd_rt, "sel",     NULL );   // ach->rt sel
174
   cmDspSysInstallCb(h, achan,   "ch",          wnd_rt, "sel",     NULL );   // ach->rt sel
172
   cmDspSysInstallCb(h, wnd_rt,  "f-out-0",     kr0,    "wndn",    NULL );   // wndn->kr
175
   cmDspSysInstallCb(h, wnd_rt,  "f-out-0",     kr0,    "wndn",    NULL );   // wndn->kr
176
   cmDspSysInstallCb(h, achan,   "ch",          hop_rt, "sel",     NULL );   // ach->rt sel
179
   cmDspSysInstallCb(h, achan,   "ch",          hop_rt, "sel",     NULL );   // ach->rt sel
177
   cmDspSysInstallCb(h, hop_rt,  "f-out-0",     kr0,    "hopf",    NULL );   // hopf->kr
180
   cmDspSysInstallCb(h, hop_rt,  "f-out-0",     kr0,    "hopf",    NULL );   // hopf->kr
178
   cmDspSysInstallCb(h, hop_rt,  "f-out-1",     kr1,    "hopf",    NULL );   // hopf->kr
181
   cmDspSysInstallCb(h, hop_rt,  "f-out-1",     kr1,    "hopf",    NULL );   // hopf->kr
179
-  
182
+
183
+  cmDspSysInstallCb(h, ign_ctl,     "val",     ign_rt, "f-in",    NULL );
184
+  cmDspSysInstallCb(h, achan,       "ch",      ign_rt, "sel",     NULL );   // ach->rt sel
185
+  cmDspSysInstallCb(h, ign_rt,      "f-out-0", kr0,    "igain",   NULL );   // ign->kr
186
+  cmDspSysInstallCb(h, ign_rt,      "f-out-1", kr1,    "igain",   NULL );   // ign->kr
187
+    
180
   cmDspSysInstallCb(h, thr_ctl,     "val",     thr_rt, "f-in",    NULL );
188
   cmDspSysInstallCb(h, thr_ctl,     "val",     thr_rt, "f-in",    NULL );
181
   cmDspSysInstallCb(h, achan,       "ch",      thr_rt, "sel",     NULL );   // ach->rt sel
189
   cmDspSysInstallCb(h, achan,       "ch",      thr_rt, "sel",     NULL );   // ach->rt sel
182
   cmDspSysInstallCb(h, thr_rt,      "f-out-0", kr0,    "thrh",    NULL );   // thr->kr
190
   cmDspSysInstallCb(h, thr_rt,      "f-out-0", kr0,    "thrh",    NULL );   // thr->kr
260
 
268
 
261
   
269
   
262
   cmDspSysInstallCb(h, modp, mlbl("hop"),  hop_ctl, "sel", NULL );
270
   cmDspSysInstallCb(h, modp, mlbl("hop"),  hop_ctl, "sel", NULL );
271
+  cmDspSysInstallCb(h, modp, mlbl("ign"),  ign_ctl, "val", NULL );
263
   cmDspSysInstallCb(h, modp, mlbl("ceil"), cel_ctl, "val", NULL );
272
   cmDspSysInstallCb(h, modp, mlbl("ceil"), cel_ctl, "val", NULL );
264
   cmDspSysInstallCb(h, modp, mlbl("expo"), exp_ctl, "val", NULL );
273
   cmDspSysInstallCb(h, modp, mlbl("expo"), exp_ctl, "val", NULL );
265
   cmDspSysInstallCb(h, modp, mlbl("mix"),  mix_ctl, "val", NULL );
274
   cmDspSysInstallCb(h, modp, mlbl("mix"),  mix_ctl, "val", NULL );
267
   cmDspSysInstallCb(h, modp, mlbl("upr"),  upr_ctl, "val", NULL );
276
   cmDspSysInstallCb(h, modp, mlbl("upr"),  upr_ctl, "val", NULL );
268
   cmDspSysInstallCb(h, modp, mlbl("lwr"),  lwr_ctl, "val", NULL );
277
   cmDspSysInstallCb(h, modp, mlbl("lwr"),  lwr_ctl, "val", NULL );
269
   cmDspSysInstallCb(h, modp, mlbl("wet"),  wet_ctl, "val", NULL );
278
   cmDspSysInstallCb(h, modp, mlbl("wet"),  wet_ctl, "val", NULL );
270
-  cmDspSysInstallCb(h, modp, mlbl("sw"),   achan,       "trig", NULL ); // See also: amp.sfloc->achan.trig
279
+  cmDspSysInstallCb(h, modp, mlbl("sw"),   achan,  "trig", NULL ); // See also: amp.sfloc->achan.trig
271
 
280
 
272
   
281
   
273
   c->achan = achan; 
282
   c->achan = achan; 

+ 24
- 19
src/dsp/cmDspPgmKrTimeLineLiteAf.c Bestand weergeven

83
   unsigned   cmpPreGrpSymId  = cmDspSysPresetRegisterGroup(h,"tl_cmp"); 
83
   unsigned   cmpPreGrpSymId  = cmDspSysPresetRegisterGroup(h,"tl_cmp"); 
84
 
84
 
85
   cmDspTlXform_t c0,c1;
85
   cmDspTlXform_t c0,c1;
86
+  memset(&c0,0,sizeof(c0));
87
+  memset(&c1,0,sizeof(c1));
88
+    
86
 
89
 
87
   cmDspSysNewPage(h,"Controls-0");
90
   cmDspSysNewPage(h,"Controls-0");
88
   _cmDspSys_TlXformChain(h, &c0, preGrpSymId, cmpPreGrpSymId, amp, modp, 0, 0 );
91
   _cmDspSys_TlXformChain(h, &c0, preGrpSymId, cmpPreGrpSymId, amp, modp, 0, 0 );
121
   cmDspInst_t* ogainW = cmDspSysAllocInst(h,"Scalar", "Wet Master",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
124
   cmDspInst_t* ogainW = cmDspSysAllocInst(h,"Scalar", "Wet Master",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
122
   cmDspInst_t* ogainD = cmDspSysAllocInst(h,"Scalar", "Dry Master",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
125
   cmDspInst_t* ogainD = cmDspSysAllocInst(h,"Scalar", "Dry Master",   5, kNumberDuiId, 0.0,   10.0,0.01,   1.0 );  
123
 
126
 
124
-  cmDspInst_t* gmult0  = cmDspSysAllocInst(h,"ScalarOp", NULL, 6, 2, "*", "in-0", 1.0, "in-1", 1.0 );
125
-  cmDspInst_t* gmult1  = cmDspSysAllocInst(h,"ScalarOp", NULL, 6, 2, "*", "in-0", 1.0, "in-1", 1.0 );
126
-  cmDspInst_t* gmult2  = cmDspSysAllocInst(h,"ScalarOp", NULL, 6, 2, "*", "in-0", 1.0, "in-1", 1.0 );
127
-  cmDspInst_t* gmult3  = cmDspSysAllocInst(h,"ScalarOp", NULL, 6, 2, "*", "in-0", 1.0, "in-1", 1.0 );
127
+  cmDspInst_t* gmult0  = cmDspSysAllocInst(h,"ScalarOp", NULL, 6, 2, "*$", "in-0", 1.0, "in-1", 1.0 );
128
+  cmDspInst_t* gmult1  = cmDspSysAllocInst(h,"ScalarOp", NULL, 6, 2, "*$", "in-0", 1.0, "in-1", 1.0 );
129
+  cmDspInst_t* gmult2  = cmDspSysAllocInst(h,"ScalarOp", NULL, 6, 2, "*$", "in-0", 1.0, "in-1", 1.0 );
130
+  cmDspInst_t* gmult3  = cmDspSysAllocInst(h,"ScalarOp", NULL, 6, 2, "*$", "in-0", 1.0, "in-1", 1.0 );
128
   
131
   
129
  
132
  
130
   
133
   
136
   cmDspInst_t* mi0p    = cmDspSysAllocInst(h,"AMeter","In 0",  0);
139
   cmDspInst_t* mi0p    = cmDspSysAllocInst(h,"AMeter","In 0",  0);
137
   cmDspInst_t* mi1p    = cmDspSysAllocInst(h,"AMeter","In 1",  0);
140
   cmDspInst_t* mi1p    = cmDspSysAllocInst(h,"AMeter","In 1",  0);
138
 
141
 
139
-  cmDspInst_t* meas     = cmDspSysAllocInst(h,"Scalar", "Begin Meas", 5, kNumberDuiId, 1.0, 1000.0, 1.0, 1.0 );  
140
-  cmDspInst_t* emeas    = cmDspSysAllocInst(h,"Scalar", "End   Meas", 5, kNumberDuiId, 1.0, 1000.0, 1.0, 1.0 );  
142
+  cmDspInst_t* meas    = cmDspSysAllocInst(h,"Scalar", "Begin Meas", 5, kNumberDuiId, 1.0, 1000.0, 1.0, 1.0 );  
143
+  cmDspInst_t* eloc    = cmDspSysAllocInst(h,"Scalar", "End   Loc",  5, kNumberDuiId, 1.0, 1000.0, 1.0, 1.0 );
144
+  cmDspInst_t* sfp_loc = cmDspSysAllocInst(h,"Label",  NULL, 1, "sf loc:");
145
+
141
   cmDspSysInstallCb( h, meas, "val", scp, "meas", NULL);
146
   cmDspSysInstallCb( h, meas, "val", scp, "meas", NULL);
142
   cmDspSysInstallCb( h, meas, "val", tlp, "meas", NULL);
147
   cmDspSysInstallCb( h, meas, "val", tlp, "meas", NULL);
143
   
148
   
323
 
328
 
324
   // score follower to recd_play,modulator and printers
329
   // score follower to recd_play,modulator and printers
325
   cmDspSysInstallCb(h, sfp, "out",     modp,    "index", NULL );
330
   cmDspSysInstallCb(h, sfp, "out",     modp,    "index", NULL );
326
-  cmDspSysInstallCb(h, sfp, "recent",  prp,     "in",  NULL );  // report 'recent' but only act on 'max' loc index
331
+  cmDspSysInstallCb(h, sfp, "recent",  sfp_loc,   "in",  NULL );  // report 'recent' but only act on 'max' loc index
327
 
332
 
328
-  cmDspSysInstallCb( h, emeas, "val", its,  "off-int", NULL);
333
+  cmDspSysInstallCb( h, eloc , "val", its,  "off-int", NULL);
329
   cmDspSysInstallCb( h, sfp,   "out", its,  "in",  NULL);
334
   cmDspSysInstallCb( h, sfp,   "out", its,  "in",  NULL);
330
   cmDspSysInstallCb( h, its,   "out", offb, "in",  NULL);
335
   cmDspSysInstallCb( h, its,   "out", offb, "in",  NULL);
331
   cmDspSysInstallCb( h, its,   "out", prp, "in",  NULL);
336
   cmDspSysInstallCb( h, its,   "out", prp, "in",  NULL);
332
   
337
   
333
 
338
 
334
-  cmDspSysInstallCb(h, modp, "dgain0",  ogain0, "val",  NULL );
339
+  cmDspSysInstallCb(h, modp, "dgain0",  ogain0, "val",  NULL ); // mod -> ogain
335
   cmDspSysInstallCb(h, modp, "dgain1",  ogain1, "val",  NULL );
340
   cmDspSysInstallCb(h, modp, "dgain1",  ogain1, "val",  NULL );
336
   cmDspSysInstallCb(h, modp, "wgain0",  ogain2, "val",  NULL );
341
   cmDspSysInstallCb(h, modp, "wgain0",  ogain2, "val",  NULL );
337
   cmDspSysInstallCb(h, modp, "wgain1",  ogain3, "val",  NULL );
342
   cmDspSysInstallCb(h, modp, "wgain1",  ogain3, "val",  NULL );
338
 
343
 
339
 
344
 
340
-  cmDspSysInstallCb(h, ogain0,  "val", gmult0, "in-0", NULL );
341
-  cmDspSysInstallCb(h, ogainD,  "val", gmult0, "in-1", NULL );
342
-  
345
+  cmDspSysInstallCb(h, ogain0,  "val", gmult0, "in-0", NULL ); // ogain scalars -> gmult 0
343
   cmDspSysInstallCb(h, ogain1,  "val", gmult1, "in-0", NULL );
346
   cmDspSysInstallCb(h, ogain1,  "val", gmult1, "in-0", NULL );
344
-  cmDspSysInstallCb(h, ogainD,  "val", gmult1, "in-1", NULL );
345
-  
346
   cmDspSysInstallCb(h, ogain2,  "val", gmult2, "in-0", NULL );
347
   cmDspSysInstallCb(h, ogain2,  "val", gmult2, "in-0", NULL );
347
-  cmDspSysInstallCb(h, ogainW,  "val", gmult2, "in-1", NULL );
348
   cmDspSysInstallCb(h, ogain3,  "val", gmult3, "in-0", NULL );
348
   cmDspSysInstallCb(h, ogain3,  "val", gmult3, "in-0", NULL );
349
+  
350
+  cmDspSysInstallCb(h, ogainD,  "val", gmult0, "in-1", NULL ); // master scalars -> gmult 1
351
+  cmDspSysInstallCb(h, ogainD,  "val", gmult1, "in-1", NULL );
352
+  cmDspSysInstallCb(h, ogainW,  "val", gmult2, "in-1", NULL );
349
   cmDspSysInstallCb(h, ogainW,  "val", gmult3, "in-1", NULL );
353
   cmDspSysInstallCb(h, ogainW,  "val", gmult3, "in-1", NULL );
350
   
354
   
351
-  cmDspSysInstallCb(h, gmult0, "out", lmix, "gain-0", NULL );   // output gain control - dry 0
352
-  cmDspSysInstallCb(h, gmult1, "out", rmix, "gain-0", NULL );   //                       dry 1
353
-  cmDspSysInstallCb(h, gmult2, "out", lmix, "gain-1", NULL );   //                       wet 0
354
-  cmDspSysInstallCb(h, gmult3, "out", rmix, "gain-1", NULL );   //                       wet 1
355
+  cmDspSysInstallCb(h, gmult0, "out", lmix, "gain-0", NULL );   // gmult -> wdmix - l dry 
356
+  cmDspSysInstallCb(h, gmult1, "out", rmix, "gain-0", NULL );   //                  r dry
357
+  cmDspSysInstallCb(h, gmult2, "out", lmix, "gain-1", NULL );   //                  l wet
358
+  cmDspSysInstallCb(h, gmult3, "out", rmix, "gain-1", NULL );   //                  r wet
355
 
359
 
360
+  //cmDspSysInstallCb(h, gmult2, "out", prp, "in", NULL );
356
 
361
 
357
   return rc;
362
   return rc;
358
 }
363
 }

Laden…
Annuleren
Opslaan