assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

Easy Snapshots For User Actors With User Actors Inside Them


  • Tech Staff

    Hello all,

    I theoretically made a system that allows for Snapshots to control all of the internal values of a User Actor/Macro while only requiring a single User Input on the User actor. Great for multilayered User Actors build for MIDI controllers (I should think).

    This is just a proof of concept at this point. I'm sure it could be refined further. Sorry in advance for the lack of explanation in this post, I'm a bit tired so I explained with screenshots.

    >>>ISADORA PATCH, USER ACTORS, PICTURES<<<



































    Shoutout to @DusX for the Javascript system.

    I haven't put this into use for a specific purpose, so I'm sure it could be refined. If you do improve the system, I'd love for you to annotate your changes and re-upload an example Patch so that others can use the improved version.

    Best wishes,

    Woland



  • Hello, @Woland .


    Using your input on this thread and your thread on the @DusX  method of grouping multiple values into a JSON string using the JS actor, I have managed to put together a system to enable me to snapshot the state of my midi controller values, and recall those values when entering a scene. In addition, I worked to be able to send this state back to the midi controller to update the indicators and rotary encoder values.

    This system will enable me to have multiple "setups" for my system. As I am working as a part of an improvised audio visual group, this will give me readily available starting points for my improvisations.

    I have chosen, in my workflow here, a preference for operating scene by scene rather than snapshot by snapshot. It is a more verbose manner of working in which I can label the scenes according to what they do. My show methodology would be to duplicate my patch into multiple scenes, work out something cool, snapshot it, and then move on to the next duplicated scene. During performance, I will use the scenes as starting point for each improvisation.

    I am including some screenshots here to explain what I did. I have not yet integrated this into my performance patches, but this "midi controller snapshot" rig will be usable by me in all manner of situations. You will need to excuse my patching style - it's not quite as tidy as many of the users here.

    -----------------------------------

    Here is my top level: I choose the controller port, channel(track#), and snapshot to recall on scene enter.

    I use 4 presets on the BCR2000, each with identical CTL ID#s but with different channels. Each channel is assigned to a video track.

    The BCR lets you easily switch between user defined presets. I used the excellent Mountain Utilities "BCR MANAGER" to program the CTL ID#s in a way that each ID# is +1 of the same CTL on the previous rail. This means I only need to store the ID#s for one rail and can calculate the other based on that.

    Here is the top level:

    -------------------------------------------
    My Global Values User actor is used to set the midi controller id values:

    -----------------------------------

    The MIDI out to JSON uses a user actor that receives the midi values from the BCR rail by rail. These are input into the JSON Grouping actor that @Woland put together. I used two JSON groups as there are 108 values total which is more than the 99 possible inputs.


    -----------------------------------------------

    For completeness, here is the user actor that receives the midi values from the BCR. It calculates the controller id# using the Global Values from the first rail and the user defined BCR RAIL#.

    -----------------------------------------------------

    Back to the main top level. The JSON values can be stored in a snapshot. When I enter the scene it recalls the snapshot#  I define and then sends these values to the BCR to update the rotary encoder and toggle button values (it uses a user actor that is the reverse the user actor that retrieves the midi values from the bcr). To my delight, the BCR picks up all the update values simultaneously without having to put then into any kind of time based midi stream (yuck).




    This patch will serve as the bases for not only this project, but for any project in which I use midi controllers (like all of my projects :-)
    In addition to the Ungrouping patch by @Woland based on the awesome work of @DusX I worked out a couple of ways of parsing the JSON.

    --------------------------------
    Large ungroup without @DusX 's addition of the array size (I need to keep my group and ungroup indexes consistent for my workflow)
    function main()
    {
        var parsed = JSON.parse(arguments[0]);
        var array = [];
        for (elem in parsed ) {
           array.push(parsed [elem]);
        }
        
        return array;
    }
    -------------------------------
    Retrieve a single midi value from the JSON. Input 1 is the JSON. Input 2 is the index for the value.
    function main()
    {
        var parsed = JSON.parse(arguments[0]);
        var array = [];
        var arrayindex = arguments[1];
        array.push(parsed [arrayindex]);
        return array;
        }
    --------------------------
    Retrieve a range of values from the JSON. Input 1 is the JSON, input 2 is the starting index of the values you wish to retreive, input 3 is the end of the values you wish to retrieve.
    function main()
    {
        var parsed = JSON.parse(arguments[0]);
        var array = [];
        var indexstart = arguments[1];
        var indexend = arguments[2];
        var i;
        for (i = indexstart; i<= indexend; i++) {
        array.push(parsed [i]);}
        return array;
        }
       

    In any event. Thanks to @Woland and @DusX for their work. Standing on the shoulders of giants makes our work easier.

    - J

  • Tech Staff

    @jtsteph

    Looks great!

    Nice clean patching & powerful.