Forums > MaxMSP

alternative to [gate] object – need 100's of outputs

August 21, 2008 | 11:18 am

Hi people,
Can anyone offer me some advice.
I’m looking for an object, similar to gate, that will allow me to route an incoming signal to one of multiple outputs.

The [gate] object is no good as I need in excess of 400 outputs. According to the reference for the [gate] object is limited to a maximum of 10 outputs (although I’ve used it with more – but not enough for this patch!)

I’ve tried the "See Also" section of the [gate] helpfile, but I can’t find any info on the maximum number of outlets objects like [router] allow – I’ve done some preliminary testing and I don’t think there’s enough.
I’ve also looked on maxobjects.com and I couldn’t find an alternative.

This is starting to hurt my head a little!!! ;-)

I’m starting to think I may have to look at javascript – but that opens up even more problems as I’m not that well versed in java…

Does anyone have any suggestions?
Cheers
galaa


August 21, 2008 | 12:05 pm

use [forward] & a bunch of receives:

– Pasted Max Patch, click to expand. –

M

On Aug 21, 2008, at 7:18, Dave Raybould wrote:

>
> Hi people,
> Can anyone offer me some advice.
> I’m looking for an object, similar to gate, that will allow me to
> route an incoming signal to one of multiple outputs.
>
> The [gate] object is no good as I need in excess of 400 outputs.
> According to the reference for the [gate] object is limited to a
> maximum of 10 outputs (although I’ve used it with more – but not
> enough for this patch!)
>
> I’ve tried the "See Also" section of the [gate] helpfile, but I
> can’t find any info on the maximum number of outlets objects like
> [router] allow – I’ve done some preliminary testing and I don’t
> think there’s enough.
> I’ve also looked on maxobjects.com and I couldn’t find an alternative.
>
> This is starting to hurt my head a little!!! ;-)
>
> I’m starting to think I may have to look at javascript – but that
> opens up even more problems as I’m not that well versed in java…
>
>
> Does anyone have any suggestions?
> Cheers
> galaa


August 21, 2008 | 12:10 pm

that’s excellent. Thanks

Now to work out how to adapt the patch to fit in the new system..!!!!

galaa


August 21, 2008 | 10:59 pm

OTOH, if the patch design really requires gate, there’s no reason you can’t chain multiple gates…

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 174 56 26 196617 358;
#P newex 1207 371 53 196617 print 358;
#P message 24 56 14 196617 1;
#P newex 64 196 41 196617 print 1;
#P newex 22 144 27 196617 + 1;
#P message 105 56 26 196617 180;
#P newex 63 312 53 196617 print 180;
#P newex 63 252 47 196617 print 90;
#P message 140 56 26 196617 270;
#P newex 63 371 53 196617 print 270;
#P newex 1170 200 47 196617 print 89;
#P newex 22 287 30 196617 – 90;
#P newex 63 346 1171 196617 gate 90;
#P newex 22 228 30 196617 – 90;
#P newex 63 287 1171 196617 gate 90;
#P newex 22 169 30 196617 – 90;
#P newex 47 85 27 196617 t b i;
#P message 77 56 20 196617 90;
#P message 47 56 20 196617 89;
#P newex 63 228 1171 196617 gate 90;
#P newex 64 169 1171 196617 gate 90;
#P connect 20 0 4 0;
#P connect 8 88 19 0;
#P connect 18 0 4 0;
#P connect 0 0 17 0;
#P connect 4 1 16 0;
#P connect 4 1 0 0;
#P connect 16 0 5 0;
#P fasten 4 0 0 1 52 108 1230 108;
#P connect 2 0 4 0;
#P connect 3 0 4 0;
#P connect 12 0 4 0;
#P connect 15 0 4 0;
#P connect 5 0 7 0;
#P connect 5 0 1 0;
#P connect 7 0 9 0;
#P connect 7 0 6 0;
#P connect 9 0 8 0;
#P connect 6 0 14 0;
#P connect 6 89 8 1;
#P connect 1 89 6 1;
#P connect 0 89 1 1;
#P connect 1 0 13 0;
#P connect 8 0 11 0;
#P connect 0 88 10 0;
#P window clipboard copycount 21;


August 22, 2008 | 7:41 am

Dave Raybould schrieb:
> The [gate] object is no good as I need in excess of 400 outputs.
> According to the reference for the [gate] object is limited to a
> maximum of 10 outputs (although I’ve used it with more – but not
> enough for this patch!)

It seems that the limit is 100. But what for do you need 400 outputs?
Just to connect them would be a pain. It sounds that you might want to
look into some poly~ techniques and combine them with mattyo’s suggestion…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


August 23, 2008 | 12:04 pm

The patch I’m creating takes 100′s of short video files from a folder (actual amount varies) and loads them up into jit.qt.movie objects for positioning with openGL objects.
Due to the large number of objects required, I’m using javascript to create and connect all of the objects – a lot easier than doing it manually!!!

the forward method looks like it will do the trick – I’d just forgotten that it existed.

I looked into doing it with [poly~] but I had some problems getting things to work correctly…

galaa


August 24, 2008 | 6:22 pm

Dave Raybould schrieb:
> I looked into doing it with [poly~] but I had some problems getting
> things to work correctly…

Its as easy as sending a target message to the poly~ object…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


August 25, 2008 | 2:09 pm

Thanks, but I know about the target message.

I was just finding it very time consuming getting the various jitter objects working correctly in the poly~ object.

The javascript approach is working now.


August 25, 2008 | 3:17 pm

I’d personally use an abstraction or subpatch with a [patcherargs] to set a receive (or better yet, use javascript to use the object name so you don’t need to number them) and use a [forward] to send messages there. Saves you the hassle of working with poly~ if you don’t like that solution.


July 7, 2009 | 3:34 am

mattyo wrote on Thu, 21 August 2008 22:05use [forward] & a bunch of receives:

– Pasted Max Patch, click to expand. –

M

hi, this patch consistently crashes my max 5.0.7 os x 10.4.11.
i’ve chosen "new from clipboard" as well as trying to paste in a new patcher window. is there something i’m doing wrong?
cheers,


July 7, 2009 | 7:43 am

The patch from matty works fine in my Mac OS X 10.5 and Max 5.07


July 7, 2009 | 8:07 am

Pasting in an empty patch, does that work for you?

_
johan


July 7, 2009 | 10:38 am

it appears as though it’s working now.
huh,
thanks anyway….


Viewing 13 posts - 1 through 13 (of 13 total)