• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

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

    Comparator actor behaviour ?

    How To... ?
    8
    24
    12221
    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.
    • N
      nZo last edited by

      Hi,
      when i put 2 random value on comparator actor with gt (> not >=) compare mode, sometime both false and true output trigger are active. It's a bug ?

      I'm try this patch with 1 trigger delay connect to 2 random actor then connect at value 1 and 2 comparator ...

      Thanks to help me to understand this behaviour.

      3bc6b8-capture-decran-2015-03-29-a-00.35.58.png

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

        It could be that the top toggle will change milliseconds before the bottom one. And if it is greater than the second number it will trigger.

        Maybe add a very short trigger delay on the second random trigger.

        Graham Thorne | www.grahamthorne.co.uk
        RIG 1: Custom-built PC: Windows 11. Ryzen 7 7700X, RTX3080, 32G DDR5 RAM. 2 x m.2.
        RIG 2: Laptop Dell G15: Windows 11, Intel i9 12th Gen. RTX3070ti, 16G RAM (DDR5), 2 x NVME M.2 SSD.
        RIG 3: Apple Laptop: rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

        1 Reply Last reply Reply Quote 0
        • N
          nZo last edited by

          thanks so much for your help !

          i m try this but generate 2 times trigger. Everytime a new value input is detect. 2 True trigger or 2 false trigger and already sometime true and false quickly (test with 0,2 second delay to 0,6)

          comparator actor use a AND logical operator result  .... very strange

          1 Reply Last reply Reply Quote 0
          • S
            Stephane_Morisse last edited by

            Speaking of which... I think I remember a tutorial from Mark speaking about the order of operation but is there, like in Max, a way to clearly define the order by placing the actors spatially ?

            1 Reply Last reply Reply Quote 0
            • N
              nZo last edited by

              What do you say with placing actors spatially ?  I don't find mark's tutorial which way is it ?

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

                Isadora does process actors from top to bottom so it will have a slight delay.

                Graham Thorne | www.grahamthorne.co.uk
                RIG 1: Custom-built PC: Windows 11. Ryzen 7 7700X, RTX3080, 32G DDR5 RAM. 2 x m.2.
                RIG 2: Laptop Dell G15: Windows 11, Intel i9 12th Gen. RTX3070ti, 16G RAM (DDR5), 2 x NVME M.2 SSD.
                RIG 3: Apple Laptop: rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

                1 Reply Last reply Reply Quote 0
                • vanakaru
                  vanakaru last edited by

                  Out of curiosity I tried this as well. I have no idea for the purpose of this.

                  It seems that there are both true and false triggered sometimes. However Comparator output value will be either 1 or 0 and correct to equation(as far I can tell). - 1=true 0=false. You can use this output instead. Like add one more comparator that will compare first ones output with 0 or 1 and get true /false trigger.

                  MBP 4.1 & MBP (Retina, Mid 2012) MBP Retina 2017

                  1 Reply Last reply Reply Quote 0
                  • N
                    nZo last edited by

                    sure it's a solution to have only one result but the logical result sometimes is wrong because this state change on new true / false trigger. You have a 0 and quickly a 1, it's not stable output.

                    exemple : put 2 value ( ie 35 and 56) to create a rectangle. I need a true when value 1 < value 2 (ie to choose rectangle horz or vert move according to shape dimension). Who use comparator actor to make this ?

                    1 Reply Last reply Reply Quote 0
                    • mark
                      mark last edited by

                      Dear nZo,

                      You are generating two random numbers. They come in one at a time. So imagine that the Comparator has these two values and is set to greater than (>)
                      10
                      5
                      Now you generate two random numbers. The first random number is 3.2 and so it arrives at value1
                      3.2
                      5
                      at this moment, the output if false (0) and the 'false' output triggers
                      Now the next random number comes (for value2) and it is 1.8, so now we have
                      3.2
                      1.8
                      and the result of the comparison is true  the 'true' output triggers.
                      Does that help you to understand what's happening?
                      I can see however that this is confusing. I will file a bug report on this topic and make sure we look into it.
                      Best Wishes,
                      Mark

                      Media Artist & Creator of Isadora
                      Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

                      1 Reply Last reply Reply Quote 0
                      • S
                        Stephane_Morisse last edited by

                        Coming from Max, that was right what I imagined. So now my question is : is there an actor that can do what [pack] or [pak] objects do in Max ?

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

                          I have been using Javascript to pack and unpack from JSON strings.

                          Troikatronix Technical Support

                          • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                          • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
                          • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

                          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
                          • N
                            nZo last edited by

                            Thanks Mark for detailed explanation.

                            Actor's behavior seems logical. Process execution speed did not allow me to see what happens, look like both result.

                            perhaps made on a dev code a short delay before analyse theses values for case 2 values put in on same (relative) time ...

                            1 Reply Last reply Reply Quote 0
                            • danshorten
                              danshorten last edited by

                              Had a flight this morning so spent 15 mins doing a quick inelegant but reliable patched solution to your problem.

                              The thing is you are changing the numbers in your comparator one at a time giving you 3 combinations of numbers.

                              Ie  you start with numbers A & B and end with C & D  giving you the following sequence of changes.

                              AB

                              CB

                              CD

                              So of course you get a true/false outcome for each combination.

                              By ignoring the changes and then simply comparing the final pair you will get what I think it is you are after.

                              First solution that came to mind is patched and attached.

                              Hope it helps.

                              Dan

                              BTW: in the patch trigger delay 2a and 2b need to be longer than trigger delay 1 but don’t need to be the values I have set. (the process needs at least .2 seconds to complete though i.e. min vals of 0.2 & 0.4 – on my laptop anyway)

                              I have also set initialize values for the toggles and gates.

                              6aee35-random-comparator-solution.izz

                              1 Reply Last reply Reply Quote 0
                              • danshorten
                                danshorten last edited by

                                SS of above 0084e4-screen-shot-2015-04-03-at-13.31.16.png

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

                                  A clean fix using Javascript actor.

                                  function debug(printString)
                                  { if (DebugMode){ print(printString + "\n"); } }
                                  
                                  function main() { 
                                  DebugMode = true; 
                                   op = parseInt(arguments[0]); 
                                  // op 1, lessthan 
                                  // op 2, greaterthan 
                                  
                                  in1 = parseFloat(arguments[1]); 
                                  in2 = parseFloat(arguments[2]); 
                                  debug("1= " + in1 + " 2= " + in2);
                                  if (op === 1){ if (in1 < in2) { 
                                   opOut = 1; 
                                   debug("out1= " + opOut); 
                                   }else{
                                   opOut = 0; 
                                   debug("out2= " + opOut); 
                                   } } 
                                   if (op === 2){ if (in1 > in2) { 
                                   opOut = 1; 
                                   debug("out1= " + opOut); 
                                   }else{
                                   opOut = 0; debug("out2= " + opOut); 
                                   } } 
                                   outVals = [opOut] 
                                   debug("vals= " + outVals ); 
                                   return outVals; 
                                  } 
                                  

                                  The attached file shows how I set this up. The above Javascript goes into the JavaScript actor... its basic and needs expanding, but it works. ( @Michel seems like I can't format the Javascript code anymore.. and HTML view auto extends so you can't make edits.) 0a354b-compareviajs.jpg

                                  Troikatronix Technical Support

                                  • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                                  • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
                                  • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

                                  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
                                  • danshorten
                                    danshorten last edited by

                                    @DusX

                                    Nice!

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

                                      @Mark

                                      I was surprised that this worked, since I believed that the Javascript would run each time a value arrives, 
                                      but in fact it seems that all values received during the cycle are used. Is this correct?
                                      If so it makes for an easy way to trap incoming values for a synchronized process.

                                      Troikatronix Technical Support

                                      • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                                      • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
                                      • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

                                      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
                                      • N
                                        nick last edited by

                                        This javascript version produces the same behaviour as the comparator actor for me - sending two values from random value actors both triggered from a single actor produces the intermediate result when the first input has changed, and the final result when the second input changes.

                                        MacBook Pro 11.5.2

                                        1 Reply Last reply Reply Quote 0
                                        • N
                                          nick last edited by

                                          I would use this to give single trigger when both are changing 'simultaneously'. The short delay means the intermidaite value gets lost.

                                          The value on the trigger can be adjusted to a longer delay if it is unreliable. The final comparator can be omitted if you just want the value 0 or 1 from the comparison - it is there to recreate the true false triggers.
                                          Nick

                                          93d8f5-simultaneouscomparator.izz

                                          MacBook Pro 11.5.2

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

                                            Strange. I expected the js to behave the same. I expected to have to add some logic to require both values be new. ( or like) But I couldn't see any double outputs.

                                            Troikatronix Technical Support

                                            • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                                            • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
                                            • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

                                            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