Forums > MaxMSP

how to strip a bang from a message

July 10, 2007 | 5:24 pm

Hi,
I’m wondering if there’s a way of stripping a bang off a message. I ask this because I want to send messages into an OSC buffer without closing the buffer and sending it.

Thanks!


July 10, 2007 | 5:32 pm

On 10 juil. 07, at 19:24, Daniel Grigsby wrote:

> Hi,
> I’m wondering if there’s a way of stripping a bang off a message. I
> ask this because I want to send messages into an OSC buffer without
> closing the buffer and sending it.

right outlet of [route bang]?

ej


July 10, 2007 | 5:59 pm

Quote: Daniel Grigsby wrote on Tue, 10 July 2007 10:24
—————————————————-
> Hi,
> I’m wondering if there’s a way of stripping a bang off a message. I ask this because I want to send messages into an OSC buffer without closing the buffer and sending it.
>
> Thanks!
—————————————————-

How is the bang getting associated with the message? Could you make a small example patch?

mz


July 10, 2007 | 6:10 pm

Sure, here’s a mini example patch that might help describe what I want to do.

max v2;
#N vpatcher 200 399 800 799;
#P button 82 125 15 0;
#P window setfont "Sans Serif" 9.;
#P flonum 41 49 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 41 73 38 196617 bla $1;
#P newex 41 171 126 196617 udpsend 127.0.0.1 57120;
#P newex 41 149 90 196617 OpenSoundControl;
#P newex 41 97 72 196617 prepend /wt2;
#P window linecount 2;
#P comment 102 120 341 196617 a bang comes out with each message which will close the OSC buffer and send it. I don’t want to send a message at every output from prepend.;
#P connect 5 0 4 0;
#P connect 4 0 1 0;
#P fasten 1 0 2 0 46 141 46 141;
#P connect 2 0 3 0;
#P connect 1 0 6 0;
#P pop;

Thanks for the help!


July 10, 2007 | 6:37 pm

any message, int, float…whatever…will make the bang object light
up. it’s not a "bang" message, tho (although what comes out of the
bang object as a result is a "bang" message).

if you connect a bang below the OSC object, you’ll see that in fact
no message is being sent until you send it a bang, so not seeing the
problem you are seeing.
David

On Jul 10, 2007, at 11:10 AM, Daniel Grigsby wrote:

>
> Sure, here’s a mini example patch that might help describe what I
> want to do.
>
> max v2;
> #N vpatcher 200 399 800 799;
> #P button 82 125 15 0;
> #P window setfont "Sans Serif" 9.;
> #P flonum 41 49 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P message 41 73 38 196617 bla $1;
> #P newex 41 171 126 196617 udpsend 127.0.0.1 57120;
> #P newex 41 149 90 196617 OpenSoundControl;
> #P newex 41 97 72 196617 prepend /wt2;
> #P window linecount 2;
> #P comment 102 120 341 196617 a bang comes out with each message
> which will close the OSC buffer and send it. I don’t want to send a
> message at every output from prepend.;
> #P connect 5 0 4 0;
> #P connect 4 0 1 0;
> #P fasten 1 0 2 0 46 141 46 141;
> #P connect 2 0 3 0;
> #P connect 1 0 6 0;
> #P pop;
>
> Thanks for the help!


July 10, 2007 | 6:46 pm

ah, I see. Thanks.


July 10, 2007 | 7:03 pm

At 12:10 PM -0600 7/10/07, Daniel Grigsby wrote:
>Sure, here’s a mini example patch that might help describe what I want to do.

The bang you see with the bang object hanging off of the prepend object is not part of the message. A bang object converts whatever message it receives into a bang.

Here’s your patch modified to show the activity a little better:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 410 107 100 196617 Look at input;
#P window linecount 0;
#P message 346 126 106 196617;
#P window linecount 1;
#P newex 346 106 62 196617 prepend set;
#P window linecount 0;
#P message 346 196 144 196617;
#P window linecount 1;
#P newex 346 176 62 196617 prepend set;
#P comment 409 177 100 196617 Look at output;
#P button 336 152 15 0;
#P number 336 78 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 129 128 100 196617 Look at input;
#P button 50 262 15 0;
#P button 54 203 15 0;
#P window linecount 0;
#P message 67 282 144 196617;
#P window linecount 1;
#P newex 67 262 62 196617 prepend set;
#P window linecount 0;
#P message 67 147 106 196617;
#P window linecount 1;
#P newex 67 127 62 196617 prepend set;
#P button 49 127 15 0;
#P flonum 41 49 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 41 73 38 196617 bla $1;
#P newex 41 317 126 196617 udpsend 127.0.0.1 57120;
#P newex 41 227 90 196617 OpenSoundControl;
#P newex 41 97 72 196617 prepend /wt2;
#P comment 70 203 73 196617 bang to output;
#P comment 131 263 100 196617 Look at output;
#P comment 353 153 198 196617 < - emits a bang for any incoming message;
#P connect 4 0 5 0;
#P connect 4 0 14 0;
#P connect 4 0 11 0;
#P fasten 3 0 4 0 46 141 46 141;
#P connect 3 0 8 0;
#P connect 3 0 9 0;
#P connect 16 0 17 0;
#P connect 16 0 21 0;
#P connect 21 0 22 0;
#P connect 17 0 19 0;
#P connect 19 0 20 0;
#P connect 13 0 4 0;
#P connect 11 0 12 0;
#P connect 9 0 10 0;
#P connect 6 0 3 0;
#P connect 7 0 6 0;
#P window clipboard copycount 24;


Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." – Brian Eno


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