More elegant way to send messages through a gate?

Jul 12, 2009 at 3:50pm

More elegant way to send messages through a gate?

I need to extract the first element of a list and use it to open a gate, then send through a message.

I’m currently using (zil rot -1) to put the number at the end, then (zl ecils 1) to spit out the number first, and then the rest.

Is there a more elegant way to do this? I’m sure there is, but my brain doesn’t seem to be working.

– Pasted Max Patch, click to expand. –
#44711
Jul 12, 2009 at 4:32pm

[trigger] can do it… mmmm, trigger.

– Pasted Max Patch, click to expand. –
#160902
Jul 13, 2009 at 2:27am

thats what [route 2 3 4 5] does when you send it “3 info”.

#160903
Jul 13, 2009 at 5:09am

@seejayjames:

that’s what I thought at first, but then you need to have two patch cords from the sources of your message to the gate. The (zl rot) followed by (zl ecils) maneuver only has to be set up once, right before the gate.

@Roman:

route works well for this, but there are circumstances in which I need to keep the gate open for subsequent messages, which are not prefixed with a number.

But thanks for your comments – I learn a lot this way (and hope it is useful for you too)

#160904
Jul 14, 2009 at 8:51am

Doesn’t this kinda show the inlets of [gate] are the wrong way around? I’ve always had less than average love for this object , because it feels odd. Never really thought about the why, does anyone know? Seems logical to me the main data goes though left inlet, left outlet by default.

#160905
Jul 15, 2009 at 2:13am

would this work?

– Pasted Max Patch, click to expand. –

jml

#160906
Jul 15, 2009 at 12:24pm
Bas van der Graaff wrote on Tue, 14 July 2009 10:51
Doesn’t this kinda show the inlets of [gate] are the wrong way around? I’ve always had less than average love for this object , because it feels odd. Never really thought about the why, does anyone know? Seems logical to me the main data goes though left inlet, left outlet by default.

i know exactly what you mean, and this is why my custom gate
abstractions all take the data in their left inlet.

the guy who invented the [gate] object in 1861 was probably
left-handed? there is no other logical explanation for that.

-110

#160907
Jul 15, 2009 at 12:32pm

[quote title=Roman Thilenius wrote on Wed, 15 July 2009 14:24]

Bas van der Graaff wrote on Tue, 14 July 2009 10:51
Doesn’t this kinda show the inlets of [gate] are the wrong way around? I’ve always had less than average love for this object , because it feels odd. Never really thought about the why, does anyone know? Seems logical to me the main data goes though left inlet, left outlet by default.

i know exactly what you mean, and this is why my custom gate
abstractions all take the data in their left inlet.

it still happens to me after 8 years that i connect a [gate]
wrong and need 10 minutes to find it.

the guy who invented the [gate] object in 1861 was probably
left-handed? there is no other logical explanation for that.

but back to the original question:

[zl slice 1]+[buddy] could replace your [zl rot][zl ecils 1]
but thats two objects, too, and it won´t work with less.

-110

#160908
Jul 15, 2009 at 12:59pm

I would format all those messages so they have the ID first and simply use route.

Designing patches in the most logical (and simple) way helped me a lot when they got complex.

Keynames in messages -> [route] is very handy to not loose track of what is going where (and keep patches readable for the future).

My 0.02€…

_y

#160909
Jul 15, 2009 at 9:07pm

sounds to me like you need to filter a number in certain circumstances but not in others. you could just use a select object for that.

#160910

You must be logged in to reply to this topic.