Forums > MaxMSP

symbol bang

June 28, 2007 | 6:59 am

Why does the select object output "symbol bang" when it receives a bang, but any other input (that doesn’t match an argument) seems to pass through the right outlet unchanged?

I commonly need to intercept a specific message and handle it, otherwise pass the input along unchanged. Because of "symbol bang" I have gotten in the habit of using route instead of select. In my experience, this behavior just gets in the way of what I am trying to do, but I figure there must be a reason for it?

The only info I could find on it was this old post:
http://www.cycling74.com/forums/index.php?t=msg&goto=16079
which seems to have been addressed by documenting the behavior in the reference manual, but the reason for the behavior is not explained. There must be some interesting trivia about Max’s type system and how select is implemented – I’m all ears :)

And I thought perhaps this behavior could be used to distinguish between a true bang and a symbol bang, but that doesn’t seem to be the case. I’ve included a patch I was using to investigate this behavior. I also tried using the printit external but it didn’t shed any light on this situation.

max v2;
#N vpatcher 142 99 874 576;
#P button 585 330 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 613 241 65 196617 symbol bang;
#P message 418 239 75 196617 "symbol bang";
#P newex 605 329 39 196617 print;
#P message 574 240 30 196617 bang;
#P button 490 331 15 0;
#P button 550 239 15 0;
#P newex 490 304 105 196617 select "symbol bang";
#P comment 559 226 100 196617 Indistinguishable?;
#P button 191 334 15 0;
#P newex 401 151 20 196617 t b;
#P number 432 75 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 473 164 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 432 95 39 196617 set $1;
#P newex 473 141 27 196617 0;
#P button 401 78 15 0;
#P newex 401 117 82 196617 route something;
#P number 247 64 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 287 170 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 247 86 39 196617 set $1;
#P newex 287 147 27 196617 0;
#P button 216 73 15 0;
#P newex 216 112 108 196617 select something bang;
#P comment 211 45 72 196617 Fix $1;
#P number 76 61 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 120 150 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 106 247 65 196617 symbol bang;
#P message 247 248 75 196617 "symbol bang";
#P message 76 81 39 196617 set $1;
#P newex 211 333 39 196617 print;
#P message 67 246 30 196617 bang;
#P button 141 333 15 0;
#P button 43 245 15 0;
#P newex 141 306 60 196617 select bang;
#P newex 120 127 27 196617 0;
#P button 45 64 15 0;
#P newex 45 103 85 196617 select something;
#P comment 56 232 100 196617 Indistinguishable?;
#P comment 39 43 75 196617 Buggy;
#P comment 392 53 100 196617 Fix $2;
#P connect 11 0 3 0;
#P connect 4 0 3 0;
#P connect 15 0 11 0;
#P connect 3 1 5 0;
#P connect 5 0 14 0;
#P connect 7 0 6 0;
#P connect 9 0 6 0;
#P connect 12 0 6 0;
#P connect 13 0 6 0;
#P connect 6 0 8 0;
#P connect 6 1 30 0;
#P connect 6 1 10 0;
#P connect 20 0 17 0;
#P connect 18 0 17 0;
#P connect 22 0 20 0;
#P connect 17 1 19 0;
#P connect 17 2 19 0;
#P connect 19 0 21 0;
#P connect 24 0 23 0;
#P connect 26 0 23 0;
#P connect 23 0 29 0;
#P connect 28 0 26 0;
#P connect 23 1 25 0;
#P connect 25 0 27 0;
#P connect 33 0 32 0;
#P connect 35 0 32 0;
#P connect 37 0 32 0;
#P connect 38 0 32 0;
#P connect 32 0 34 0;
#P connect 32 1 39 0;
#P connect 32 1 36 0;
#P pop;


June 29, 2007 | 8:51 am

Adam Murray schrieb:
> And I thought perhaps this behavior could be used to distinguish
> between a true bang and a symbol bang, but that doesn’t seem to be
> the case. I’ve included a patch I was using to investigate this
> behavior. I also tried using the printit external but it didn’t shed
> any light on this situation.

I’d call select an oldtimer, which was intended for single values. Just
use route instead of select and you will be fine, it does the same and
more…

A long time the manual claimed to pass everything which doesn’t match to
the right outlet, which isn’t true (a list like [set 3] is truncated).
This was also only corrected in the manual. The behaviour of such an old
object you’d better not change, especially if there is an obvious
alternative.

Stefan


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


June 29, 2007 | 11:54 am

I’m asked to sync pictures to the beat of fairly straightforward
house music. I’m using resonator~ to home in on the low end, followed
by bonk~ for trigger detection. The results are a bit disappointing,
low frequency sounds (bass synths) trick bonk~ into triggering too.

I’m interested in alternative methods & tips for beat detection in
electronic dance music. Anyone?

Cheers,

Zip

Zip Boterbloem
Media Mechanics
Zwaluwstraat 54
2025 VR Haarlem
The Netherlands
+31627014758
zip@knoware.nl


June 29, 2007 | 3:33 pm

What I’ve done in the past is take a look a what I’m trying to use as
a trigger and figure out characteristics that are easily identifiable
(in spetrographs, wavelets, waveform, etc) and gone from there.
There’s a good article on a lot of the onset detection techniques by
Juan Pablo Bello, et al.

Keith

On 6/29/07, Zip Boterbloem wrote:
> I’m asked to sync pictures to the beat of fairly straightforward
> house music. I’m using resonator~ to home in on the low end, followed
> by bonk~ for trigger detection. The results are a bit disappointing,
> low frequency sounds (bass synths) trick bonk~ into triggering too.
>
> I’m interested in alternative methods & tips for beat detection in
> electronic dance music. Anyone?
>
> Cheers,
>
> Zip
>
> Zip Boterbloem
> Media Mechanics
> Zwaluwstraat 54
> 2025 VR Haarlem
> The Netherlands
> +31627014758
> zip@knoware.nl
>
>


June 29, 2007 | 4:55 pm

Your idea about filters is a good first step. You might have better
luck with a lowpass filter (or several lowpass filters cascaded in
series (you can do this with cascade~)) than a resonant filter, as most
resonant filters have problems with low frequencies. That said, you
may be able to do it all with bonk~.

Have you trained bonk~? If you haven’t then this will be a problem, as
any percussive sound will trigger it, but if you train it to recognize
specific types of sounds such as kick drum, snare drum, hi-hat, it’ll
be pretty decent. I do a beatboxing demo for my students that uses
bonk to track sounds like tapping on a can, the desk, etc. and replace
the sounds with percussive sounds and it works well, but you have to
train it. Since you’re probably doing a variety of tracks, you’ll want
to train it with multiple kinds of snares, kick drums, etc. so that it
can generalize between them, rather than just being trained to one
specific sound. (for example, "learn 20" and then play 20 different
files of snare drums, 20 different kick drums, etc.)

There’s a paper from the ICMC on bonk~ (IIRC it’s cited in the
bonk~.help file) that might be useful to check out so you understand
better how it’s working.

Hope this helps,

Peter McCulloch

http://www.petermcculloch.com


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