change matrix value receive channels without changing their values + scale output


  • Hi, 

    I use 1 matrix send value send in each scene to remote control the matrix value received linked to the dmx usb pro in an activated scene that stays forever,
    so I can use the crossfades for lights, 
    but as the patch can move, how can I send/change each Chanel Name to each instance of matrix value send along the patch, 

    I'm tempted by a user actor to" save and update all"' but I'd loose all my Matrix values different for each scene, 
    I'm also afraid Reading a data array actor where the patch is stored  with enter scene value, could provoque some bugs or glitch as the datas are being interpolated while/before entering the scene...

    should I pass all the scenes 1st and read data array in each scene before launching the show when patch has been changed? 

    if I'm using enter scene to recall snapshots should I rewrite them after the read of data array ?

    Many thanks 


  • oh and also I need to be able to modify matrix value receive output with min/max by chanel before I output it in serial raw data...

    indeed, I'm using matrix interpolation between scenes to crossfade light sets, But ..
    the light operator needs to adjust (min) - max of each source regarding the scene reality ( some may be less/more powerful regarding bulbs),
    I can't do it at the output of the controller, since the changing the scenes sends the info and are tracked with control panel ( soon on motorized midi ctrl).

    Is it possible to unpack matrix value receive, shape each chanel data with multiplier, and pack it back again to enter serial raw? 

    seems possible/coherent? 


  • @bennnid

    so as mark said in this page, you can simply change routing clicking on Atrix receive actor to edit routing ;-)

    https://support.troikatronix.c...


  • @mark

    Hi

    Do you think it would be possible to get a min max scaling for each output of matrix receive actor?

    I m afraid unpacking output/ scaling each/ repacking for hex to dmx would make some pb...

    Thnaks

  • Tech Staff

    @bennnid said:

    get a min max scaling for each output of matrix receive actor?

     I think the only way to do this direct from the Matrix Value Receive actor would be to use JavaScript to parse and update/scale the values as needed.
    I can imagine sending the output from Matrix Value Receive into JavaScript (using .split to break it into and array) and another input array that contains the limit scale value function.
    This page contains some approaches to doing the scaling: https://stackoverflow.com/ques...

    It will be interesting to see how cpu intense this is though. Really depends on the length/count of values in the Matrix Value Receive output.


  • @dusx

    thanks, I know nothing in java but I'll dig in ! 
    for the moment, the java actor @juriaan made outputs all Chanel when 1 is being modified... I wonder if it would be possible to output only if Chanel is being changed... that would low cpu use isn't it? 

  • Tech Staff

    @bennnid

    How many values are you passing through the Matrix?
    Does each value need its own individual scaling range min/max?


  • @dusx

    I m using 32 dmx Chanel’s for now 

    I guess I d need just a few to be rescaled but each session in a different theatre would change those ones...

  • Tech Staff

    @bennnid said:

    32 dmx Chanel’s for now 

     You might just want to break apart your Matrix output string into the 32 values then, run each through a Limit-Scale Value actor, and than re-format the Text string with Text Formatter. 
    Since each one may have a custom range, its about as easy to do it this way as it is to create a JS loop/function to do it, since you would have to build up 128 value array to pass in that would define the scaling to be done.

    Actually, we can break down the Text into an array and rebuild it in JS, allowing you to route any value to a Limit Scale Value actor as needed... or build up a complete user actor.

    builldNteardown_JS.izz

    This Izzy file has a scene with 2 JS actors that should be able to break down your Matrix Value Receive actors output string, allow you to adjust the values and then rebuild it.

    NOTE: in the file I am using the 2 JS actors in the reverse order you will want to. I didn't have a Matrix actor creating the list of values, so I built it first.

    Build Text Code

    function main()
    {
    // first input is Delimiter
    var i;
    var delimiter = arguments[0];
    var txt = "";
    for (i = 1; i < arguments.length; i++)
    {
     if (i == arguments.length -1)
     {
     // don't add delimiter to last item
     txt += arguments[i];
     }else{
     txt += arguments[i] + delimiter;
     }
    }
    return txt;
    }

    Break Down Text Code

    function main()
    {
    // first input is Delimiter
    // take a delimited string as second input and splits into an array..
    //set return to array so individual values are output
    var delimiter = arguments[0];
    var out = arguments[1].split(delimiter);
    out.unshift(out.length); // make the first output value 
    return out;
    }

  • @dusx

    Thx so much I ll try it and get back to you!