[ANSWERED] Izzy3 JavaScript Actor - Naming inputs and outputs

  • Hello,

    I remember there being a discussion about adding the ability to name inputs and outputs on the javascript actor in izzy3. Has this been implemented? If so, how does one do this?

    I would love to be able to name outputs based on a string array stored within the javascript actor. I'm using the JSON grouping/ungrouping actor that DusX put together to package up all the controller values from my BCR2000. I have modified the unpacking actor to be able to pull a range of the values from the JSON. It would be great to be able to either store an array for the controller names in the javascript actor, or in another JSON string and use the selected index range to name the outputs. Would this be possible?

    - J

    unpack json.zip

    I have attached the unpack json range javascript actor in a dummy user actor here.

  • Tech Staff


    Dynamically naming the JS input and outputs is not a feature including in Isadora 3.
    My personal work around is to encapsulate my JS into User Actors.
    This offers a number of advantages.

    • name the User inputs and Outputs.
    • limit the input and output types and ranges
    • easy reuse by adding to your Toolbox

    Unfortunately you can't dynamically name the IO.
    I generally just create another text output that provides the information I am looking for.

    You can create the Array or JSON as you mention, and use it to format an Output string that defines the currently available outputs.

  • @dusx. Thanks for your input. I was thinking something similar: Using a user actor with named inputs and outputs with a separate JSON that would put a piece of text on the output above the given value output. I'm not a Javascript wiz but was thinking of getting the loop to count by 2. Each text label would be output using the loop index proper and each controller value would be +1 of the loop index. I can create a few sizes - 1 output, 4, 8, 12 etc. I'll play with it.

  • Tech Staff

    I completely forgot that Mark added this function 10 months ago:


    Dear Community (and particularly @Juriaan and @DusX)

    So, this morning I added the ability to name the inputs and outputs on the Javasript actor for Isadora v3. Like the GLSL shader, approach to this is to use a special comment format to accomplish this.

    Here's an example:

    // iz_input 1 "custom first input"
    // iz_input 2 "custom second input"
    // iz_output 1 "custom first output"

    function main() {
       return arguments[0] + 1;

    I think the format is clear: a "//" followed by either iz_input or iz_output, the input or output number, and then the words you want to appear for that title. This results in the following:

    I figure that doing it this way is easier to maintain than some kind of external command to open an editor dialog with the in/out names, etc.

    Whad'ya think?

    Best, Mark

    Does that still work?

  • Tech Staff

    @woland said:

    // iz_input 1 "custom first input" // iz_input 2 "custom second input" // iz_output 1 "custom first output"

     Still works!

  • Brilliant! Thanks!

  • Tech Staff

  • Tech Staff

    somehow I completely missed the memo 😕

    Cool a surprize feature!

  • @woland Yes! I am working on this project again. I was waiting until V3 to dig in. I have a show in a month or so with FFoB and am working through refining and simplifying my patches. Excited about the speed increase and the fact that controls will run on a separate thread so I can use it to monitor audio inputs and routing to effects etc without taking a performance hit to the engine.