Forums > MaxMSP

[solution] test for non existant coll item.

March 29, 2007 | 7:21 pm

I forget who but someone said they needed a method to tell if a coll element wasn’t there.

I think I named mine mat.collExistTest

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 71 193 93 196617 1 if item exists 0 if not;
#P window linecount 1;
#P comment 2 25 80 196617 item to test for;
#P comment 156 40 113 196617 coll name;
#P outlet 54 191 15 0;
#P inlet 138 39 15 0;
#P newex 133 59 62 196617 prepend set;
#P inlet 81 24 15 0;
#P newex 73 119 21 196617 t 1;
#P newex 58 156 27 196617 int;
#P newex 58 59 40 196617 t b l 0;
#N coll $1 1;
#P newobj 73 86 53 196617 coll $1 1;
#P comment 217 135 113 196617 argument 1 is filename;
#P connect 3 0 8 0;
#P connect 7 0 6 0;
#P connect 6 0 1 0;
#P connect 5 0 2 0;
#P connect 1 0 4 0;
#P connect 2 1 1 0;
#P connect 2 0 3 0;
#P connect 4 0 3 0;
#P connect 2 2 3 1;
#P window clipboard copycount 12;



FP
March 29, 2007 | 10:53 pm

or that:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 76 139 103 196617 item or "none" if not;
#P comment 2 25 80 196617 item to test for;
#P comment 151 43 52 196617 coll name;
#P outlet 58 138 15 0;
#P inlet 133 42 15 0;
#P newex 133 59 62 196617 prepend set;
#P inlet 58 41 15 0;
#P newex 58 115 36 196617 zl reg;
#P newex 58 59 63 196617 t b l none;
#N coll $1 1;
#P newobj 84 88 53 196617 coll $1 1;
#P comment 139 91 113 196617 argument 1 is filename;
#P connect 3 0 7 0;
#P connect 1 0 3 1;
#P connect 2 2 3 1;
#P connect 2 0 3 0;
#P connect 4 0 2 0;
#P connect 2 1 1 0;
#P fasten 5 0 1 0 138 82 89 82;
#P connect 6 0 5 0;
#P window clipboard copycount 11;



_j
March 31, 2007 | 7:00 pm

ayup, good for use with step sequencers that have paged data. ive been doing pretty much the same with leftgate.


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