Browse Source

cmDspPgmKrChain.c : Added 'switch' button to force x-fader transition.

master
kevin 7 years ago
parent
commit
dbd448177c
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      dsp/cmDspPgmKrChain.c

+ 9
- 1
dsp/cmDspPgmKrChain.c View File

@@ -36,7 +36,7 @@
36 36
 
37 37
 #include "cmDspPgmKrChain.h"
38 38
 
39
-#undef KR2
39
+#define KR2
40 40
 
41 41
 
42 42
 cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
@@ -335,6 +335,11 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
335 335
   cmDspSysInstallCb(h, xfadMs, "val", xfad, "ms", NULL );
336 336
   cmDspSysInstallCb(h, modp, mlbl("xfad"), xfadMs,  "val", NULL);
337 337
 
338
+  cmDspInst_t* sw_btn = cmDspSysAllocButton( h, lbl("switch"), 0);
339
+  cmDspSysInstallCb( h, sw_btn, "sym",  achan, "trig", NULL ); 
340
+
341
+  
342
+  
338 343
   // TODO: FIX THIS: can't send window length (e.g. 1024,2048, ... ) to a 'MsgList' with 4 elements
339 344
   // since it expects an index betweeen 0 and 3.  CRASH!
340 345
   //cmDspSysInstallCb(h, modp, mlbl("win"),  wnd_ctl, "sel",  NULL );
@@ -525,6 +530,9 @@ void _cmDspSys_TlXformChain( cmDspSysH_t h, cmDspTlXform_t* c,  unsigned preGrpS
525 530
   cmDspInst_t* xfadMs = cmDspSysAllocInst(h,"Scalar", lbl("Xfade Ms"),     5, kNumberDuiId, 0.0,   1000.0,0.01, 50.0 );  
526 531
   cmDspSysInstallCb(h, xfadMs, "val", xfad, "ms", NULL );
527 532
   cmDspSysInstallCb(h, modp, mlbl("xfad"), xfadMs,  "val", NULL);
533
+  
534
+  cmDspInst_t* sw_btn = cmDspSysAllocButton( h, lbl("switch"), 0);
535
+  cmDspSysInstallCb( h, sw_btn, "sym",  achan, "trig", NULL ); 
528 536
 
529 537
   cmDspSysInstallCb(h, modp, mlbl("win"),  wnd_ctl, "sel",  NULL );
530 538
   cmDspSysInstallCb(h, modp, mlbl("hop"),  hop_ctl, "sel",  NULL );

Loading…
Cancel
Save