Changable arguments and route? (or equivilent)
I'm writing some MIDI leaning/interpeting patches...
And essentially I want to be able to dynamically change the arguments of a "route" object...or have something that does the same thing.
I took a look at the tutorials and found the $/# changeable variables but I think route is making them literal matches instead of changables.
Any ideas?
Thanks for this and all the other help I've received here.
-sean
Ive made a simple abstraction in my v001 library that changes the
first arguments to route dynamically - you could easily modify it for
more arguments should you want.
feel free to check it out. 001.vade.info - the specific file is
v001.lib.dynamicroute
im 99% positive someone else has a better answer or external, but the
meantime you can see how I did it.
On Dec 29, 2006, at 1:55 PM, Sean Stevens wrote:
>
> I'm writing some MIDI leaning/interpeting patches...
>
> And essentially I want to be able to dynamically change the
> arguments of a "route" object...or have something that does the
> same thing.
>
> I took a look at the tutorials and found the $/# changeable
> variables but I think route is making them literal matches instead
> of changables.
>
> Any ideas?
>
> Thanks for this and all the other help I've received here.
>
> -sean
v a d e //
www.vade.info
abstrakt.vade.info
I don't think route's arguments can be changed on the fly. Select can be if there's only one argument, so you could send whatever number or word into it and use the bang to forward the value onward (be sure your order of messages are correct using a trigger). Match also does this and can be used with multiple arguments, check these out.
I *believe* the $ and $1 etc. are illegal in object boxes like route. And the #1 #2 etc. is generally only used in patcher instances (like with bpatcher) to stand for one of the nine arguments that you can send the patcher itself. Very handy but doesn't seem like what you need in this case.
I have wondered the same thing at certain points, being able to set the arguments of route dynamically would be great. Not adding or taking away any of them, just being able to change them. This doesn't seem like it would be much of a problem in the object's code itself, as each argument is stored into a variable... for example, the "set 5 29" message would set argument 5 to look for value 29?
I'm certainly no expert so I may be missing something but this is my understanding at this point....
--CJ
When searching for a feature, go first at the Max objects database:
A link to this site from the onboard forum could be useful.
And you'll find there several options, such "Lmatch".
Bye,
Philippe
I think the issue is that since route needs to be able to route anything (serial data, midi, string, text, ints, etc) and only has one inlet you can't reserve any delimiters to tell it to change things...it just ends up routing them.
Perhaps it should be a feature request for a 2nd inlet? :)
I definitely need the whole route functionality, but I don't need to change the number of arguments runtime.
I'll try some of the abstractions in the meantime, but route would be perfect.
Thanks, and if anyone has other ideas please chime in :)
You can build this fairly painlessly with an abstraction, using
thispatcher scripting to delete and rebuilt an instance of route that
has n number of variables, with n numbers of inlets and outlets
associated. Iveonly done this for one variable (the equivalent of
your set 1 something, set 1 somethingelse type message).
On Dec 29, 2006, at 2:29 PM, Seejay James wrote:
>
> I have wondered the same thing at certain points, being able to set
> the arguments of route dynamically would be great. Not adding or
> taking away any of them, just being able to change them. This
> doesn't seem like it would be much of a problem in the object's
> code itself, as each argument is stored into a variable... for
> example, the "set 5 29" message would set argument 5 to look for
> value 29?
>
> I'm certainly no expert so I may be missing something but this is
> my understanding at this point....
v a d e //
www.vade.info
abstrakt.vade.info
The object you are looking for is called XROUTE.
you can find it here:
https://cycling74.com/twiki/bin/view/Share/Jhno
or
I used it in a simmilar patch you are building. It's very handy indeed. However, I transfered to a macbook pro and Xroute isn't UB yet. Hope Francois makes a UB version.
here's a UB build of xroute:
if the maintainer of the share pages would be so kind as to put it on
jhno's page, that would be great.
cheers
/*j
> The object you are looking for is called XROUTE.
>
> you can find it here:
> https://cycling74.com/twiki/bin/view/Share/Jhno
Sean Stevens wrote:
> Thanks, and if anyone has other ideas please chime in :)
the below abhaXion will accept a list in the right inlet to redefine the
routes... (to change a single outlet give it a "set #ofoutlet match"...)
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
Quote: i@seanstevens.com wrote on Fri, 29 December 2006 19:55
----------------------------------------------------
> I'm writing some MIDI leaning/interpeting patches...
>
> And essentially I want to be able to dynamically change the arguments of a "route" object...or have something that does the same thing.
>
how about [zl sub]?
Hi Jasch,
Thanx for making the xroute UB. My old patch is working fine now.
in case its all about numbers, you can do that with [split].
replace [route 5 66] with [split 5 5], [split 66 66]
for a dynamic route.
its more work, slower, and does not work with lists, but
probably the best you can do in all other cases.
-110
Quote: Roman Thilenius wrote on Mon, 01 January 2007 19:36
----------------------------------------------------
>
> in case its all about numbers, you can do that with [split].
>
> replace [route 5 66] with [split 5 5], [split 66 66]
> for a dynamic route.
>
> its more work, slower, and does not work with lists, but
> probably the best you can do in all other cases.
>
>
> -110
----------------------------------------------------
oh, and of course for int, you could use comparison operators
(input bangs a dynamic number which is sent into [=])