Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Compare Values

Still a little green? Ask your beginner's questions here

Compare Values

Postby niknaim » Tue Mar 05, 2019 4:45 am

What I trying to do is:
I have 4 times constantly changing value. For exemple 4 waveChops giving out their values to constantChops. No I want to find out which of th waveChop-value is currenty the highest. If WaveChop 1 gives at a certain moment out the highest value of all 4 waveChops then I will need an output/selection of the value "1". As soon as e.g. waveChop2 oder 3 is the highest the value it should change according to "2" or "3".
Unfortunately I cannot even think of a start how to solve this problem. Would be happy if someone could help me out with that.
Attachments
COMPARE.tox
(742 Bytes) Downloaded 46 times
niknaim
 
Posts: 17
Joined: Sun Apr 23, 2017 7:51 am
Location: Stuttgart

Re: Compare Values

Postby nettoyeur » Tue Mar 05, 2019 11:29 am

if you merge the 3 wave channels , and then add a Shuffle CHOP (set to swap channels and samples) , you'll get a single channel which has 3 samples. An Analyze CHOP (set to Maximum) gives you the maximum value in that channel.
Attachments
COMPARE_analyze.tox
(910 Bytes) Downloaded 46 times
Idzard Kwadijk | freelance TouchDesigner consultant | IdzArd.com
Checkout ChopChopChop.org - the TouchDesigner marketplace!
nettoyeur
 
Posts: 1168
Joined: Mon Oct 15, 2012 12:00 pm
Location: Amsterdam, The Netherlands

Re: Compare Values

Postby niknaim » Tue Mar 05, 2019 12:01 pm

Hello Nettoyeur,
thanks a lot for your file. But to be honest I dont really understand it. What di ge out from the shullfel and what from the analyse tool?

And maybe I hannt been clear in my description. Just to be sure: In the end I will need an output with the value "1", as soon as the wave1 has the highest value of alle the waves, value "2" as soon as Wave2 is the highest and os on. I will need to enter thsi values in a selector to change its selection according to the wave that is the highest.
niknaim
 
Posts: 17
Joined: Sun Apr 23, 2017 7:51 am
Location: Stuttgart

Re: Compare Values

Postby CorbinWhite » Tue Mar 05, 2019 1:43 pm

Nettoyeur's method is solid, just select 'Index of Maximum' in the function drop down menu of the analyze CHOP. if you want to start at 1, instead of 0, which is where indices start, stick a math chop on and add 1.
CorbinWhite
 
Posts: 128
Joined: Sun Aug 16, 2015 2:49 pm

Re: Compare Values

Postby nettoyeur » Tue Mar 05, 2019 3:36 pm

Ah sorry I only glanced for a sec at your question and thought you needed the highest value itself, for the index indeed what corbin says

That'll teach me to read properly next time ;)
cheers idzard
Idzard Kwadijk | freelance TouchDesigner consultant | IdzArd.com
Checkout ChopChopChop.org - the TouchDesigner marketplace!
nettoyeur
 
Posts: 1168
Joined: Mon Oct 15, 2012 12:00 pm
Location: Amsterdam, The Netherlands


Return to Beginners

Who is online

Users browsing this forum: No registered users and 16 guests