Forums > MaxMSP

jit.cellblock and files management


FP
April 18, 2007 | 11:48 am

hi,

i’m trying to do a "management files" patche from a Leafcutter John’s patche.
i have only one little problem, when i remove one file (sample) and select the last one in the jit.cellblock, all files are deleted. it works perfectly (i mean only this file is deleted) when i select another one except the last one.

to reproduce it:
1. drop folder of sounds
2. select "info"
3. select "remove"
4. in info window, select the last one

… ->ALL files will be deleted

what’s happen ? how to avoid it ?

if you do it again and select other file except the last one in the jit.cellblock, it works…

thx.

here’s the patche:

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 579 167 94 196617 what’s happen ? how to avoid it ?;
#P window linecount 1;
#P comment 579 111 96 196617 3. select "remove";
#P window linecount 3;
#P comment 579 203 177 196617 if you do it again and select other file execpt the last one in the jit.cellblock , it works…;
#P window linecount 1;
#P comment 579 132 176 196617 4. in info window , select the last one;
#P comment 579 98 96 196617 2. select "info";
#P newex 511 243 58 196617 print menu;
#P newex 170 110 54 196617 r $0-mng;
#B color 6;
#P newex 369 109 51 196617 r $0-file;
#B color 6;
#N vpatcher 582 150 857 443;
#P inlet 162 94 15 0;
#P inlet 9 29 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 9 69 31 196617 t 0 b;
#P newex 44 114 43 196617 t 0 open;
#P newex 79 69 21 196617 t 2;
#P newex 114 69 21 196617 t 1;
#P newex 9 49 117 196617 sel clearall info remove;
#P newex 114 114 58 196617 gate 2 1;
#N comlet to remove;
#P outlet 162 140 15 0;
#N comlet to play;
#P outlet 114 140 15 0;
#N comlet to info;
#P outlet 77 140 15 0;
#P outlet 30 91 15 0;
#N comlet to clear all;
#P outlet 9 140 15 0;
#P connect 11 0 6 0;
#P connect 6 0 10 0;
#P fasten 9 0 0 0 49 135 14 135;
#P connect 10 0 0 0;
#P connect 10 1 1 0;
#P connect 6 1 9 0;
#P connect 9 1 2 0;
#P connect 6 2 8 0;
#P connect 6 3 7 0;
#P connect 7 0 5 0;
#P fasten 8 0 5 0 84 94 119 94;
#P connect 5 0 3 0;
#P connect 12 0 5 1;
#P connect 5 1 4 0;
#P pop;
#P newobj 170 130 209 196617 p select;
#B color 5;
#P newex 6 132 81 196617 pvar $0-drop 2;
#B color 6;
#N vpatcher 14 59 345 299;
#P window setfont "Sans Serif" 9.;
#P newex 50 91 74 196617 s $0-filemenu;
#B color 6;
#P newex 50 50 47 196617 pcontrol;
#N vpatcher 10 410 680 650;
#P origin 0 -176;
#P window setfont "Sans Serif" 9.;
#P newex 16 293 52 196617 print info;
#P hidden newex 24 231 59 196617 s $0-dump;
#B color 6;
#P user textedit 16 201 655 218 98470 3 9 "essai avec espaces";
#P hidden newex 34 -21 57 196617 r $0-Bang;
#B color 6;
#P message 416 323 41 196617 wclose;
#P button 16 20 15 0;
#P window linecount 2;
#P message 405 293 309 196617 window flags float , window flags nozoom , window flags nogrow , window size 10 410 680 650 , front , savewindow 1 , window exec;
#P hidden message 405 263 291 196617 window title , window flags zoom , window flags grow , window flags nofloat , window size 250 50 1250 450 , window exec;
#P window linecount 1;
#N thispatcher;
#Q window flags nogrow close nozoom float;
#Q window size 10 410 680 650;
#Q window title;
#Q window exec;
#Q savewindow 1;
#Q end;
#P hidden newobj 405 342 60 196617 thispatcher;
#B color 4;
#N comlet init;
#P hidden inlet 16 -19 15 0;
#P hidden newex 16 255 58 196617 unpack 0 0;
#P comment 571 22 37 196617 length;
#P comment 503 22 29 196617 rate;
#P comment 473 22 18 196617 ch;
#P comment 444 22 23 196617 cue;
#P comment 189 22 29 196617 root;
#P hidden message 16 -2 85 196617 refer filesloaded;
#P user jit.cellblock 16 38 655 201 3 9 1 1 359 17 0 1 1 0 1 0 1 0 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 1 2 0 0 1;
#X col 0 layout 103 1 0 9 112 1 183 0 0 -1 -1 -1;
#X col 24 layout 5 1 0 0 0 1 0 7 43 -1 -1 -1;
#X col 1 layout 324 1 0 6 0 1 0 0 0 -1 -1 -1;
#X col 2 layout 26 1 0 6 0 1 0 0 0 -1 -1 -1;
#X col 3 layout 26 1 0 6 0 1 0 0 0 -1 -1 -1;
#X col 4 layout 45 1 0 6 2 1 82 6 129 -1 -1 -1;
#X col 5 layout 99 1 0 6 254 1 254 0 0 -1 -1 -1;
#P comment 42 22 48 196617 filename;
#P user panel 11 13 650 210;
#X brgb 255 255 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 15;
#X shadow 0;
#X done;
#P hidden outlet 64 274 15 0;
#P hidden connect 17 0 4 0;
#P hidden connect 11 0 4 0;
#P hidden connect 18 0 3 0;
#P hidden connect 4 0 3 0;
#P hidden connect 3 1 18 0;
#P hidden connect 3 0 10 0;
#P hidden connect 3 0 20 0;
#P hidden connect 18 0 19 0;
#P hidden connect 10 1 0 0;
#P hidden fasten 15 0 13 0 21 251 410 251;
#P hidden connect 14 0 12 0;
#P hidden connect 13 0 12 0;
#P hidden fasten 16 0 12 0 421 340 410 340;
#P pop 1;
#P newobj 50 71 35 196617 p info;
#B color 5;
#P inlet 50 30 15 0;
#P connect 0 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 3 0;
#P pop;
#P newobj 268 153 35 196617 p info;
#B color 5;
#N vpatcher 665 44 1023 272;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 50 158 59 196617 s $0-dump;
#B color 6;
#P window linecount 0;
#P newex 190 116 69 196617 route symbol;
#P newex 190 135 78 196617 prepend append;
#P newex 190 158 74 196617 s $0-filemenu;
#B color 6;
#P newex 50 50 240 196617 t dump l clear;
#N coll filesloaded 1;
#T flags 1 0;
#P newobj 165 97 86 196617 coll filesloaded 1;
#B color 14;
#P newex 165 74 75 196617 prepend delete;
#P inlet 50 30 15 0;
#P connect 0 0 3 0;
#P connect 3 0 7 0;
#P connect 3 1 1 0;
#P fasten 3 0 2 0 55 95 170 95;
#P connect 1 0 2 0;
#P connect 2 1 6 0;
#P connect 6 0 5 0;
#P fasten 3 2 4 0 285 155 195 155;
#P connect 5 0 4 0;
#P pop;
#P newobj 366 153 52 196617 p remove;
#B color 5;
#P newex 520 123 54 196617 s $0-mng;
#B color 6;
#P newex 8 46 57 196617 s $0-Bang;
#B color 6;
#P newex 8 26 48 196617 loadbang;
#B color 4;
#P newex 459 243 51 196617 s $0-file;
#B color 6;
#P number 6 174 35 9 0 0 128 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user ubumenu 398 212 132 196617 0 0 1 1;
#X setrgb 255 255 255 0 0 0 50 50 50 4 4 4 141 141 141 112 112 112;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P objectname $0-spl;
#P newex 398 186 74 196617 r $0-filemenu;
#B color 6;
#P user ubumenu 466 97 67 196617 0 0 1 1;
#X setrgb 255 255 255 0 0 0 50 50 50 4 4 4 141 141 141 112 112 112;
#X add play;
#X add info;
#X add remove;
#X add clearall;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P user ubumenu 465 73 68 196617 0 0 1 1;
#X setrgb 255 255 255 0 0 0 50 50 50 4 4 4 141 141 141 112 112 112;
#X add As File;
#X add Force Mono;
#X add Force Stereo;
#X prefix_set 0 0
0;
#X pattrmode 1;
#N vpatcher 326 44 635 317;
#P origin 183 16;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 72 191 59 196617 s $0-dump;
#B color 6;
#P window linecount 0;
#P comment 145 64 47 196617 clear all;
#P comment 108 46 60 196617 as or force;
#P comment 46 46 29 196617 type;
#N comlet type;
#P inlet 47 63 15 0;
#N vpatcher 323 235 739 571;
#P origin -557 0;
#N comlet clear all;
#P inlet 176 133 15 0;
#P window setfont "Sans Serif" 9.;
#P message 176 155 33 196617 clear;
#P message 246 87 140 196617 fold;
#P newex 246 63 62 196617 prepend set;
#P newex 167 295 27 196617 – 1;
#P newex 137 248 40 196617 t b i;
#P newex 137 271 40 196617 uzi;
#P number 137 228 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 137 208 72 196617 route populate;
#P newex 47 154 76 196617 prepend prefix;
#P user ubumenu 47 185 100 196617 0 1 1 0;
#X add "essai avec espaces";
#X add temp.2007.03.12.22.20.26.aif;
#X add temp.2007.03.15.15.38.36.aif;
#X add temp.2007.04.08.22.34.25.aif;
#X types ULAW Sd2f WAVE AIFF AIFC;
#X prefix_set 0 1 alu:/Users/fp/Desktop/essai/ 0;
#X pattrmode 1;
#P message 220 155 164 196617 types ULAW Sd2f WAVE AIFF AIFC;
#P newex 221 87 21 196617 t 0;
#N comlet path;
#P outlet 10 294 15 0;
#P newex 194 87 21 196617 t 2;
#P newex 59 87 21 196617 t 1;
#P newex 10 135 47 196617 gate 2 1;
#P newex 59 63 173 196617 sel ULAW Sd2f WAVE AIFF AIFC fold;
#N comlet type;
#P inlet 59 29 15 0;
#N comlet path;
#P inlet 47 118 15 0;
#P comment 63 118 59 196617 path folder;
#P comment 75 29 30 196617 type;
#P comment 27 296 47 196617 path file;
#P fasten 7 0 6 0 64 114 15 114;
#P fasten 8 0 6 0 199 114 15 114;
#P fasten 10 0 6 0 226 114 15 114;
#P connect 6 0 9 0;
#P fasten 12 1 9 0 97 247 15 247;
#P connect 3 0 6 1;
#P connect 6 1 13 0;
#P fasten 21 0 12 0 181 179 52 179;
#P fasten 18 0 12 0 172 316 234 316 234 179 52 179;
#P connect 13 0 12 0;
#P fasten 11 0 12 0 225 179 52 179;
#P connect 4 0 5 0;
#P fasten 5 3 7 0 145 83 64 83;
#P fasten 5 2 7 0 118 83 64 83;
#P fasten 5 1 7 0 91 83 64 83;
#P fasten 5 0 7 0 64 83 64 83;
#P fasten 5 4 7 0 172 83 64 83;
#P connect 12 2 14 0;
#P connect 14 0 15 0;
#P connect 15 0 17 0;
#P connect 17 0 16 0;
#P connect 17 1 16 1;
#P connect 16 2 18 0;
#P connect 22 0 21 0;
#P connect 5 5 8 0;
#P connect 5 6 10 0;
#P fasten 4 0 19 0 64 55 251 55;
#P connect 19 0 20 0;
#P pop;
#P newobj 18 138 69 196617 p filehandling;
#B color 5;
#P newex 129 102 40 196617 t b b 0;
#N comlet clear all;
#P inlet 129 63 15 0;
#N comlet as or force;
#P inlet 108 63 15 0;
#N comlet path;
#P inlet 18 63 15 0;
#N vpatcher 631 44 1103 442;
#P origin -557 8;
#P outlet 4 265 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 322 43 57 196617 r $0-Bang;
#B color 6;
#P message 322 62 35 196617 length;
#N coll filesloaded 1;
#T flags 1 0;
#P newobj 322 79 86 196617 coll filesloaded 1;
#B color 14;
#P window linecount 0;
#P newex 322 98 27 196617 + 1;
#P window linecount 1;
#P comment 211 73 33 196617 path;
#P comment 422 32 33 196617 clear;
#P window linecount 0;
#P message 162 324 33 196617 clear;
#P newex 83 279 69 196617 route symbol;
#P newex 4 147 55 196617 delay 100;
#P newex 4 198 48 196617 t b clear;
#P window linecount 1;
#P newex 83 305 78 196617 prepend append;
#P newex 83 347 74 196617 s $0-filemenu;
#B color 6;
#P window linecount 0;
#P message 4 224 33 196617 dump;
#N comlet as or force;
#P inlet 256 28 15 0;
#P window linecount 1;
#P message 141 227 33 196617 clear;
#N coll filesloaded 1;
#T flags 1 0;
#P newobj 58 253 86 196617 coll filesloaded 1;
#B color 14;
#P newex 58 222 72 196617 prepend store;
#P newex 58 198 79 196617 pack l l i 0 0 0.;
#N comlet number of file(s);
#P outlet 309 193 15 0;
#N comlet clear all;
#P inlet 405 32 15 0;
#P newex 108 99 40 196617 t b l b;
#P message 351 122 14 196617 1;
#N counter 0 1 99999;
#X flags 0 0;
#P newobj 309 146 95 196617 counter 0 1 99999;
#P number 309 168 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 452 493 900 850;
#P origin 3 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 89 95 33 196617 path;
#N vpatcher 902 482 1151 850;
#P origin 0 87;
#P outlet 115 321 15 0;
#P inlet 85 26 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 62 237 50 196617 t b break;
#P message 115 263 1405 196617 102 105 97 46 53 50 46 52 51 46 50 50 46 56 48 46 52 48 46 55 48 48 50 46 112 109 101 116;
#P newex 115 282 37 196617 zl rev;
#P newex 115 238 40 196617 collect;
#B color 5;
#P newex 85 94 101 196617 t b l b zlclear;
#P newex 62 213 38 196617 sel 47;
#P newex 70 150 27 196617 t b i;
#P newex 8 127 44 196617 uzi 256;
#P newex 62 188 35 196617 zl nth;
#P newex 85 46 40 196617 atoi;
#P newex 85 71 37 196617 zl rev;
#P newex 115 302 40 196617 itoa;
#P fasten 11 1 4 0 107 262 50 262 50 155 58 155 58 121 13 121;
#P fasten 7 0 4 0 90 117 13 117;
#P connect 5 0 3 0;
#P fasten 7 1 3 0 120 180 67 180;
#P fasten 7 3 3 0 180 186 67 186;
#P connect 3 0 6 0;
#P connect 6 0 11 0;
#P fasten 4 2 5 0 47 147 75 147;
#P connect 12 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 7 0;
#P connect 5 1 3 1;
#P fasten 6 1 8 0 95 234 120 234;
#P connect 8 0 10 0;
#P fasten 11 0 10 0 67 258 120 258;
#P connect 10 0 9 0;
#P connect 9 0 0 0;
#P connect 0 0 13 0;
#P connect 7 2 8 1;
#P pop;
#P newobj 51 116 66 196617 p j.pathstrip;
#B color 5;
#P button 329 197 13 0;
#N comlet as or force;
#P inlet 306 57 16 0;
#P newex 365 111 32 196617 t 2 2;
#P newex 306 111 21 196617 t 1;
#P newex 329 212 27 196617 i 1;
#P newex 329 111 32 196617 t 2 1;
#P newex 306 82 81 196617 sel 0 1 2;
#P newex 292 178 47 196617 gate 2 1;
#N comlet numbers of channels , sampling rate , length;
#P outlet 292 289 15 0;
#P window linecount 0;
#P newex 292 267 60 196617 pack 0 0 0.;
#P window linecount 1;
#P newex 217 98 68 196617 prepend open;
#P newex 217 118 79 196617 sfinfo~;
#N comlet path;
#P outlet 72 94 15 0;
#P newex 51 265 32 196617 sel 0;
#P newex 51 136 57 196617 t b l 0 l;
#P window linecount 0;
#P newex 51 288 180 196617 zl reg;
#P number 51 247 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 99 192 21 196617 t 1;
#P newex 51 226 27 196617 i 0;
#N coll filesloaded 1;
#T flags 1 0;
#P newobj 99 172 86 196617 coll filesloaded 1;
#B color 14;
#P window linecount 0;
#P newex 51 62 52 196617 t l l l;
#N comlet name;
#P outlet 51 307 15 0;
#N comlet path;
#P inlet 51 43 15 0;
#P comment 68 308 33 196617 name;
#P comment 121 193 100 196617 check to see if file is allready loaded;
#P comment 308 289 100 196617 numbers of channels , sampling rate , length;
#P comment 324 58 60 196617 as or force;
#P comment 69 43 33 196617 path;
#P comment 118 118 62 196617 to get name;
#P connect 6 0 8 0;
#P connect 8 0 29 0;
#P connect 29 0 14 0;
#P connect 14 0 10 0;
#P connect 10 0 12 0;
#P connect 12 0 15 0;
#P connect 15 0 13 0;
#P connect 13 0 7 0;
#P fasten 11 0 10 1 104 217 73 217;
#P fasten 14 2 10 1 86 185 73 185;
#P connect 8 1 16 0;
#P fasten 14 1 9 0 71 169 104 169;
#P connect 9 0 11 0;
#P fasten 8 2 18 0 98 83 222 83;
#P connect 18 0 17 0;
#P fasten 14 3 13 1 101 162 226 162;
#P fasten 23 0 21 0 334 140 297 140;
#P fasten 25 0 21 0 311 140 297 140;
#P fasten 26 0 21 0 370 140 297 140;
#P fasten 24 0 19 0 334 232 297 232;
#P connect 21 0 19 0;
#P connect 19 0 20 0;
#P connect 27 0 22 0;
#P connect 22 0 25 0;
#P fasten 17 2 19 1 248 248 322 248;
#P connect 22 1 23 0;
#P connect 17 0 21 1;
#P connect 21 1 28 0;
#P connect 28 0 24 0;
#P fasten 17 3 19 2 261 241 347 241;
#P fasten 26 1 24 1 392 168 351 168;
#P fasten 23 1 24 1 356 168 351 168;
#P fasten 22 2 26 0 357 103 370 103;
#P pop;
#P newobj 150 54 116 196617 p name & channel check;
#B color 5;
#N comlet path;
#P inlet 150 28 15 0;
#P comment 273 28 60 196617 as or force;
#P window linecount 0;
#P comment 166 28 33 196617 path;
#P comment 158 73 33 196617 name;
#P fasten 8 0 20 0 113 122 9 122;
#P connect 20 0 19 0;
#P connect 19 0 16 0;
#P connect 16 0 29 0;
#P fasten 8 1 11 0 128 133 63 133;
#P connect 11 0 12 0;
#P fasten 14 0 13 0 146 247 63 247;
#P connect 12 0 13 0;
#P fasten 16 0 13 0 9 247 63 247;
#P fasten 4 1 11 1 208 145 76 145;
#P connect 13 1 21 0;
#P connect 21 0 18 0;
#P fasten 22 0 17 0 167 342 88 342;
#P fasten 19 1 17 0 47 327 88 327;
#P connect 18 0 17 0;
#P fasten 5 0 11 2 314 190 89 190;
#P fasten 4 2 11 3 261 171 102 171;
#P fasten 4 0 8 0 155 87 113 87;
#P fasten 9 0 14 0 410 223 146 223;
#P connect 3 0 4 0;
#P fasten 9 0 22 0 410 248 167 248;
#P connect 15 0 4 1;
#P fasten 8 2 6 0 143 131 314 131;
#P connect 6 0 5 0;
#P connect 5 0 10 0;
#P connect 28 0 27 0;
#P connect 27 0 26 0;
#P connect 26 0 25 0;
#P fasten 9 0 7 0 410 99 356 99;
#P connect 7 0 6 2;
#P fasten 25 0 6 2 327 142 356 142;
#P pop;
#P newobj 72 164 83 196617 p create list;
#B color 5;
#P objectname "create list";
#N comlet number of file(s);
#P outlet 145 191 15 0;
#P comment 162 192 86 196617 number of file(s);
#P comment 18 46 29 196617 path;
#P connect 4 0 8 0;
#P connect 9 0 8 1;
#P fasten 8 0 3 0 23 160 77 160;
#P connect 3 0 13 0;
#P connect 7 0 8 2;
#P connect 5 0 3 1;
#P connect 6 0 7 0;
#P connect 7 1 3 2;
#P fasten 7 2 2 0 164 187 150 187;
#P connect 3 1 2 0;
#P pop;
#P newobj 6 153 225 196617 p loadfiles;
#B color 5;
#P objectname loadfiles;
#P comment 42 175 30 196617 files;
#P comment 475 50 83 196617 drop folder here;
#B frgb 255 255 255;
#P user panel 465 43 99 27;
#X brgb 0 0 0;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 5;
#X done;
#P user dropfile 465 43 563 70 0;
#P objectname $0-drop;
#P comment 579 48 117 196617 1. drop folder of sounds;
#P comment 579 148 140 196617 … ->ALL files will be deleted;
#P user panel 575 41 185 228;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 19 0 7 0;
#P connect 7 0 12 0;
#P connect 14 0 15 0;
#P connect 19 1 7 1;
#P fasten 8 0 7 2 470 92 153 92;
#P connect 22 0 20 0;
#P connect 20 1 7 3;
#P connect 20 2 18 0;
#P connect 20 4 17 0;
#P connect 21 0 20 1;
#P fasten 10 0 11 0 403 210 403 210;
#P connect 11 1 13 0;
#P connect 20 0 9 0;
#P connect 11 1 23 0;
#P fasten 9 1 16 0 499 119 525 119;
#P window clipboard copycount 29;



FP
April 19, 2007 | 12:45 pm

no idea ?
bouhouhou…
;-)


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