<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Comparator actor behaviour ?]]></title><description><![CDATA[<p dir="auto">Hi,<br />
when i put 2 random value on comparator actor with gt (&gt; not &gt;=) compare mode, sometime both false and true output trigger are active. It's a bug ?</p>
<p dir="auto">I'm try this patch with 1 trigger delay connect to 2 random actor then connect at value 1 and 2 comparator ...</p>
<p dir="auto">Thanks to help me to understand this behaviour.</p>
<p dir="auto"><img src="http://troikatronix.com/troikatronixforum/uploads/FileUpload/e9/c7768506bc2ac85542de2e9b803602.png" alt class=" img-responsive img-markdown" /> <img src="/uploads/files/FileUpload/83/3bc6b8-capture-decran-2015-03-29-a-00.35.58.png" alt="3bc6b8-capture-decran-2015-03-29-a-00.35.58.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://community.troikatronix.com/topic/1862/comparator-actor-behaviour</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 23:31:25 GMT</lastBuildDate><atom:link href="https://community.troikatronix.com/topic/1862.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Mar 2015 22:32:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Comparator actor behaviour ? on Mon, 06 Apr 2015 20:43:09 GMT]]></title><description><![CDATA[<p dir="auto">Dear All,</p>
<div>Well, it seems pretty clear that I need to address this in the actual Comparator actor. The behavior isn't intuitive in the case cited here.</div>
<div>Best,</div>
<div>Mark</div>]]></description><link>https://community.troikatronix.com/post/15407</link><guid isPermaLink="true">https://community.troikatronix.com/post/15407</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Mon, 06 Apr 2015 20:43:09 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 17 Jan 1970 12:44:32 GMT]]></title><description><![CDATA[<p dir="auto">@ dusX : I don't know yet how to use javascript but you're caught my attention. I puts me as possible !<br />
@ nick : I return integrate your solution in my rectangle generator and I post the patch right here very soon<br />
@ danshorten : your patch are true but not very stable on result for me . i just keeping searching.</p>
<p dir="auto">A big thanks to all for your help and your efficiency.</p>
<p dir="auto">nZo</p>
]]></description><link>https://community.troikatronix.com/post/15383</link><guid isPermaLink="true">https://community.troikatronix.com/post/15383</guid><dc:creator><![CDATA[nZo]]></dc:creator><pubDate>Sat, 17 Jan 1970 12:44:32 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 05 Apr 2015 20:39:13 GMT]]></title><description><![CDATA[<p dir="auto">Ok. Well that's really what it should do... I just hadn't noticed and thought it served the purpose. I will write a version that works.. Using the simultaneous actor to trigger the action.</p>
]]></description><link>https://community.troikatronix.com/post/15381</link><guid isPermaLink="true">https://community.troikatronix.com/post/15381</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Sun, 05 Apr 2015 20:39:13 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 05 Apr 2015 14:19:06 GMT]]></title><description><![CDATA[<p dir="auto">Heres monitor output generated - first set of zeros created by changing value 2 to zero (1 was aready set to 0) - so just one output as only 1 input changed.</p>
<div>Then clicked on trigger value at top once which generates the next two sets, where the intermediate 'incorrect' value appears.</div>
<div>The final two sets of values (where nothing changes) are generated by changing the value of input 1 from 1 to 2</div>
<p dir="auto"><img src="/uploads/files/FileUpload/40/a08cfa-comp.jpg" alt="a08cfa-comp.jpg" class=" img-responsive img-markdown" /></p>
]]></description><link>https://community.troikatronix.com/post/15371</link><guid isPermaLink="true">https://community.troikatronix.com/post/15371</guid><dc:creator><![CDATA[nick]]></dc:creator><pubDate>Sun, 05 Apr 2015 14:19:06 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 05 Apr 2015 13:25:37 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
]]></description><link>https://community.troikatronix.com/post/15367</link><guid isPermaLink="true">https://community.troikatronix.com/post/15367</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Sun, 05 Apr 2015 13:25:37 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 05 Apr 2015 12:19:37 GMT]]></title><description><![CDATA[<p dir="auto">I would use this to give single trigger when both are changing 'simultaneously'. The short delay means the intermidaite value gets lost.</p>
<div>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.</div>
<div>Nick</div>
<p dir="auto"><a href="/uploads/files/FileUpload/8a/93d8f5-simultaneouscomparator.izz">93d8f5-simultaneouscomparator.izz</a></p>
]]></description><link>https://community.troikatronix.com/post/15366</link><guid isPermaLink="true">https://community.troikatronix.com/post/15366</guid><dc:creator><![CDATA[nick]]></dc:creator><pubDate>Sun, 05 Apr 2015 12:19:37 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 05 Apr 2015 11:00:00 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
]]></description><link>https://community.troikatronix.com/post/15365</link><guid isPermaLink="true">https://community.troikatronix.com/post/15365</guid><dc:creator><![CDATA[nick]]></dc:creator><pubDate>Sun, 05 Apr 2015 11:00:00 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 04 Apr 2015 23:22:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@Mark</a></p>
<div>I was surprised that this worked, since I believed that the Javascript would run each time a value arrives, </div>
<div>but in fact it seems that all values received during the cycle are used.  
Is this correct?</div>
<div>If so it makes for an easy way to trap incoming values for a synchronized process.</div>]]></description><link>https://community.troikatronix.com/post/15347</link><guid isPermaLink="true">https://community.troikatronix.com/post/15347</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Sat, 04 Apr 2015 23:22:16 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 04 Apr 2015 07:49:57 GMT]]></title><description><![CDATA[<p dir="auto">@<span class="Author"><a href="http://troikatronix.com/troikatronixforum/profile/149/DusX" rel="nofollow ugc">DusX</a></span></p>
<p dir="auto">Nice!<br />
</p>
]]></description><link>https://community.troikatronix.com/post/15335</link><guid isPermaLink="true">https://community.troikatronix.com/post/15335</guid><dc:creator><![CDATA[danshorten]]></dc:creator><pubDate>Sat, 04 Apr 2015 07:49:57 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 17 Jan 1970 12:43:53 GMT]]></title><description><![CDATA[<p dir="auto">A clean fix using Javascript actor.</p>
<pre>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 &lt; in2) { 
 opOut = 1; 
 debug("out1= " + opOut); 
 }else{
 opOut = 0; 
 debug("out2= " + opOut); 
 } } 
 if (op === 2){ if (in1 &gt; in2) { 
 opOut = 1; 
 debug("out1= " + opOut); 
 }else{
 opOut = 0; debug("out2= " + opOut); 
 } } 
 outVals = [opOut] 
 debug("vals= " + outVals ); 
 return outVals; 
} 
</pre>
<p dir="auto">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. ( <a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/7">@Michel</a> seems like I can't format the Javascript code anymore.. and HTML view auto extends so you can't make edits.) <img src="/uploads/files/FileUpload/ed/0a354b-compareviajs.jpg" alt="0a354b-compareviajs.jpg" class=" img-responsive img-markdown" /></p>
]]></description><link>https://community.troikatronix.com/post/15315</link><guid isPermaLink="true">https://community.troikatronix.com/post/15315</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Sat, 17 Jan 1970 12:43:53 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Fri, 03 Apr 2015 10:33:25 GMT]]></title><description><![CDATA[<p dir="auto">SS of above <img src="/uploads/files/FileUpload/ff/0084e4-screen-shot-2015-04-03-at-13.31.16.png" alt="0084e4-screen-shot-2015-04-03-at-13.31.16.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://community.troikatronix.com/post/15310</link><guid isPermaLink="true">https://community.troikatronix.com/post/15310</guid><dc:creator><![CDATA[danshorten]]></dc:creator><pubDate>Fri, 03 Apr 2015 10:33:25 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Fri, 03 Apr 2015 10:32:28 GMT]]></title><description><![CDATA[<p dir="auto">Had a flight this morning so spent 15 mins doing a quick inelegant but reliable patched solution to your problem.</p>
<p dir="auto">The thing is you are changing the numbers in your comparator one at a time giving you 3 combinations of numbers.</p>
<p dir="auto">Ie  you start with numbers A &amp; B and end with C &amp; D  giving you the following sequence of changes.</p>
<p dir="auto">AB</p>
<p dir="auto">CB</p>
<p dir="auto">CD</p>
<p dir="auto">So of course you get a true/false outcome for each combination.</p>
<p dir="auto">By ignoring the changes and then simply comparing the final pair you will get what I think it is you are after.</p>
<p dir="auto">First solution that came to mind is patched and attached.</p>
<p dir="auto">Hope it helps.</p>
<p dir="auto">Dan</p>
<p dir="auto">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 &amp; 0.4 – on my laptop anyway)</p>
<p dir="auto">I have also set initialize values for the toggles and gates.</p>
<p dir="auto"><a href="/uploads/files/FileUpload/1f/6aee35-random-comparator-solution.izz">6aee35-random-comparator-solution.izz</a></p>
]]></description><link>https://community.troikatronix.com/post/15309</link><guid isPermaLink="true">https://community.troikatronix.com/post/15309</guid><dc:creator><![CDATA[danshorten]]></dc:creator><pubDate>Fri, 03 Apr 2015 10:32:28 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 17 Jan 1970 12:34:01 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Mark <span>for detailed explanation.</span></p>
<p dir="auto">Actor's behavior seems logical. Process execution speed did not allow me to see what happens, look like both result.</p>
<p dir="auto">perhaps made on a dev code a short delay before analyse theses values for case 2 values put in on same (relative) time ...</p>
]]></description><link>https://community.troikatronix.com/post/15211</link><guid isPermaLink="true">https://community.troikatronix.com/post/15211</guid><dc:creator><![CDATA[nZo]]></dc:creator><pubDate>Sat, 17 Jan 1970 12:34:01 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 29 Mar 2015 15:00:37 GMT]]></title><description><![CDATA[<p dir="auto">I have been using Javascript to pack and unpack from JSON strings.</p>
]]></description><link>https://community.troikatronix.com/post/15210</link><guid isPermaLink="true">https://community.troikatronix.com/post/15210</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Sun, 29 Mar 2015 15:00:37 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 29 Mar 2015 14:40:09 GMT]]></title><description><![CDATA[<p dir="auto">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 ?</p>
]]></description><link>https://community.troikatronix.com/post/15209</link><guid isPermaLink="true">https://community.troikatronix.com/post/15209</guid><dc:creator><![CDATA[Stephane_Morisse]]></dc:creator><pubDate>Sun, 29 Mar 2015 14:40:09 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 29 Mar 2015 14:24:32 GMT]]></title><description><![CDATA[<p dir="auto"><span style="font-size:10pt">Dear nZo,</span></p>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">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 (&gt;)</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">10</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">5</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">Now you generate two random numbers. The first random number is 3.2 and so it arrives at value1</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">3.2</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">5</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">at this moment, the output if false (0) and the 'false' output triggers</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">Now the next random number comes (for value2) and it is 1.8, so now we have</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">3.2</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">1.8</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">and the result of the comparison is true  the 'true' output triggers.</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">Does that help you to understand what's happening?</div>
<div style="font-family:Arial, Verdana;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal">  
I can see however that this is confusing. I will file a bug report on this topic and make sure we look into it.</div>
<div>
<div><span style="font-size:13.3333330154419px">Best Wishes,</span></div>
<div><span style="font-size:13.3333330154419px">Mark</span></div>
</div>]]></description><link>https://community.troikatronix.com/post/15207</link><guid isPermaLink="true">https://community.troikatronix.com/post/15207</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Sun, 29 Mar 2015 14:24:32 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 29 Mar 2015 14:06:14 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">exemple : put 2 value ( ie 35 and 56) to create a rectangle. I need a true when value 1 &lt; value 2 (ie to choose rectangle horz or vert move according to shape dimension). Who use comparator actor to make this ?</p>
]]></description><link>https://community.troikatronix.com/post/15205</link><guid isPermaLink="true">https://community.troikatronix.com/post/15205</guid><dc:creator><![CDATA[nZo]]></dc:creator><pubDate>Sun, 29 Mar 2015 14:06:14 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 17 Jan 1970 12:33:50 GMT]]></title><description><![CDATA[<p dir="auto">Out of curiosity I tried this as well. I have no idea for the purpose of this.</p>
<div>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.</div>]]></description><link>https://community.troikatronix.com/post/15203</link><guid isPermaLink="true">https://community.troikatronix.com/post/15203</guid><dc:creator><![CDATA[vanakaru]]></dc:creator><pubDate>Sat, 17 Jan 1970 12:33:50 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 29 Mar 2015 09:59:11 GMT]]></title><description><![CDATA[<p dir="auto">Isadora does process actors from top to bottom so it will have a slight delay.</p>
]]></description><link>https://community.troikatronix.com/post/15202</link><guid isPermaLink="true">https://community.troikatronix.com/post/15202</guid><dc:creator><![CDATA[Skulpture]]></dc:creator><pubDate>Sun, 29 Mar 2015 09:59:11 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 17 Jan 1970 12:33:38 GMT]]></title><description><![CDATA[<p dir="auto">What do you say with placing actors spatially ?  I don't find mark's tutorial which way is it ?</p>
]]></description><link>https://community.troikatronix.com/post/15201</link><guid isPermaLink="true">https://community.troikatronix.com/post/15201</guid><dc:creator><![CDATA[nZo]]></dc:creator><pubDate>Sat, 17 Jan 1970 12:33:38 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sun, 29 Mar 2015 07:45:50 GMT]]></title><description><![CDATA[<p dir="auto">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 ?</p>
]]></description><link>https://community.troikatronix.com/post/15200</link><guid isPermaLink="true">https://community.troikatronix.com/post/15200</guid><dc:creator><![CDATA[Stephane_Morisse]]></dc:creator><pubDate>Sun, 29 Mar 2015 07:45:50 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 17 Jan 1970 12:33:36 GMT]]></title><description><![CDATA[<p dir="auto">thanks so much for your help !</p>
<p dir="auto">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)</p>
<p dir="auto">comparator actor use a AND logical operator result  .... very strange</p>
]]></description><link>https://community.troikatronix.com/post/15199</link><guid isPermaLink="true">https://community.troikatronix.com/post/15199</guid><dc:creator><![CDATA[nZo]]></dc:creator><pubDate>Sat, 17 Jan 1970 12:33:36 GMT</pubDate></item><item><title><![CDATA[Reply to Comparator actor behaviour ? on Sat, 28 Mar 2015 23:29:10 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
<div>Maybe add a very short trigger delay on the second random trigger.</div>]]></description><link>https://community.troikatronix.com/post/15198</link><guid isPermaLink="true">https://community.troikatronix.com/post/15198</guid><dc:creator><![CDATA[Skulpture]]></dc:creator><pubDate>Sat, 28 Mar 2015 23:29:10 GMT</pubDate></item></channel></rss>