Forums > MaxMSP

suppress funbuff error messages?

April 7, 2008 | 4:33 am

Is there a way to stop funbuff from printing error messages when you send it a dump or find message and it has nothing in it? I have a situation where it is normal for the funbuff to be empty, but my max window is filling up with:

• error: funbuff_dump: nothing to dump

I tried to use bag instead but it is orders of magnitude slower than funbuff for large data sets:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 347 155 49 196617 append 1;
#P flonum 277 192 41 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 279 167 35 196617 timer;
#P newex 270 79 30 196617 t b b;
#P button 271 53 15 0;
#P newex 303 124 56 196617 uzi 10000;
#P flonum 54 190 41 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 56 165 35 196617 timer;
#P newex 347 228 67 196617 print funbuff;
#P message 409 161 33 196617 dump;
#P newex 66 78 30 196617 t b b;
#N funbuff 0;
#P newobj 347 199 42 196617 funbuff;
#P newex 184 236 50 196617 print bag;
#P button 184 166 15 0;
#P newex 126 154 49 196617 append 1;
#P button 67 52 15 0;
#P newex 80 122 56 196617 uzi 10000;
#P newex 184 211 27 196617 bag;
#P comment 201 166 49 196617 (dump);
#P connect 11 0 12 0;
#P connect 8 1 11 0;
#P connect 3 0 8 0;
#P connect 8 0 2 0;
#P connect 2 1 11 1;
#P connect 2 2 4 0;
#P connect 5 0 1 0;
#P connect 4 0 1 0;
#P connect 1 0 6 0;
#P connect 14 0 15 0;
#P connect 16 0 17 0;
#P connect 15 1 16 0;
#P connect 15 0 13 0;
#P connect 13 1 16 1;
#P connect 13 2 18 0;
#P connect 18 0 7 0;
#P connect 9 0 7 0;
#P connect 7 0 10 0;
#P window clipboard copycount 19;


April 8, 2008 | 5:43 am

Stefan,
Thanks for the helpful suggestions, as always. That’s a nice trick.

Still, that error message is pretty annoying and I wish it could be
turned off with an attribute (or just get rid of it, I think we can
figure out that funbuff is empty if nothing comes out).

I overlooked a simple solution. I only ever need to store positive
numbers, so I can loadbang a -1 into the funbuff and select it out
when I dump. I did more timing tests and it turns out [bag] is
slightly faster to dump than [funbuff] -> [select -1]. I’m not
actually inserting too much data and need to dump constantly, so maybe
I’ll use bag after all.

> Stefan Tiedje schrieb:
>
>
> > You can also test funbuff by sending any number, if there is no output, it
> is empty…
> >
>
> Try this, it should only dump if its not empty…
>
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 407 54 32 196617 dump;
> #P message 347 54 32 196617 fill;
> #P newex 407 146 50 196617 deferlow;
> #P button 407 76 15 0;
> #P message 304 54 32 196617 clear;
> #P newex 361 130 30 196617 pack;
> #P button 347 76 15 0;
> #P newex 347 104 44 196617 uzi 10;
> #P newex 407 243 67 196617 print funbuff;
> #P message 407 104 50 196617 1;
> #P newex 407 125 60 196617 grab;
> #P message 407 168 33 196617 dump;
> #N funbuff 0;
> #P newobj 407 194 42 196617 funbuff;
> #P connect 12 0 9 0;
> #P connect 11 0 6 0;
> #P connect 10 0 1 0;
> #P connect 2 0 10 0;
> #P connect 5 2 7 0;
> #P connect 5 2 7 1;
> #P connect 6 0 5 0;
> #P connect 9 0 3 0;
> #P fasten 8 0 0 0 309 189 412 189;
> #P fasten 7 0 0 0 366 189 412 189;
> #P connect 0 0 4 0;
> #P fasten 2 1 0 0 462 189 412 189;
> #P connect 1 0 0 0;
> #P connect 3 0 2 0;
> #P window clipboard copycount 13;
>
>
>
>
> –
> Stefan Tiedje————x——-
> –_____———–|————–
> –(_|_ —-|—–|—–()——-
> — _|_)—-|—–()————–
> ———-()——–www.ccmix.com
>
>


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