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

    Need logical calculation/control actor suggestion

    How To... ?
    6
    16
    3.2k
    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.
    • G
      gavspav Beta Silver
      last edited by

      Seems like an ideal place for the javascript actor.

      Also very minor bug report - it says compatator in the help for the comparator actor (see Skulptures post above)

      http://www.digitalfunfair.co.uk I'm using M1 MBP 14" mostly but sometimes use older Mac & Windows machines.

      1 Reply Last reply Reply Quote 0
      • R
        Reinhard
        last edited by

        Michel was faster...

        mbp 16", 2021, m1pro, 16gb, 12.6 / 6core trashcan, 11.2 / youngest Izzy

        1 Reply Last reply Reply Quote 0
        • chimerikC
          chimerik Beta Platinum
          last edited by

          @[Michel](http://troikatronix.com/troikatronixforum/profile/9/Michel) 
          YES!!! This is it! So simple, but need intelligent brains to show me the way. Thanks so much!

          Sammy Chien (Chimerik 似不像) chimerik.com
          Izzy 3.2.6 (standard, Mac)
          Mac Studio (2022) M1 Max OS 12.3
          MBP 16' (2019) 2.4 GHz 8-Core Intel Core i9, AMD Radeon Pro 5600M 8 GB, OS X 10.15.5
          MBP 15' (late 2013) 2.6 Ghz i7, NVIDIA GeForce GT 750M, OS X 10.12.4
          Located in Vancouver, CA/Taipei, TW

          1 Reply Last reply Reply Quote 0
          • G
            gavspav Beta Silver
            last edited by

            Or paste the following into a javascript actor with 8 inputsfunction main(){ total=0; for (i=0;i<8;i++) { total+=arguments[i] } return total>0; }

            http://www.digitalfunfair.co.uk I'm using M1 MBP 14" mostly but sometimes use older Mac & Windows machines.

            1 Reply Last reply Reply Quote 0
            • SkulptureS
              Skulpture Izzy Guru
              last edited by

              Well spotted @gavspav 😉

              Graham Thorne | www.grahamthorne.co.uk
              RIG 1: Windows 11, AMD 7 Ryzen, RTX3070, 16gig RAM. 2 x M.2 SSD. HD. Lenovo Legion 5 gaming laptop.
              RIG 2: Windows 11, Intel i19 12th Gen. RTX3070ti, 16gig RAM (ddr5), 1x M.2 SSD. UHD DELL G15 Gaming laptop.
              RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

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

                The javascript method is great.

                But another very simple one can be setup using the 'Lookup' actor.
                It will output 0 if the 'compare' input is not found in the X (eight for this case) inputs.
                Otherwise it will say which input matches the 'compare'
                If your binary values run into eight value inputs, and you compare '1', you will receive a '0' if all of your eight values are not 1, and a value between 1 and 8 if there is a match.

                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.

                1 Reply Last reply Reply Quote 0
                • G
                  gavspav Beta Silver
                  last edited by

                  Thats great too!

                  Another way - how about the Maximum actor with 8 inputs. 
                  The advantage of this is that the 8 value inputs are 'active' - with the lookup actor you have to keep sending '1' to the compare input every time you want the actor to do its thing.
                  Sorry if I'm getting a bit anal. On the same note here's a rewrite of the javascript:
                  function main()
                  {
                  for (i=0;i<8;i++) {
                  	if (arguments[i]==1) {
                  		return 1;
                   		break;
                  		}
                  	}
                  return 0;
                  }

                  http://www.digitalfunfair.co.uk I'm using M1 MBP 14" mostly but sometimes use older Mac & Windows machines.

                  1 Reply Last reply Reply Quote 0
                  • MichelM
                    Michel Izzy Guru
                    last edited by

                    @gavspav

                    yep the maximum actor is even simpler to setup.

                    Michel Weber | www.filmprojekt.ch | rMBP (2019) i9, 16gig, AMD 5500M 8 GB, OS X 10.15 | located in Winterthur Switzerland.

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

                      @gavspav

                      yes,Maximum is an easier choice than lookup.
                      Its probably the easiest native Isadora solution.

                      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.

                      1 Reply Last reply Reply Quote 0
                      • chimerikC
                        chimerik Beta Platinum
                        last edited by

                        Wow, thank you @DusX & @Michel!
                        I didn't know about the Maximum actor. this is so great! yes, the easiest solution! thanks so much.

                        Sammy Chien (Chimerik 似不像) chimerik.com
                        Izzy 3.2.6 (standard, Mac)
                        Mac Studio (2022) M1 Max OS 12.3
                        MBP 16' (2019) 2.4 GHz 8-Core Intel Core i9, AMD Radeon Pro 5600M 8 GB, OS X 10.15.5
                        MBP 15' (late 2013) 2.6 Ghz i7, NVIDIA GeForce GT 750M, OS X 10.12.4
                        Located in Vancouver, CA/Taipei, TW

                        1 Reply Last reply Reply Quote 0
                        • chimerikC
                          chimerik Beta Platinum
                          last edited by

                          and thank you @gavspav 

                          I just realized you've already suggested it as well. i'll try the javascript actor too, just for fun. cheers.

                          Sammy Chien (Chimerik 似不像) chimerik.com
                          Izzy 3.2.6 (standard, Mac)
                          Mac Studio (2022) M1 Max OS 12.3
                          MBP 16' (2019) 2.4 GHz 8-Core Intel Core i9, AMD Radeon Pro 5600M 8 GB, OS X 10.15.5
                          MBP 15' (late 2013) 2.6 Ghz i7, NVIDIA GeForce GT 750M, OS X 10.12.4
                          Located in Vancouver, CA/Taipei, TW

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

                            @chimerik

                            the tutorial on Javascript for Isadora might be worth a read.

                            http://troikatronix.com/support/kb/getting-started-with-javascript/

                            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.

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