Quick Sign In:  

Forum: Old versions

Topic: Mapping! Can't get multiple modes to work, please help.

This topic is old and might contain outdated or incorrect information.

wehidmLE userMember since 2011
Im mapping my launchpad and set 'mode' 2 to set and play hot_cues, when 'shift' 1 is active i can delete cues and if 'shift' 2 is active i can play cues while_pressed.

Issue is when i try adding functions to 'mode' 3 or other modes. The last part is ignored, or only some features work.

How do I get multiple "modes" to work properly? I need a single deck mode ('mode' 2 and a 4 deck mode ('mode' 3)

Example of the code:

var_equal 'mode' 2 ? var 'shift2' ? hot_cue 1 while_pressed : var_equal 'mode' 2 ? var 'shift' 1 ? delete_cue 1 : var_equal 'mode' 2 ? hot_cue 1 :
The above works. Yet if i add the next similair code:

var_equal 'mode' 2 ? var 'shift2' ? hot_cue 1 while_pressed : var_equal 'mode' 2 ? var 'shift1' ? delete_cue 1 : var_equal 'mode' 2 ? hot_cue 1 :
var_equal 'mode' 3 ? var 'shift2' ? hot_cue 1 while_pressed : var_equal 'mode' 3 ? var 'shift1' ? delete_cue 1 : var_equal 'mode' 3 ? hot_cue 1 :

then the second line with mode 3 gets completely ignored. It just doesnt do anything.

How do I fix this?

Side question: Whay does "$" mean in a var eg. var '$mode' 3 and what is the difference between "var_equal" and "var"
 

Posted Thu 30 Mar 17 @ 7:55 pm
locoDogPRO InfinityModeratorMember since 2013
for a start your first bit of script is too long [will work but too long] this is the correct [shorter]
var_equal 'mode' 2 ? var 'shift2' ? hot_cue 1 while_pressed : var 'shift' 1 ? delete_cue 1 : hot_cue 1 : nothing

is mode = 2 yes, is shift2 true yes, both are true cue 1 while pressed, shift2 is false, is shift true yes, mode = 2 & shift = true, delete cue 1, shift is not true, call cue 1, mode is not = 2, do nothing

so your extended version should look like this

var_equal 'mode' 2 ? var 'shift2' ? hot_cue 1 while_pressed : var 'shift1' ? delete_cue 1 : hot_cue 1 : var_equal 'mode' 3 ? var 'shift2' ? hot_cue 1 while_pressed : var 'shift1' ? delete_cue 1 : hot_cue 1 : nothing [neither mode = 2 or 3 ]

side questions,
$ means a variable is global [applies to all decks], if I'm focused on deck 2 [via tab etc] and I script
set 'varName' 3
and I tab to deck 1 and query
var_equal 'varName' 3 ? on : off
I'll get, off as deck 1 varName = 0
but add the $
set '$varName' 3
var_equal '$varName' 3 ? on : off
and you get the on reply no matter what deck is the focus

difference between var_equal 'varName' 7 ? , var 'varName' 7 ?
no difference they do the same thing

 

Posted Thu 30 Mar 17 @ 9:38 pm


(Old topics and forums are automatically closed)