Forums > MaxMSP

relative directories in ubumenu, and in general

May 11, 2008 | 7:22 pm

hi ppl, whats the current state of things?
there were a couple of good threads and workarounds posted, i currently use

#P button 245 67 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 245 101 74 9109513 opendialog fold;
#B color 5;
#P newex 306 171 112 9109513 print name_Of_Directory;
#P newex 272 148 44 9109513 zl ecils 1;
#P newex 245 126 66 9109513 regexp (\\w)*;
#P connect 3 0 0 0;
#P connect 1 1 2 0;
#P connect 0 2 1 0;
#P connect 4 0 3 0;
#P window clipboard copycount 5;

to get name of mother ship, but it would be great if ubumenu would support
relative paths, or does it?

suppose i want to address
-root
–folder_a
i currently need to get the path of patch and add the reletive folder using
sprintf, like robert z said

"my solution is this abstraction called "search_path" it is used thusly:;

[closebang]->[searchpath 3 folder_to_search] [closebang]->[searchpath 4
2nd_folder_to_search];

the closebang removes the path from the file prefs, the first arg is the
slot to add the path to and the second arg is the name of the folder to add,
which is relative to the main patch (the one which loads the search_path
abstraction). so the directory structure is: /Root/Main_Patch
/Root/search_path /Root/folder_to_search/ /Root/2nd_folder_to_search/;

"

#P inlet 99 128 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 107 79 90 9109513 $2;
#P newex 39 29 48 9109513 loadbang;
#P newex 18 215 14 9109513 _;
#P button 18 131 15 0;
#P message 99 155 33 9109513 clear;
#P newex 39 129 51 9109513 tosymbol;
#P newex 39 107 78 9109513 sprintf %s%s/;
#P message 18 238 222 9109513 ./patches;
#P newex 39 155 57 9109513 prepend set;
#P message 39 55 29 9109513 path;
#N thispatcher;
#Q end;
#P newobj 39 78 61 9109513 thispatcher;
#P newex 18 192 93 9109513 filepath search $1;
#P connect 11 0 5 1;
#P fasten 10 0 8 0 44 50 23 50;
#P connect 10 0 2 0;
#P fasten 10 0 11 0 44 50 112 50;
#P connect 12 0 7 0;
#P connect 6 0 3 0;
#P connect 5 0 6 0;
#P fasten 1 1 5 0 95 101 44 101;
#P connect 2 0 1 0;
#P connect 9 0 4 0;
#P connect 0 0 9 0;
#P fasten 7 0 0 0 104 180 23 180;
#P connect 8 0 0 0;
#P fasten 3 0 0 0 44 184 23 184;
#P window clipboard copycount 13;


May 11, 2008 | 8:27 pm

and there is a problem with the second abxhation, there is no precedence for
filepath on anything, so i cant count on this to load before a nested file.

On Sun, May 11, 2008 at 10:22 PM, yair reshef wrote:

> hi ppl, whats the current state of things?
> there were a couple of good threads and workarounds posted, i currently
> use
>
> #P button 245 67 15 0;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 245 101 74 9109513 opendialog fold;
> #B color 5;
> #P newex 306 171 112 9109513 print name_Of_Directory;
> #P newex 272 148 44 9109513 zl ecils 1;
> #P newex 245 126 66 9109513 regexp (\\w)*;
> #P connect 3 0 0 0;
> #P connect 1 1 2 0;
> #P connect 0 2 1 0;
> #P connect 4 0 3 0;
> #P window clipboard copycount 5;
>
> to get name of mother ship, but it would be great if ubumenu would support
> relative paths, or does it?
>
> suppose i want to address
> -root
> –folder_a
> i currently need to get the path of patch and add the reletive folder using
> sprintf, like robert z said
>
> "my solution is this abstraction called "search_path" it is used thusly:;
>
> [closebang]->[searchpath 3 folder_to_search] [closebang]->[searchpath 4
> 2nd_folder_to_search];
>
> the closebang removes the path from the file prefs, the first arg is the
> slot to add the path to and the second arg is the name of the folder to add,
> which is relative to the main patch (the one which loads the search_path
> abstraction). so the directory structure is: /Root/Main_Patch
> /Root/search_path /Root/folder_to_search/ /Root/2nd_folder_to_search/;
>
> "
>
> #P inlet 99 128 15 0;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 107 79 90 9109513 $2;
> #P newex 39 29 48 9109513 loadbang;
> #P newex 18 215 14 9109513 _;
> #P button 18 131 15 0;
> #P message 99 155 33 9109513 clear;
> #P newex 39 129 51 9109513 tosymbol;
> #P newex 39 107 78 9109513 sprintf %s%s/;
> #P message 18 238 222 9109513 ./patches;
> #P newex 39 155 57 9109513 prepend set;
> #P message 39 55 29 9109513 path;
> #N thispatcher;
> #Q end;
> #P newobj 39 78 61 9109513 thispatcher;
> #P newex 18 192 93 9109513 filepath search $1;
> #P connect 11 0 5 1;
> #P fasten 10 0 8 0 44 50 23 50;
> #P connect 10 0 2 0;
> #P fasten 10 0 11 0 44 50 112 50;
> #P connect 12 0 7 0;
> #P connect 6 0 3 0;
> #P connect 5 0 6 0;
> #P fasten 1 1 5 0 95 101 44 101;
> #P connect 2 0 1 0;
> #P connect 9 0 4 0;
> #P connect 0 0 9 0;
> #P fasten 7 0 0 0 104 180 23 180;
> #P connect 8 0 0 0;
> #P fasten 3 0 0 0 44 184 23 184;
> #P window clipboard copycount 13;
>
>


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