Reaktor - How to compare two values and "transmit" the one which satisfy the comparation?
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
Hi,
I'm new in Reaktor, and I don't understand how to do this. Once I got two different input values, I'd like to pass to the output the one that is (for example) greater than the other:
here I'd like to pass the multiplied sample lenght if its lower than the original lenght; else, the original lenght. But if I link the <= pin to another Compare module (which check this value and the current ms position; than if > trigger somethings) nothing happens. It seems that the first Compare output nothing.
Where am I wrong?
Also, for testing which value is output, which module should I link to the Compare module to see the value in numbers? Can you help me? Thanks!
I'm new in Reaktor, and I don't understand how to do this. Once I got two different input values, I'd like to pass to the output the one that is (for example) greater than the other:
here I'd like to pass the multiplied sample lenght if its lower than the original lenght; else, the original lenght. But if I link the <= pin to another Compare module (which check this value and the current ms position; than if > trigger somethings) nothing happens. It seems that the first Compare output nothing.
Where am I wrong?
Also, for testing which value is output, which module should I link to the Compare module to see the value in numbers? Can you help me? Thanks!
You do not have the required permissions to view the files attached to this post.
- KVRian
- 1353 posts since 31 Aug, 2007 from wales
quick response:
stick a 'numeric readout' module on the compare outputs to see what they are doing
the compare is a logic module outputting 0 for false and 1 for true
so:
if A>B upper output = 1, lower = 2
if A<=B lower output =1, upper = 2
you need a different method to achieve your aim
which eludes my memory
and i don't have time to work through it atm...
hope this helps
dave
edit:
i suspect a core macro with read and write and compare macros will do it
but i can never remember the way to do these things
and have to relearn every time unless i am completely immersed
a post on the reaktor forum should result in several ways to skin the cat
dave
stick a 'numeric readout' module on the compare outputs to see what they are doing
the compare is a logic module outputting 0 for false and 1 for true
so:
if A>B upper output = 1, lower = 2
if A<=B lower output =1, upper = 2
you need a different method to achieve your aim
which eludes my memory
and i don't have time to work through it atm...
hope this helps
dave
edit:
i suspect a core macro with read and write and compare macros will do it
but i can never remember the way to do these things
and have to relearn every time unless i am completely immersed
a post on the reaktor forum should result in several ways to skin the cat
dave
-
- KVRAF
- 15514 posts since 13 Oct, 2009
Just use the compare with a router. You will probably need an order module to make sure that the comparison completes before the routing happens. Look up router and order in the manual.
-
- KVRian
- 830 posts since 9 Aug, 2004 from Berlin
First just to iron out any possible mistake, in your screenshot the modules are disabled because they are not plugged to anything.
They need at least to be connected to a numeric readout set to "always active", and probably modules set to mono or the instrument they sit in set to 1 voice max.
Seems like you would want to add a "Relay" to your structure with 2 inputs, and plug the upper output of the compare module to Ctl input of the Relay and the two values you want to use to each input.
Or you could use a corecell with a "min" math macro in it, which will always output the lowest value.
They need at least to be connected to a numeric readout set to "always active", and probably modules set to mono or the instrument they sit in set to 1 voice max.
Seems like you would want to add a "Relay" to your structure with 2 inputs, and plug the upper output of the compare module to Ctl input of the Relay and the two values you want to use to each input.
Or you could use a corecell with a "min" math macro in it, which will always output the lowest value.
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
Nice. Thanks guys! It seems to works with routing, even without any "order module": I've just linked the inputs of the compare to the inputs of router. Not sure if this is solid without "order", but I don't see why it shouldn't. Where should I stick it? Between Compare and Router?
P.S. what's the differences between Relay and Router? They seems equal in this case...
P.S. what's the differences between Relay and Router? They seems equal in this case...
You do not have the required permissions to view the files attached to this post.
-
- KVRAF
- 15514 posts since 13 Oct, 2009
Order goes between each input and the comparator and router. I still get confused with event ordering so it may not be necessary here, but, what it should do is ensure that the compare gets any input events and produces its value before the router makes its decision.Nowhk wrote:Nice. Thanks guys! It seems to works with routing, even without any "order module": I've just linked the inputs of the compare to the inputs of router. Not sure if this is solid without "order", but I don't see why it shouldn't. Where should I stick it? Between Compare and Router?
P.S. what's the differences between Relay and Router? They seems equal in this case...
This macro works for me.b (sorry, postimage won't allow me to put this inline)
http://postimg.org/image/qgni6wjgp/
- KVRian
- Topic Starter
- 878 posts since 2 Oct, 2013
Why this should "ensure" processing order? I mean, ok that pin 1 of both Order is processed together, but if output of 2 is outputted before Compare finish, I got the same problem :Oghettosynth wrote:Order goes between each input and the comparator and router. I still get confused with event ordering so it may not be necessary here, but, what it should do is ensure that the compare gets any input events and produces its value before the router makes its decision.Nowhk wrote:Nice. Thanks guys! It seems to works with routing, even without any "order module": I've just linked the inputs of the compare to the inputs of router. Not sure if this is solid without "order", but I don't see why it shouldn't. Where should I stick it? Between Compare and Router?
P.S. what's the differences between Relay and Router? They seems equal in this case...
This macro works for me.b (sorry, postimage won't allow me to put this inline)
http://postimg.org/image/qgni6wjgp/
P.S. whats the last module you link from Router M->1 output? Name? I think I can see value inside it on the green zone?