Skip to content

Instantly share code, notes, and snippets.

@RubyRubenstahl
Created January 15, 2019 15:29
Show Gist options
  • Save RubyRubenstahl/d141f2b03bad5928d659c3f6d0515b1f to your computer and use it in GitHub Desktop.
Save RubyRubenstahl/d141f2b03bad5928d659c3f6d0515b1f to your computer and use it in GitHub Desktop.
int buttonNum = getarg(0); // First param is my buttonID#.
string buttonId = format("%d", buttonNum); // Convert the number to a string
int buttonCode = ActionPadGetItemMemberCode(buttonId); // Get the button's member id Code
switch(buttonNum){
case 21: int nPreset = 2;
CuelistStart(QL(nPreset)); // Start the specified cuelist
VersatileMasterStartAutoFade(nPreset, 100, 3000);// Fade the requested cuelist up
ActionPadSetItemActiveState(buttonCode, 1); // Set that button to be active.
break;
case 22: int nPreset = 3;
CuelistStart(QL(nPreset)); // Start the specified cuelist
VersatileMasterStartAutoFade(nPreset, 100, 3000);// Fade the requested cuelist up
ActionPadSetItemActiveState(buttonCode, 1); // Set that button to be active.
break;
case 23: int nPreset = 4;
CuelistStart(QL(nPreset)); // Start the specified cuelist
VersatileMasterStartAutoFade(nPreset, 100, 3000);// Fade the requested cuelist up
ActionPadSetItemActiveState(buttonCode, 1); // Set that button to be active.
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment