Feb 22, 2012 at 8:31pm
hi all : )
Is there an object like route or a method that can have its argument changed or set with a message box?
eg: (route this) can be changed to > (route that) with a message box (set that) ?
thanks for your help :)
Feb 22, 2012 at 8:41pm
it works with “set foo” when [route] has only one argument, otherwise you
my way is to make an abstraction with 8 or more [route] with no arguments
in case you need to work with symbols, [zl] is your friend to build all kind of
Feb 22, 2012 at 8:45pm
In Max 6, route has an inlet for each output so that you can set them independently.
Feb 22, 2012 at 11:14pm
not sure how ‘set foo’ works , i am on max 5, so i am trying to use (if)
here is my problem:
I have a stream of numbers 4,2,7,0,5,6,7,8,9,
these are given a (prepend) for example the letter ‘h’ so it becomes:
h 4, h 2, h 7, h 0, h 5, h 6, h 7, h 8, h 9,
with route ,I could simply say (route h)
And I would get my number stream back again on the otherside of udp port. The idea is to stream multiple channels of numbers through a single udp port prepending them a,b,c,d,e,f,g,and so on. hundreds of them.
but on max 5 I cannot change route from ‘h’ to ‘i’ or ‘j’ when need be, to be able to do that via a message box would be great.
so (if) might work, but I am having trouble finding the correct wording.
(if $i1 == $i2 then $i2 ) $i1 being ht stream of numbers and $i2 being ‘h’ or ‘i’ or ‘j’
but no luck so far.
hope this make sense.
Feb 22, 2012 at 11:56pm
This requires [strcmp] from the Jasch objects:
– Pasted Max Patch, click to expand. –
Copy all of the following text.Then, in Max, select New From Clipboard.
It’s funny how clunky Max 5 feels after living in Max 6 for a while.
Feb 23, 2012 at 12:07am
wow, thanks so much Chris , I shall try this out asap.
: P , : )
Feb 23, 2012 at 1:24am
real nice bit of patching : )
well done, even for knowing about the module, and then bringing it all together to make it work just like route, with the ability to assign from a msg box : )
Cool. thank you : P
Feb 23, 2012 at 4:14am
“but on max 5 I cannot change route from ‘h’ to ‘i’ or ‘j’ when need be, to be able to do that via a message box would be great.”
well it should work with “set i”, but if you dont have the balls to try it (or to look in the reference) …
Feb 23, 2012 at 4:58am
Roman, I don’t think that route accepts a set message. Did _you_ try it or look at the reference?
Feb 23, 2012 at 5:53am
my bad, sorry: memory error in 110.brain!
that was not [route] but [select], and it is not a set messag, it is just an extra inlet.
but you must admit that i was close!
and the other 15 people i have been telling this since 2001 did never complain.
p.s. ah, i know why that happened. back in the days when you were changing a
Feb 26, 2012 at 11:07am
Roman yes, close again : )
I tried (select) and (route) and loads of other things,
you mention (select) but it appears to have an extra inlet to ‘set’ numeric values, not letters/words from a message box, hence I needed help. Maybe check your reference as my max 5 doesn’t mention it. are you on max 6 or 4? or maybe your on a mac?
Anyway, problem was resolved thanks to Chris’s clever tweak. maybe you didn’t see that before you posted? check it out, its really cool.
incidentally, chris’s idea will work with (strcmp2) also, if you do not have (strcmp).
Feb 26, 2012 at 1:12pm
You can use [zl compare] instead of [strcmp]. So there is no external needed.
Feb 26, 2012 at 1:48pm
thanks : )
You must be logged in to reply to this topic.