• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum
    • Categories
    • Recent
    • Popular
    • Tags
    • Register
    • Login

    [ANSWERED/LOGGED] JSON Bundler Question

    Troubleshooting and Bug Reports
    3
    9
    212
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jtsteph
      last edited by Woland


      Hello,

      I have just started work on another instalment of our improvised sound video collective FFoB (from the Troikatronix front page featured gallery) and am diving back into Isadora. I am very excited to be back working with Isadora and engaging with you all.

      I am working with a Loupdeck and a Stream Desk in MIDI mode this time around, which will make everything so much easier for me. It does, however, mean several hundred midi CC and Note values.

      I am delighted to see the JSON actors and am doubly excited to learn about nestling JSONs. This is a very very powerful feature that will simplify the midi controller snapshot component of my project immensely. With some simple math, I will be able to bundle CC and Note values by button, page and channel numbers. Depending on overhead, this will allow me to put everything into one big JSON and pull values based on nestled "KEYS". For example, watching for touch button 5 from page 6 of workspace 3 (which is set to midi channel 3). Glorious.

      Will I notice any hit to overhead working this way?

      Also I have noticed a small thing with these actors. When copying a JSON Bundler that has many inputs and key values, the output type will switch to "ARRAY" instead of "OBJECT". In order to get it back to "OBJECT", I have to edit one of the "KEY" fields. Once I do this, it will bump back to "ARRAY".

      Is this a small bug or is it something I am doing incorrectly? If it is a bug, it is certainly not a critical bug.

      W11 PRO 13700K (in a 4U case), 128GB RAM, 4 Lane M.2 Storage, RTX 3090, Behringer UMC404HD audio interface, Streamdeck XL, Stremdeck +, KorgNano Kontrol2, Izzy 3.26 USB
      Website: http://justinstephenson.com

      WolandW DusXD 3 Replies Last reply Reply Quote 0
      • WolandW
        Woland Tech Staff @jtsteph
        last edited by

        @jtsteph said:

        Will I notice any hit to overhead working this way?

         I would be extremely surprised if you experienced any noticeable overhead hit due to just data processing. 

        TroikaTronix Technical Support
        New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        TroikaTronix Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
        TroikaTronix Add-Ons Page: https://troikatronix.com/add-ons/

        | Isadora 3.2.6 | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

        1 Reply Last reply Reply Quote 1
        • WolandW
          Woland Tech Staff @jtsteph
          last edited by

          @jtsteph said:

          Also I have noticed a small thing with these actors. When copying a JSON Bundler that has many inputs and key values, the output type will switch to "ARRAY" instead of "OBJECT". In order to get it back to "OBJECT", I have to edit one of the "KEY" fields. Once I do this, it will bump back to "ARRAY". Is this a small bug or is it something I am doing incorrectly? If it is a bug, it is certainly not a critical bug.

           This has already been logged and fixed in our most recent internal beta.

          TroikaTronix Technical Support
          New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
          TroikaTronix Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
          TroikaTronix Add-Ons Page: https://troikatronix.com/add-ons/

          | Isadora 3.2.6 | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

          1 Reply Last reply Reply Quote 1
          • DusXD
            DusX Tech Staff @jtsteph
            last edited by

            @jtsteph said:

            the output type will switch to "ARRAY" instead of "OBJECT"

             If this is causing real issues for you (I recently had this issue) you can use Javascript to bundle your JSON. I have created rather complex project using this method without issue.
            see: Grouping, Ungrouping and Passing JSON Values With Javascript : TroikaTronix

            Troikatronix Technical Support

            • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
            • Isadora Add-ons: https://troikatronix.com/add-ons/
            • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

            Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

            J 1 Reply Last reply Reply Quote 0
            • J
              jtsteph @DusX
              last edited by

              @dusx Thanks for this. It's not causing a huge issue for me - the workaround is quite easy. Where I am encountering a more substantial issue is with Javascript. I am using it to calculate my midi controller numbers by page. I'll do another post on this to make it searchable.

              W11 PRO 13700K (in a 4U case), 128GB RAM, 4 Lane M.2 Storage, RTX 3090, Behringer UMC404HD audio interface, Streamdeck XL, Stremdeck +, KorgNano Kontrol2, Izzy 3.26 USB
              Website: http://justinstephenson.com

              1 Reply Last reply Reply Quote 0
              • J
                jtsteph
                last edited by

                And just to confirm here, the output from the JSON Parser is always text? I am using the Text Parser to change the data type to integer currently. Is this best practice?

                W11 PRO 13700K (in a 4U case), 128GB RAM, 4 Lane M.2 Storage, RTX 3090, Behringer UMC404HD audio interface, Streamdeck XL, Stremdeck +, KorgNano Kontrol2, Izzy 3.26 USB
                Website: http://justinstephenson.com

                DusXD 1 Reply Last reply Reply Quote 0
                • DusXD
                  DusX Tech Staff @jtsteph
                  last edited by

                  @jtsteph said:

                  And just to confirm here, the output from the JSON Parser is always text? I am using the Text Parser to change the data type to integer currently. Is this best practice?

                   Yes, JSON is text, and the data is untyped. Text Parser is a good choice to use, You can also pass the 'text' number into a JS actor, and simply pass if back out with out modification, the JS actor will allow you to mutate the value to a number. It sounds like you have it working well though.

                  Troikatronix Technical Support

                  • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                  • Isadora Add-ons: https://troikatronix.com/add-ons/
                  • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

                  Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    jtsteph @DusX
                    last edited by

                    @dusx Thank-you. I am always happy to hear about different ways of doing things incase one method does not suit the patch.

                    W11 PRO 13700K (in a 4U case), 128GB RAM, 4 Lane M.2 Storage, RTX 3090, Behringer UMC404HD audio interface, Streamdeck XL, Stremdeck +, KorgNano Kontrol2, Izzy 3.26 USB
                    Website: http://justinstephenson.com

                    1 Reply Last reply Reply Quote 0
                    • J
                      jtsteph
                      last edited by jtsteph

                      Just quick update on this. The JSON Bundler always seem to revert to object when I open my project. I have worked around this by including a "trigger text" actor to send a "key" to the jason bundler as a part of the scene initialization. This resets it to object. I'll see if this works moving forward, if not, I will use @DusX 's javascript option.


                      Definitely having issues with the bundler and unpredicably switching to "array". I am going to pivot to dusx's javascript method. Here is what i did to be able to add a custom key to the json values so i can use the isadora JSON Parser actor:

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

                      // input 1 (index 0) is the custom string for the key. The loop begins at 1 as opposed to 0

                      function main() {
                          var customString = arguments[0]; // takes custom key string from input 1
                          var output = {};

                          for (var i = 1; i < arguments.length; i++) {
                              // Creating a new key with custom string and index
                              var key = customString + i;
                              output[key] = arguments[i];
                          }

                          return JSON.stringify(output);
                      }

                      W11 PRO 13700K (in a 4U case), 128GB RAM, 4 Lane M.2 Storage, RTX 3090, Behringer UMC404HD audio interface, Streamdeck XL, Stremdeck +, KorgNano Kontrol2, Izzy 3.26 USB
                      Website: http://justinstephenson.com

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post