Forums > MaxMSP

extraneous spaces coming from ubumenu

September 23, 2006 | 2:27 am

hey, apologies for my whining again.
I’m trying to set up a system for accessing a folder and the files within, for sample selection. I’m using a folder and ubumenu object, to select the file, then trying to pass it on to another folder / ubumenu to select the aiff file. It looks to me like the message coming out of the middle inlet of ubumenu has a space after it. One that isn’t there on the folder name! This is making the second folder object unable to read the incoming signal… I apologise, I don’t explain myself very well…
here’s an example of what’s going wrong. The messages apply to my own comuters filing, but it may help understand. Please let me know if you are able to help
tom

max v2;
#N vpatcher 14 59 1023 711;
#P origin -14 0;
#P window setfont "Sans Serif" 9.;
#P number 286 437 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 222 389 15 0;
#P window linecount 1;
#P newex 259 333 53 196617 prepend;
#P user ubumenu 259 464 155 196617 0 1 0 0;
#X setrgb 249 75 255 255 255 255 249 207 255 249 75 255 255 255 255 112 112 112;
#X add;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 213 363 32 196617 print;
#P newex 259 306 297 196617 prepend /Users/tomhaig/desktop/performancepatch/folders/;
#P message 333 372 58 196617 types AIFF;
#P newex 259 406 37 196617 folder;
#P newex 31 95 65 196617 relativepath;
#P button 0 102 15 0;
#P message 135 125 248 196617 /Users/tomhaig/desktop/performancepatch/folders;
#P button 31 45 15 0;
#P newex 31 73 76 196617 opendialog fold;
#P message 289 95 55 196617 types fold;
#P newex 31 277 32 196617 print;
#P user ubumenu 187 227 155 196617 0 1 0 0;
#X setrgb 249 75 255 255 255 255 249 207 255 249 75 255 255 255 255 112 112 112;
#X add track1;
#X add track2;
#X add track3;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P number 58 196 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 31 141 37 196617 folder;
#P comment 345 229 100 196617 track select;
#P window linecount 2;
#P comment 388 121 100 196617 track location folders;
#P connect 8 0 7 0;
#P connect 7 0 11 0;
#P fasten 6 0 2 0 294 116 36 116;
#P connect 11 0 2 0;
#P connect 10 0 2 0;
#P connect 9 0 2 0;
#P connect 2 0 5 0;
#P connect 2 1 3 0;
#P connect 2 0 4 0;
#P connect 17 0 15 0;
#P connect 4 1 14 0;
#P connect 14 0 17 0;
#P connect 17 0 12 0;
#P connect 18 0 12 0;
#P fasten 13 0 12 0 338 393 264 393;
#P connect 12 0 16 0;
#P connect 12 1 19 0;
#P pop;


September 23, 2006 | 5:48 am

this should solve your space issue , which is not coming from [ubumenu] but from [prepend]…
( i changed the path to test on my machine so doublecheck i put back properly so it works on yours )
peace

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 734 443 100 196617 whereas [sprintf] doesn’t;
#P window linecount 1;
#P message 101 530 33 196617 clear;
#P message 230 187 33 196617 clear;
#P number 201 523 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P message 662 362 16 196617;
#P window linecount 1;
#P newex 662 336 62 196617 prepend set;
#P newex 662 309 292 196617 prepend /Users/tomhaig/desktop/performancepatch/folders/;
#P window linecount 0;
#P message 660 471 16 196617;
#P window linecount 1;
#P newex 660 447 62 196617 prepend set;
#P newex 163 388 302 196617 sprintf /Users/tomhaig/desktop/performancepatch/folders/%s;
#P newex 163 483 30 196617 t b s;
#P message 163 503 141 196617 types TEXT , types AIFF , bang;
#P newex 163 522 35 196617 folder;
#P user ubumenu 163 555 155 196617 0 1 0 0;
#X setrgb 249 75 255 255 255 255 249 207 255 249 75 255 255 255 255 112 112 112;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 38 102 65 196617 relativepath;
#P button 7 109 15 0;
#P message 142 132 248 196617 /Users/tomhaig/desktop/performancepatch/folders;
#P button 38 52 15 0;
#P newex 38 80 76 196617 opendialog fold;
#P message 296 102 55 196617 types fold;
#P newex 38 284 32 196617 print;
#P user ubumenu 194 234 155 196617 0 1 0 0;
#X setrgb 249 75 255 255 255 255 249 207 255 249 75 255 255 255 255 112 112 112;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P number 65 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 38 148 37 196617 folder;
#P comment 352 236 100 196617 track select;
#P window linecount 2;
#P comment 395 128 100 196617 track location folders;
#P window linecount 4;
#P comment 696 244 100 196617 using [prepend] creates a space between prependee and prepender;
#P fasten 5 1 17 0 271 319 168 319;
#P fasten 5 1 20 0 271 279 667 279;
#P connect 20 0 21 0;
#P connect 17 0 16 0;
#P fasten 17 0 18 0 168 412 665 412;
#P connect 14 1 13 0;
#P connect 14 1 23 0;
#P hidden connect 16 0 15 0;
#P hidden connect 16 1 14 0;
#P connect 25 0 13 0;
#P connect 24 0 5 0;
#P connect 21 0 22 0;
#P connect 18 0 19 0;
#P connect 14 0 13 0;
#P hidden connect 15 0 14 0;
#P connect 3 0 6 0;
#P connect 3 0 5 0;
#P connect 3 1 4 0;
#P connect 10 0 3 0;
#P connect 11 0 3 0;
#P connect 12 0 3 0;
#P fasten 7 0 3 0 301 123 43 123;
#P connect 8 0 12 0;
#P connect 9 0 8 0;
#P window clipboard copycount 27;


September 23, 2006 | 5:49 am

this should solve your space issue , which is not coming from [ubumenu] but from [prepend]…
( i changed the path to test on my machine so doublecheck i put back properly so it works on yours )
peace

#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 734 443 100 196617 whereas [sprintf] doesn’t;
#P window linecount 1;
#P message 101 530 33 196617 clear;
#P message 230 187 33 196617 clear;
#P number 201 523 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P message 662 362 16 196617;
#P window linecount 1;
#P newex 662 336 62 196617 prepend set;
#P newex 662 309 292 196617 prepend /Users/tomhaig/desktop/performancepatch/folders/;
#P window linecount 0;
#P message 660 471 16 196617;
#P window linecount 1;
#P newex 660 447 62 196617 prepend set;
#P newex 163 388 302 196617 sprintf /Users/tomhaig/desktop/performancepatch/folders/%s;
#P newex 163 483 30 196617 t b s;
#P message 163 503 141 196617 types TEXT , types AIFF , bang;
#P newex 163 522 35 196617 folder;
#P user ubumenu 163 555 155 196617 0 1 0 0;
#X setrgb 249 75 255 255 255 255 249 207 255 249 75 255 255 255 255 112 112 112;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 38 102 65 196617 relativepath;
#P button 7 109 15 0;
#P message 142 132 248 196617 /Users/tomhaig/desktop/performancepatch/folders;
#P button 38 52 15 0;
#P newex 38 80 76 196617 opendialog fold;
#P message 296 102 55 196617 types fold;
#P newex 38 284 32 196617 print;
#P user ubumenu 194 234 155 196617 0 1 0 0;
#X setrgb 249 75 255 255 255 255 249 207 255 249 75 255 255 255 255 112 112 112;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P number 65 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 38 148 37 196617 folder;
#P comment 352 236 100 196617 track select;
#P window linecount 2;
#P comment 395 128 100 196617 track location folders;
#P window linecount 4;
#P comment 696 244 100 196617 using [prepend] creates a space between prependee and prepender;
#P fasten 5 1 17 0 271 319 168 319;
#P fasten 5 1 20 0 271 279 667 279;
#P connect 20 0 21 0;
#P connect 17 0 16 0;
#P fasten 17 0 18 0 168 412 665 412;
#P connect 14 1 13 0;
#P connect 14 1 23 0;
#P hidden connect 16 0 15 0;
#P hidden connect 16 1 14 0;
#P connect 25 0 13 0;
#P connect 24 0 5 0;
#P connect 21 0 22 0;
#P connect 18 0 19 0;
#P connect 14 0 13 0;
#P hidden connect 15 0 14 0;
#P connect 3 0 6 0;
#P connect 3 0 5 0;
#P connect 3 1 4 0;
#P connect 10 0 3 0;
#P connect 11 0 3 0;
#P connect 12 0 3 0;
#P fasten 7 0 3 0 301 123 43 123;
#P connect 8 0 12 0;
#P connect 9 0 8 0;
#P window clipboard copycount 27;


September 23, 2006 | 11:16 am

excellent! you’re a hero, thank you so much. That’s really useful to know for other stuff too. My next problem is- I’m trying to get the AIFf files in the folder in the second ubumenu to be displayed in a single column jit.cellblock, which will send out the message of the aiff files when it is clicked on. Any idea how I can make this possible?
thanks very much
tom


September 23, 2006 | 1:05 pm

this is not perfect, is a work in progress. you can drag files to a cellblock (1d), pressing QWERTY 1-4 sends the filename out the 4 outputs. the thing i did is to make the cellblock contain only the stripped pathname, the coll the full path, which is one reason why they arnt sharing the data internally (as colls and cellblocks can).

max v2;
#N vpatcher 209 14 991 652;
#P origin 0 5;
#P window setfont "Sans Serif" 9.;
#N vpatcher 15 55 442 309;
#P window setfont "Sans Serif" 9.;
#P message 20 54 72 9109513 script new selbox number -20 -20 10 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0 , script send selbox select , script delete selbox;
#N comlet output of control to give up QWERTY focus while still having mouse-focus;
#P inlet 20 34 15 0;
#N comlet connect directly to a ‘thispatcher’ object.;
#P outlet 20 193 15 0;
#P window setfont "Sans Serif" 12.;
#P comment 125 29 261 9109516 just a script (using thispatcher) , created by an unknown max user on the forums , this allows the QWERTY keyboard to still have focus , even while a GUI object is being manipulated with the mouse (or , afterwards , but before the background is clicked to change focus). this is very useful for number boxes , sliders , and for me cellblocks , so you can select an entry with the mouse on the cellblock , and then assign it to a buffer witht he QWERTY keyboard.;
#P connect 2 0 3 0;
#P connect 3 0 1 0;
#P pop;
#P newobj 652 341 60 9109513 p free focus;
#P newex 412 177 47 9109513 tosymbol;
#N thispatcher;
#Q end;
#P newobj 652 386 60 9109513 thispatcher;
#P hidden newex 555 20 40 9109513 key;
#N thispatcher;
#Q end;
#P hidden newobj 355 577 54 9109513 thispatcher;
#P hidden newex 349 503 53 9109513 t b b l l;
#P hidden newex 346 79 27 9109513 i;
#P hidden newex 274 159 27 9109513 t b i;
#P hidden newex 274 132 27 9109513 i;
#P hidden newex 340 233 63 9109513 gate 4;
#P comment 170 20 42 9109513 : to chan;
#P hidden newex -73 352 27 9109513 i;
#P hidden newex 555 47 98 9109513 select 49 50 51 52 48;
#P hidden message 315 368 21 9109513 0 0;
#P hidden newex 264 79 19 9109513 t b;
#P hidden newex 588 202 83 9109513 sprintf remove %i;
#P hidden message 341 368 28 9109513 clear;
#P hidden newex 291 331 40 9109513 b 3;
#P hidden newex 567 96 72 9109513 sprintf %s 0 %i;
#P message 221 19 28 9109513 clear;
#P message 155 19 14 9109513 4;
#P message 139 19 14 9109513 3;
#P message 123 19 14 9109513 2;
#P message 107 19 14 9109513 1;
#P message 209 583 40 9109513 clear all;
#P hidden outlet 391 256 15 0;
#P hidden outlet 374 256 15 0;
#P hidden outlet 357 256 15 0;
#P hidden outlet 340 257 15 0;
#P hidden newex 588 177 27 9109513 i;
#P hidden newex 23 444 27 9109513 i;
#P hidden newex 23 395 27 9109513 t b s;
#P hidden newex 419 37 64 9109513 sprintf %i %s;
#P hidden newex 27 230 61 9109513 loadmess 64;
#P number 107 585 46 9 12 512 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 56 44 40 9109513 rows $1;
#P hidden newex 473 353 27 9109513 i;
#P hidden newex 490 331 27 9109513 + 1;
#P hidden message 473 380 26 9109513 0 $1;
#P hidden newex 415 471 27 9109513 i;
#P hidden newex 415 539 88 9109513 sprintf set 0 %i %s;
#P hidden newex 452 604 40 9109513 t b b s;
#P hidden newex 406 438 62 9109513 unpack 0 0 s;
#N coll files;
#T flags 1 0;
#P newobj 429 131 53 9109513 coll files;
#P hidden newex -53 437 44 9109513 strippath;
#P user jit.cellblock 107 37 249 584 139 9 1 64 126 14 0 1 1 1 0 0 1 0 1 0 0 0 248 255 157 0 0 0 0 0 0 191 191 191 0 0 0 191 202 255 1 1 1 0 4 0 0 0;
#P user dropfile 107 37 250 583 0;
#P hidden newex 490 305 38 9109513 zl nth 2;
#P comment 155 585 35 9109513 : length;
#P user hint 107 585 194 601 "sample list length – this can only be updated after a ‘clear all’ message is sent (initial size is 64 min and max values are 12 to 512)." 500 100 0 65535 65535 52428 9 139 0 1 0 0 0;
#P user panel 170 19 46 17;
#X brgb 123 223 174;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 154 585 39 15;
#X brgb 123 223 174;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden connect 34 0 40 0;
#P hidden connect 17 0 40 1;
#P hidden connect 5 0 7 0;
#P hidden connect 5 0 20 0;
#P hidden connect 20 0 21 0;
#P hidden connect 9 1 21 1;
#P hidden connect 18 0 16 0;
#P hidden connect 40 0 16 0;
#P hidden connect 39 0 28 0;
#P hidden connect 27 0 6 0;
#P hidden connect 16 0 6 0;
#P hidden connect 11 0 6 0;
#P hidden connect 13 0 6 0;
#P hidden connect 33 0 6 0;
#P hidden connect 38 0 6 0;
#P hidden connect 18 0 17 0;
#P hidden connect 39 1 29 0;
#P hidden connect 39 2 30 0;
#P hidden connect 39 3 31 0;
#P hidden connect 39 4 32 0;
#P hidden connect 32 0 37 0;
#P hidden connect 28 0 43 0;
#P hidden connect 29 0 43 0;
#P hidden connect 30 0 43 0;
#P hidden connect 31 0 43 0;
#P hidden connect 43 0 44 0;
#P hidden connect 27 0 34 0;
#P hidden connect 34 1 38 0;
#P hidden connect 44 1 42 0;
#P connect 42 0 23 0;
#P hidden connect 34 2 35 0;
#P hidden connect 44 0 45 0;
#P hidden connect 6 0 46 0;
#P hidden connect 46 1 47 0;
#P hidden connect 42 1 24 0;
#P hidden connect 9 1 45 1;
#P hidden connect 42 2 25 0;
#P hidden connect 42 3 26 0;
#P connect 50 0 42 1;
#P hidden connect 46 2 9 0;
#P connect 8 0 50 0;
#P hidden connect 10 1 12 0;
#P hidden connect 12 0 11 0;
#P hidden connect 21 0 19 0;
#P hidden connect 35 0 8 0;
#P hidden connect 36 0 8 0;
#P hidden connect 45 0 8 0;
#P connect 19 0 8 0;
#P hidden connect 9 1 12 1;
#P hidden connect 7 0 10 0;
#P hidden connect 20 1 19 1;
#P hidden connect 10 0 15 0;
#P hidden connect 15 0 13 0;
#P hidden connect 46 3 4 0;
#P hidden connect 4 0 14 0;
#P hidden connect 14 0 15 1;
#P hidden connect 10 2 11 1;
#P hidden connect 48 0 39 0;
#P hidden connect 32 0 33 0;


September 23, 2006 | 1:24 pm

register wrote:
> Please let me know if you are able to help

The nice thing about the ubumenu is: you don’t need the folder object.
You can use the prefix setting of ubumneu itself.

That way it will contain both, the file names in the menu and the
complete path…
(as always the help file/manual will unfold the details)

Stefan


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


September 23, 2006 | 3:50 pm

i just realized about that this morning through another thread started by Gary Lee Nelson "Relative folder path in ubumenu autopopulate"… i am still learning ;) …
so Tom there are some enhancements that can be made, check Vade’s patch submitted in that thread…
by the way i liked your pink Ubuz….;)
and i ll be a heroe only when ill drop George Bush in the Indian Ocean ( shark land …)

Quote: Stefan Tiedje wrote on Sat, 23 September 2006 07:24
—————————————————-
> The nice thing about the ubumenu is: you don’t need the folder object.
> You can use the prefix setting of ubumneu itself.
>


September 23, 2006 | 4:35 pm

Thank you so much. Looks like a much bigger job that I expected to get the file’s aif contents into jit.cellblock! Essentially, what I’m after is system where the user can select the destination of their tracks, for a live set, then select which track (via its own labelled folder in ubumenu) and as soon as its selected, a list of all the audio files appears, so they can select a file. I’m not even sure if jit.cellblock is the appropriate object. I’ve seen it done on lloopper buffer_host patch (http://lloopp.klingt.org/start.html) but if there’s a simpler way to display the whole folder contents, that’d be ideal. Anyone know of any methods / objects other the [jit.cellblock] ?
thanks!


September 23, 2006 | 10:50 pm

look for Klaus Filip’s ll.cellblog
quote : " helps inplace-editing of a cellblock by overlaying standard user-interfaces."

i haven’t studied it extensively but that might give you another track to look at.

http://lloopp.klingt.org/externals/ll.cellblog.zip

Quote: Tom Haig wrote on Sat, 23 September 2006 10:35
—————————————————-
> Thank you so much. Looks like a much bigger job that I expected to get the file’s aif contents into jit.cellblock! Essentially, what I’m after is system where the user can select the destination of their tracks, for a live set, then select which track (via its own labelled folder in ubumenu) and as soon as its selected, a list of all the audio files appears, so they can select a file. I’m not even sure if jit.cellblock is the appropriate object. I’ve seen it done on lloopper buffer_host patch (http://lloopp.klingt.org/start.html) but if there’s a simpler way to display the whole folder contents, that’d be ideal. Anyone know of any methods / objects other the [jit.cellblock] ?
> thanks!
—————————————————-


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