JavaScript Actor Output Assign
-
Hello Again, ran into another question: I need to individually address the different outputs in the JavaScript Actor. Here is the code:
function main()
{
var x = arguments[0];
if (x >= 37 && x <= 39 )
{return (1)} //output to first output
if (x >= 41 && x <= 43 )
{return (1)} //output to 2nd output
}
Any suggestions? Thanks a lot !
-
-
@Salimelo if you just want to send one trigger to a dedicated output, this is not possible since the js output is an array by itself like the js input.
but if it is just the sorting you care for it could be something like.
function main()
{ var x = arguments[0]; var o = [0,0]; if (x >= 37 && x <= 39 ){
o[0]=1;
} if (x >= 41 && x <= 43 ){
o[1]=1;
}
print(o + " \n") // shows the value in the monitor
return o
}if you need a trigger you can use a comparator actor
best m_theater -
I think you have good reason t use Java but you can also get the same with trigger by usingInside Range actors
best
Jean-François
-
Just a quick add. I have tested with both using null and undefined in an attempt to have an output not trigger.
In both cases Isadora is converting these into false (zero) values.