Bang filter? Very annoying, probably stupid problem.

Feb 24, 2006 at 4:56pm

Bang filter? Very annoying, probably stupid problem.

ok, i admit a mistake in that “match” does seem to filter a bang out,
but there must be an easier way?

#24598
Feb 24, 2006 at 5:15pm

Ok THIRD TIME LUCKY POSTING THIS QUESTION!!!!

IS there any way to filter out bangs, whilst allowing valuable information like number, to pass through.

In this patch, any change in the number box at the top sends out a bang. The match at the bottom blocks these bangs until the “one” is detected, at which point it lets the one through, along with all the bangs. Instead of just a single bang.
Please help this tired and amateur max learner out.
Sorry if this is short, it’sthe 3rd time i’ve typed this out. my computer is hobbling.

max v2;
#N vpatcher 888 44 1615 1033;
#P origin 118 0;
#P button 420 839 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 424 810 46 196617 match 1;
#P button 191 555 15 0;
#P newex 349 240 40 196617 adc~ 7;
#P button 269 764 15 0;
#P inlet 523 239 15 0;
#P outlet 332 772 15 0;
#P inlet 414 241 15 0;
#P flonum 358 438 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 419 427 148 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 359 400 35 196617 * 0.;
#P number 312 471 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 334 704 28 196617 >;
#B color 5;
#P toggle 336 733 15 0;
#P flonum 377 581 194 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 297 404 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 413 292 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 413 270 75 196617 peakamp~ 125;
#B color 5;
#P comment 464 454 100 196617 alters sensitivity;
#P connect 7 0 16 0;
#P connect 5 0 14 0;
#P connect 2 0 3 0;
#P connect 8 0 7 0;
#P connect 18 0 12 0;
#P connect 7 0 6 0;
#P connect 6 0 5 0;
#P connect 4 0 6 1;
#P connect 8 0 10 0;
#P connect 2 0 8 0;
#P connect 9 0 8 1;
#P connect 11 0 1 0;
#P connect 15 0 1 0;
#P connect 1 0 2 0;
#P connect 13 0 9 0;
#P connect 17 0 18 0;
#P connect 5 0 17 0;
#P pop;

#71410
Feb 24, 2006 at 5:30pm

Please do not yell. your solution:

route bang

take the right outlet.

pa

#71411
Feb 24, 2006 at 5:34pm

Thank you.
I’ll go try that. I’d tried three times to post correctly, and the server/my computer/me kept messing up. I was frustrated, and yes, I shouted.

#71412
Feb 24, 2006 at 5:35pm

On 24 Feb 2006, at 18:15, Philip Reeder wrote:

> IS there any way to filter out bangs, whilst allowing valuable
> information like number, to pass through.

[sel bang] ?

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com

#71413
Feb 24, 2006 at 5:48pm

please please forgive me for being stupid.

I did what both you guys suggested, and it didn’t act as planned.

I can get a number through, but I want the number, without all the bangs that come through with it. One is fine, i’d expect that because the number changed. But once it isn’t changing any longer, I’d like the bangs not to come through.

Thanks again,
Phil

This code has the route object in, with route bang as suggested.

max v2;
#N vpatcher 642 44 1369 1033;
#P origin 118 0;
#P button 299 828 15 0;
#P window setfont “Sans Serif” 9.;
#P number 287 767 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 411 776 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 509 771 15 0;
#P button 456 772 15 0;
#P newex 464 732 46 196617 select 1;
#P toggle 343 742 15 0;
#P button 194 813 15 0;
#P newex 208 729 57 196617 route bang;
#P button 420 839 15 0;
#P newex 424 810 46 196617 match 1;
#P button 191 555 15 0;
#P newex 349 240 40 196617 adc~ 7;
#P button 258 782 15 0;
#P inlet 523 239 15 0;
#P outlet 237 889 15 0;
#P inlet 414 241 15 0;
#P flonum 358 438 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 419 427 148 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 359 400 35 196617 * 0.;
#P number 312 471 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 334 704 28 196617 >;
#B color 5;
#P toggle 227 780 15 0;
#P flonum 377 581 194 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 297 404 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 412 295 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 413 270 75 196617 peakamp~ 125;
#B color 5;
#P comment 464 454 100 196617 alters sensitivity;
#P connect 7 0 16 0;
#P connect 19 0 20 0;
#P connect 6 0 19 0;
#P connect 5 0 12 0;
#P connect 19 1 14 0;
#P connect 5 0 14 0;
#P connect 19 1 26 0;
#P connect 2 0 3 0;
#P connect 26 0 27 0;
#P connect 8 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 21 0;
#P connect 4 0 6 1;
#P connect 8 0 10 0;
#P connect 2 0 8 0;
#P connect 9 0 8 1;
#P connect 22 0 25 0;
#P connect 1 0 2 0;
#P connect 11 0 1 0;
#P connect 15 0 1 0;
#P connect 13 0 9 0;
#P connect 17 0 18 0;
#P connect 22 0 23 0;
#P connect 6 0 22 0;
#P connect 22 1 24 0;
#P pop;

#71414
Feb 24, 2006 at 6:04pm

On 24 Feb 2006, at 18:48, Philip Reeder wrote:

> I did what both you guys suggested, and it didn’t act as planned.

What are we supposed to be looking for? I see a [>] (which puts out 0
or 1) connected to a [route bang].

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com

#71415
Feb 24, 2006 at 6:04pm

you’re looking for change, aren’t you? By the way, your patch have
also problems with integer operations: you use “>” in integer mode,
and a integer number box to works with floats…

ej

#71416
Feb 24, 2006 at 6:10pm

> I did what both you guys suggested, and it didn’t act as planned.
>
> I can get a number through, but I want the number, without all the bangs
> that come
> through with it. One is fine, i’d expect that because the number changed.
> But once it isn’t
> changing any longer, I’d like the bangs not to come through.

You need to use the [change] object. See my modification of your example
patch below.

Good luck,
*V*I*R*G*O*

max v2;
#N vpatcher 154 38 685 527;
#P origin 132 17;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 170 181 40 9109513 change;
#P button 125 346 15 0;
#P number 125 323 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 249 318 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 338 318 15 0;
#P button 302 318 15 0;
#P newex 302 288 46 9109513 select 1;
#P toggle 172 298 15 0;
#P button 46 405 15 0;
#P newex 46 285 57 9109513 route bang;
#P button 245 393 15 0;
#P newex 245 366 46 9109513 match 1;
#P button 127 233 15 0;
#P newex 156 40 40 9109513 adc~ 7;
#P button 93 338 15 0;
#P inlet 330 39 15 0;
#P outlet 70 373 15 0;
#P inlet 221 41 15 0;
#P flonum 219 171 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 330 97 148 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 219 133 35 9109513 * 0.;
#P number 172 204 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 172 260 28 9109513 >;
#B color 5;
#P toggle 70 314 15 0;
#P flonum 190 232 194 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 157 137 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 219 95 58 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 220 70 75 9109513 peakamp~ 125;
#B color 5;
#P comment 324 187 100 9109513 alters sensitivity;
#P connect 6 0 19 0;
#P connect 19 0 20 0;
#P connect 5 0 12 0;
#P connect 19 1 14 0;
#P connect 5 0 14 0;
#P connect 19 1 26 0;
#P connect 26 0 27 0;
#P connect 7 0 16 0;
#P connect 2 0 3 0;
#P connect 8 0 28 0;
#P connect 28 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 21 0;
#P connect 4 0 6 1;
#P connect 1 0 2 0;
#P connect 2 0 8 0;
#P connect 8 0 10 0;
#P connect 15 0 1 0;
#P connect 11 0 1 0;
#P connect 9 0 8 1;
#P connect 17 0 18 0;
#P connect 22 0 25 0;
#P connect 6 0 22 0;
#P connect 22 0 23 0;
#P connect 13 0 9 0;
#P connect 22 1 24 0;
#P pop;

#71417
Feb 24, 2006 at 6:16pm

use int after the numbox

ie:

integer number box
|
[int]

int will be able to store a number, bang will send it.

read the tutorials. Almost everything in max sends bangs. its how it
works.

v a d e //

http://www.vade.info
abstrakt.vade.info

I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I
LIVE! I LIVE! I LIVE! I LIVE!

You will not be saved by the Holy Ghost. You will not be saved by the
God Plutonium.

In fact, YOU WILL NOT BE SAVED!

#71418
Feb 24, 2006 at 8:14pm

i have not looked at yourt patch, but maybe there
is one number you do not need ?
if you do not need “i 10,000″ for example you
could just ue a [route 10000] to filter out bangs.

#71419
Feb 27, 2006 at 9:18pm

Philip Reeder wrote:
> Hello, I’ve been using max for a little while, and there’s one
> problem I keep coming up against.
>
> Bangs seem to flow through the whole of a patch. Is there any way to
> filter out a bang (that might be caused by a metro at the top of a
> patch for instance), yet allow numbers etc. to pass through?

Did you ever read the help file of button? I guess not!
This is very basic. button accepts anything and converts it into a bang.
Your example patch seems to have nothing to do with the above question,
none of the patchchords does carry a bang and toggle never outputs a bang.
If you want to filter any type, look into route. [route bang] for
example would filter bangs.
I added some comments into your patch, which might explain some of your
confusion…

Stefan

#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 327 334 140 196617 < - possible confusion , these floats will
be converted to int;
#P window linecount 1;
#P comment 240 366 97 196617 < - int version of >;
#P comment 218 312 97 196617 < - carries only ints;
#P comment 251 280 92 196617 < - converts to int;
#P button 84 364 15 0;
#P newex 188 95 31 196617 adc~;
#P button 140 423 15 0;
#P inlet 416 48 15 0;
#P outlet 205 435 15 0;
#P inlet 253 96 15 0;
#P flonum 252 247 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 319 209 148 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 252 209 35 196617 * 0.;
#P number 205 280 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 205 363 28 196617 >;
#B color 5;
#P toggle 205 386 15 0;
#P flonum 223 335 99 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 190 213 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 252 147 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 252 125 75 196617 peakamp~ 125;
#B color 5;
#P comment 364 232 100 196617 alters sensitivity;
#P comment 266 176 114 196617 < - carries only floats;
#P connect 9 0 8 0;
#P connect 9 0 11 0;
#P connect 8 0 17 0;
#P connect 8 0 7 0;
#P connect 6 0 15 0;
#P connect 6 0 13 0;
#P connect 3 0 4 0;
#P connect 3 0 9 0;
#P connect 14 0 10 0;
#P connect 2 0 3 0;
#P connect 12 0 2 0;
#P connect 16 0 2 0;
#P connect 10 0 9 1;
#P connect 5 0 7 1;
#P connect 7 0 6 0;
#P window clipboard copycount 22;

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-49 77 51 72

#71420
Feb 28, 2006 at 8:46pm

> Did you ever read the help file of button? I guess not!
> This is very basic.

that is like the 7th time this month you tell
someone to rtfm, did you notice that? :)

#71421
Mar 2, 2006 at 7:02am

Roman Thilenius wrote:
> that is like the 7th time this month you tell
> someone to rtfm, did you notice that? :)

Seems to be necessary, this thread went on too long for such a thing…
(Und um das Gleiche durch die Blume (Kaffee) zu sagen scheint ja auch
nicht immer zu klappen… ;-)

Stefan

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-49 77 51 72

#71422

You must be logged in to reply to this topic.