I have 4 'randomise' buttons that send some stuff to Bitwig.
I added a 'master' randomiser that would trigger all the other buttons. It worked fine for a week and now .. .it doesn't! And I've no idea what's up.
I can see it trigger the buttons, but it seems like they only receive the value '0', not the '1023' they need to trigger their script.
Randomiser button script:
// Setup variables
var ParentId = getProp('parent', 'id')
var n = getProp('parent', 'variables').n
var rand; var r1; var Euclid
rand = Math.ceil(Math.random()*4)
console.log("random " + n + " " + value)
if (value == 1023) {
(does stuff)
}
else {
console.log("else " + n + " " + value)
}
^ This logs:
random 1 0
else 1 0
When I trigger it with the master script:
if (value === 1023) {
// Randomise all
for (var i = 1; i < 5; i++) {
set("GrooveCtrl" + i + "Rand", 1023)
}
// Wait a minute! (using this to give Bitwig a moment to do stuff before the 'zero' message is sent)
setTimeout(function(){
for (var i = 1; i < 5; i++) {
set("GrooveCtrl" + i + "Rand", 0)
}
// End wait
}, 100);
}
Am I miss something dumb?! Thanks!