Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var LOWEST_CC = 1;
- var HIGHEST_CC = 119;
- function init()
- {// Make CCs 1-119 freely mappable for all 16 Channels
- userControls = host.createUserControlsSection((HIGHEST_CC - LOWEST_CC + 1)*16);
- for(var i=LOWEST_CC; i<=HIGHEST_CC; i++)
- {
- for (var j=1; j<=16; j++) {
- // Create the index variable c
- var c = i - LOWEST_CC + (j-1) * (HIGHEST_CC-LOWEST_CC+1);
- // Set a label/name for each userControl
- userControls.getControl(c).setLabel("CC " + i + " - Channel " + j);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement