Forums > MaxMSP

Newbie Q 2

December 13, 2007 | 2:37 pm

Hi,

could somebody please tell me how i can get the entire contents of a dump list message (from the function object) into a message box.

Thank you very very much.


December 13, 2007 | 3:44 pm

This problem used to really annoy me and I tried for ages to find a decent solution but it was difficult mainly because i didn’t really understand the problem.

The problem is that the X,Y points are coming out of function in pairs. Attach a print object to the dump output and you will see them. 0 0,10 0, 30 25 etc… look they are laughing at you.

You need to join them all together in order to put them in one message box easily. Those pairs will keep giggling away until you discover the Thresh object – which collects items into a list if they appear within a certain amount of time – check it’s help file.

I have attached an annotated patch which also shows how to store and recall data to a function object.

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 80 48 172 196617 dump causes all x z pairs to be output (they come out in pairs);
#P comment 25 220 143 196617 packs all pairs into a sigle list if the occour within 1ms;
#P window linecount 1;
#P comment 332 29 143 196617 spit out 2 elements at a time:;
#P comment 333 226 143 196617 spit out 2 elements at a time:;
#P button 476 25 18 0;
#P newex 476 223 47 196617 zl iter 2;
#P message 546 47 33 196617 clear;
#P user function 546 72 746 172 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P newex 476 199 36 196617 zl reg;
#P window linecount 0;
#P message 172 271 434 196617;
#P window linecount 1;
#P newex 172 247 62 196617 prepend set;
#P newex 172 225 51 196617 thresh 1;
#P message 45 55 33 196617 dump;
#P user function 45 81 245 181 1 1 0 0;
#X frgb 82 82 82;
#X brgb 204 204 204;
#X rgb2 85 85 85;
#X rgb3 255 255 255;
#X rgb4 0 0 0;
#X rgb5 0 0 0;
#X add 0. 0. 0;
#X add 202.127655 1. 0;
#X add 382.978699 1. 0;
#X add 446.808502 0.92 0;
#X add 494.680847 0.8 0;
#X add 526.595703 0.68 0;
#X add 531.914856 0.533333 0;
#X add 537.234009 0.413333 0;
#X add 542.553162 0.293333 0;
#X add 553.191467 0.213333 0;
#X add 585.106384 0.186667 0;
#X add 797.872314 0.506667 0;
#X add 1000. 0. 0;
#X domain 1000.;
#X range 0. 1.;
#X done;
#P comment 417 200 56 196617 store list:;
#P connect 3 0 4 0;
#P fasten 3 0 6 1 177 244 285 244 285 197 507 197;
#P connect 1 2 3 0;
#P connect 10 0 6 0;
#P fasten 10 0 8 0 481 45 551 45;
#P fasten 9 0 7 0 481 248 536 248 536 67 551 67;
#P connect 6 0 9 0;
#P connect 8 0 7 0;
#P fasten 1 3 2 0 239 188 302 188 302 42 50 42;
#P connect 4 0 5 0;
#P connect 2 0 1 0;
#P window clipboard copycount 15;



jln
December 13, 2007 | 4:14 pm



jln
December 13, 2007 | 4:23 pm


December 13, 2007 | 4:45 pm

Thank you. And my day started out so angry…now who’s laughing – certainly not those list pairs anyway. thanks for the help and i’m digging the orignal tune making.


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