Skip to content

Commit 6bda8ca

Browse files
committed
Cleanup code, add stubs for more controls.
1 parent a5bf806 commit 6bda8ca

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

TouchOSC/TouchOSC.control.js

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ function TouchOSC() {
2828

2929
this.XY = 12; // Start of the XY Pads - 4 x X and Y, 8 total
3030
this.MACROS = 20; // Start of Device Macro Range - 8 macro knobs on the cursor device
31-
this.PARAMS = 40; // Start of Device Parameter Mappings - 8 parameter mappings on the cursor device
31+
32+
// CC's for deprecated device controls 40-47 handled seperately
33+
3234
this.PADCENTER = 36; // Start Offset of Pads
3335
this.PADSTEP = 16; // Pad Pagesize per Step
3436
this.KEYCENTER = 36; // Start Offset of Pads
@@ -401,10 +403,6 @@ function flush()
401403
sendChannelController(0, tOSC.MACROS + k, tOSC.deviceMacro[k]);
402404
tOSC.deviceMacroHasChanged[k] = false;
403405
}
404-
if (tOSC.deviceMappingHasChanged[k]) {
405-
sendChannelController(0, tOSC.PARAMS + k, tOSC.deviceMapping[k]);
406-
tOSC.deviceMappingHasChanged[k] = false;
407-
}
408406
if (tOSC.xyPadHasChanged[k]) {
409407
sendChannelController(0, tOSC.XY + k, tOSC.xyPad[k]);
410408
printMidi(0,tOSC.XY + k, tOSC.xyPad[k]);
@@ -512,9 +510,6 @@ function onMidi(status, data1, data2)
512510
tOSC.cRemoteControl.getParameter(data1 - tOSC.MAINKNOBS).getAmount().set(data2, 128);
513511
//tOSC.cMacro[data1 - tOSC.MAINKNOBS].getAmount().set(data2, 128);
514512
break;
515-
case 4:
516-
tOSC.cPage[data1 - tOSC.MAINKNOBS].set(data2, 128);
517-
break;
518513
}
519514
}
520515

@@ -581,6 +576,31 @@ function onMidi(status, data1, data2)
581576
tOSC.cDevice.switchToNextPresetCreator();
582577
tOSC.creatorHasChanged = true;
583578
break;
579+
case 40:
580+
// TODO: implement these
581+
println("Stop all clips")
582+
break;
583+
case 41:
584+
println("Unmute all.")
585+
break;
586+
case 42:
587+
println("Unsolo all.")
588+
break;
589+
case 43:
590+
println("Unarm all.")
591+
break;
592+
case 44:
593+
println("Automation write.")
594+
break;
595+
case 45:
596+
println("Return to automation control.")
597+
break;
598+
case 46:
599+
println("Clip OVR")
600+
break;
601+
case 47:
602+
println("Return all to Arrangement.")
603+
break;
584604
case 50:
585605
tOSC.cRemoteControl.selectPreviousPage(true);
586606
tOSC.pPageHasChanged = true;

0 commit comments

Comments
 (0)