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
 
36
 
37
 #include "cmDspPgmKrChain.h"
37
 #include "cmDspPgmKrChain.h"
38
 
38
 
39
-#undef KR2
39
+#define KR2
40
 
40
 
41
 
41
 
42
 cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
42
 cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
335
   cmDspSysInstallCb(h, xfadMs, "val", xfad, "ms", NULL );
335
   cmDspSysInstallCb(h, xfadMs, "val", xfad, "ms", NULL );
336
   cmDspSysInstallCb(h, modp, mlbl("xfad"), xfadMs,  "val", NULL);
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
   // TODO: FIX THIS: can't send window length (e.g. 1024,2048, ... ) to a 'MsgList' with 4 elements
343
   // TODO: FIX THIS: can't send window length (e.g. 1024,2048, ... ) to a 'MsgList' with 4 elements
339
   // since it expects an index betweeen 0 and 3.  CRASH!
344
   // since it expects an index betweeen 0 and 3.  CRASH!
340
   //cmDspSysInstallCb(h, modp, mlbl("win"),  wnd_ctl, "sel",  NULL );
345
   //cmDspSysInstallCb(h, modp, mlbl("win"),  wnd_ctl, "sel",  NULL );
525
   cmDspInst_t* xfadMs = cmDspSysAllocInst(h,"Scalar", lbl("Xfade Ms"),     5, kNumberDuiId, 0.0,   1000.0,0.01, 50.0 );  
530
   cmDspInst_t* xfadMs = cmDspSysAllocInst(h,"Scalar", lbl("Xfade Ms"),     5, kNumberDuiId, 0.0,   1000.0,0.01, 50.0 );  
526
   cmDspSysInstallCb(h, xfadMs, "val", xfad, "ms", NULL );
531
   cmDspSysInstallCb(h, xfadMs, "val", xfad, "ms", NULL );
527
   cmDspSysInstallCb(h, modp, mlbl("xfad"), xfadMs,  "val", NULL);
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
   cmDspSysInstallCb(h, modp, mlbl("win"),  wnd_ctl, "sel",  NULL );
537
   cmDspSysInstallCb(h, modp, mlbl("win"),  wnd_ctl, "sel",  NULL );
530
   cmDspSysInstallCb(h, modp, mlbl("hop"),  hop_ctl, "sel",  NULL );
538
   cmDspSysInstallCb(h, modp, mlbl("hop"),  hop_ctl, "sel",  NULL );

Loading…
Cancel
Save