Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Conditional

Share your components here. First one to 100 wins!

Conditional

Postby bLackburst » Tue Jan 12, 2016 2:45 am

Comparing the first input to the second:

-Is Equal to
-Is Greater than
-Is Less than

Drag it onto "My Components" in Palette.
Attachments
Conditional.tox
Updated to use expression chops since optimised python.
(878 Bytes) Downloaded 42 times
Last edited by bLackburst on Thu Jul 12, 2018 10:35 pm, edited 2 times in total.
bLackburst
 
Posts: 297
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: Conditional

Postby snaut » Wed Jan 13, 2016 2:22 am

Very nice and super useful!

Small comment:
if the input values are equal, "is less than" evaluates to 1.

Cheers
Markus
User avatar
snaut
Staff
 
Posts: 827
Joined: Mon Nov 12, 2007 6:21 pm
Location: Toronto

Re: Conditional

Postby bLackburst » Thu Jan 14, 2016 10:54 pm

I had one job! haha. Yeah, I'll fix that.
bLackburst
 
Posts: 297
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: Conditional

Postby stevenmb24 » Mon Jun 26, 2017 2:35 am

Hey bLackburst,
This is pretty neat. Can you post the updated tox?
stevenmb24
 
Posts: 24
Joined: Tue Apr 22, 2014 12:17 pm

Re: Conditional

Postby bLackburst » Mon Aug 21, 2017 2:48 am

updated. sorry, completely forgot about it.
bLackburst
 
Posts: 297
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: Conditional

Postby RonnyT » Mon Jul 02, 2018 4:17 pm

just opened it, it has an error in the logic node.

cheers
RonnyT
 
Posts: 8
Joined: Wed Jun 20, 2018 6:16 am

Re: Conditional

Postby bLackburst » Mon Jul 02, 2018 11:37 pm

works fine for me, 099 23470
bLackburst
 
Posts: 297
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: Conditional

Postby jmt4zj » Wed Jul 11, 2018 12:41 am

Just a heads up, for me there are ops in this container that always cook, total cook time of .02 to .05 ms.

An alternative if you're comparing only a single channel is to use the Expression Chop, with an expression like this:
Code: Select all
me.inputs[0][0] > me.inputs[1][0]


This is equivalent to your 'greater than' mode (for only one channel). Execution time is .006 ms on my machine, and with the new python optimizations in touch it stops cooking if the inputs aren't cooking.
Jonathan Thompson
@pointshader
http://particularexperienc.es
User avatar
jmt4zj
 
Posts: 99
Joined: Mon Nov 01, 2010 3:15 am
Location: NYC

Re: Conditional

Postby bLackburst » Thu Jul 12, 2018 10:36 pm

Updated to use expression CHOPs, getting .013ms
bLackburst
 
Posts: 297
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: Conditional

Postby jmt4zj » Tue Jul 17, 2018 6:38 pm

Guess this is the first public tox that has some of my input in it! Cheers! 8-) 8-) 8-)
Jonathan Thompson
@pointshader
http://particularexperienc.es
User avatar
jmt4zj
 
Posts: 99
Joined: Mon Nov 01, 2010 3:15 am
Location: NYC


Return to Shared .tox Components

Who is online

Users browsing this forum: No registered users and 7 guests