Hello,
I’m having a problem with version 3.45. I’m using MSL scripts, but there seems to be a bug on my system when I use the if condition together with trackNumber. And it’s not just trackNumber: more generally, I’m having issues with conditions and the context in which I try to use them in a script, as they seem to be abnormally ignored.
Here is a script that I use live to record free-form drum loops:
#Name RecAllLoopsDrumsTrack1
if Track Empty
Record
else
NextLoop
Record
Here, the if condition and Track Empty seem to work correctly.
But when I add a condition so that the command should only work when Track 1 is selected:
#Name RecAllLoopsDrumsTrack1
if trackNumber == 1
if Track Empty
Record
else
NextLoop
Record
The condition has no effect. Even when another track is active, I can still trigger the command.
However, if I type:
Print trackNumber
in the console, I get the correct track number.
On that same console, if I enter:
#Test
if trackNumber == 1
Print "TRUE"
else
Print "FALSE"
I get FALSE every time.
And if I use:
if 1 == 1
Print "TRUE"
else
Print "FALSE"
I still get:
FALSE
Same thing.
Isn’t that strange?
There must be something I’m missing. Maybe I haven’t understood something essential about how conditions work in MSL, or about the context in which they are evaluated.
Could someone explain what is happening here?
Thanks for your help!