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

    [ANSWERED] Javascript Actor and Control Watcher Data Type Issue

    Troubleshooting and Bug Reports
    2
    4
    95
    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 Juriaan

      Hello,

      I am in the process of putting together a patch to read all of the CC values from LoupDeck touch buttons based on the touch button page. I have put together a Javascript calculator to accomplish this. There are 9 pages, each page has 12 touch buttons. I have programmed the controller with CC values in ascending order: page 1 is cc controllers 1-12, page 2 is cc controllers 13-24....etc.

      Here is the calculator:


      function main() {
      var page = arguments[0];
      let TB = [];
      for (let i = 1; i < 13; i++) {
      TB[i] = ((page-1)*12)+i;}
      return [TB[1],TB[2],TB[3],TB[4],TB[5],TB[6],TB[7],TB[8],TB[9],TB[10],TB[11],TB[12]]; }

      Javascript outputs a float value instead of an integer. When I plug this in the Control Watcher, it zeros out the Javascript output and converts the output to a range disabling the output of the javascript actor.
      I have a workaround: If I simultaneously connect the Javascript actor output to a "Float to Integer" node, the control watcher will accept the output of the Javascript node.

      Is there a better way of doing this?
      Thanks in advance.

      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 1 Reply Last reply Reply Quote 0
      • WolandW
        Woland Tech Staff @jtsteph
        last edited by

        @jtsteph said:

        Is there a better way of doing this?

        Not really, that's just how the mutable inputs and outputs on Isadora actors work. If they're green dots, then they'll mutate into what you connect them to, so connecting mutable inputs/outputs first to something to lock in the data type, and then connecting them to something else is what I do all the time. 

        Here's something that might help: mutator-user-actors.zip

        Best wishes,

        Woland

        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 0
        • J
          jtsteph
          last edited by

          Thanks @Woland . I thought this might be the case. I just wanted to make sure I was not being a goober about it. Thanks for the user actors. They're very cool and will definitely come in handy.

          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 1 Reply Last reply Reply Quote 0
          • WolandW
            Woland Tech Staff @jtsteph
            last edited by

            @jtsteph


            I made them because I got tired of having to recall an actor with the right data type off the top of my head. 😅

            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 0
            • First post
              Last post