• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    Need logical calculation/control actor suggestion

    How To... ?
    6
    16
    3104
    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.
    • chimerik
      chimerik Beta Platinum last edited by

      Hi @Skulpture,

      I need to compare 8 values though. If all 8 values = 0 then output 1.

      If there any actor that can compare more than 1 values?

      Thanks!

      Sammy Chien (Chimerik似不像) sammychien.com
      Izzy 3.1.1 (standard, Mac)
      MBP 16' (2019) 2.4 GHz 8-Core Intel Core i9, AMD Radeon Pro 5600M 8 GB, OS X 10.15.5 (primary)
      MBP 15' (late 2013) 2.6 Ghz i7, NVIDIA GeForce GT 750M, OS X 10.12.4 (backup)| located in Vancouver, CA/Taipei, TW

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

        @chimerik

        this is quite easy: use four calculator actors for the input values, then another two to get the summary of two pairs and another one to get the summary from them. Then take a comparator actor that is looking for zero, if zero then the output is one otherwise zero. See attached image.

        Best
        Michel
        62cf46-screen-shot-2014-10-21-um-18.19.26.png

        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
        • G
          gavspav 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 use MBP 15" i7 2.2 + various windows machines

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

            Michel was faster...

            mbp mid 2015, 2.5i7, 10.15.7 / 6core trashcan, 10.14.6 / youngest Izzy

            1 Reply Last reply Reply Quote 0
            • chimerik
              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似不像) sammychien.com
              Izzy 3.1.1 (standard, Mac)
              MBP 16' (2019) 2.4 GHz 8-Core Intel Core i9, AMD Radeon Pro 5600M 8 GB, OS X 10.15.5 (primary)
              MBP 15' (late 2013) 2.6 Ghz i7, NVIDIA GeForce GT 750M, OS X 10.12.4 (backup)| located in Vancouver, CA/Taipei, TW

              1 Reply Last reply Reply Quote 0
              • G
                gavspav 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 use MBP 15" i7 2.2 + various windows machines

                1 Reply Last reply Reply Quote 0
                • Skulpture
                  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. Lenovo Legion 5 gaming laptop.
                  RIG 2: Windows 10, Quad-Core i7 4.0GHz OC, GTX 1080, 512 m.2 SSD, 64gig Hyper X RAM. PCSpecialist.
                  RIG 3: Apple rMBP i7, 8gig RAM 256 SSD, OS X 10.12.12

                  1 Reply Last reply Reply Quote 0
                  • DusX
                    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 10 64bit, i7-8750H, M.2 PCIe SSD's, 16gb DDR4-2666, nVidia GTX 1070 | located in Ontario Canada.

                    1 Reply Last reply Reply Quote 0
                    • G
                      gavspav 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 use MBP 15" i7 2.2 + various windows machines

                      1 Reply Last reply Reply Quote 0
                      • Michel
                        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
                        • DusX
                          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 10 64bit, i7-8750H, M.2 PCIe SSD's, 16gb DDR4-2666, nVidia GTX 1070 | located in Ontario Canada.

                          1 Reply Last reply Reply Quote 0
                          • chimerik
                            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似不像) sammychien.com
                            Izzy 3.1.1 (standard, Mac)
                            MBP 16' (2019) 2.4 GHz 8-Core Intel Core i9, AMD Radeon Pro 5600M 8 GB, OS X 10.15.5 (primary)
                            MBP 15' (late 2013) 2.6 Ghz i7, NVIDIA GeForce GT 750M, OS X 10.12.4 (backup)| located in Vancouver, CA/Taipei, TW

                            1 Reply Last reply Reply Quote 0
                            • chimerik
                              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似不像) sammychien.com
                              Izzy 3.1.1 (standard, Mac)
                              MBP 16' (2019) 2.4 GHz 8-Core Intel Core i9, AMD Radeon Pro 5600M 8 GB, OS X 10.15.5 (primary)
                              MBP 15' (late 2013) 2.6 Ghz i7, NVIDIA GeForce GT 750M, OS X 10.12.4 (backup)| located in Vancouver, CA/Taipei, TW

                              1 Reply Last reply Reply Quote 0
                              • DusX
                                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 10 64bit, i7-8750H, M.2 PCIe SSD's, 16gb DDR4-2666, nVidia GTX 1070 | located in Ontario Canada.

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