A way to search folders within where the patch is located?

codysherman's icon

I currently have a large patch which is comprised of lots and lots of subpatches. It would be great if I could organize all of the secondary patches into folders. The folders would all be within the same folder that the main, primary patch would be in. Example:

Inside of the folder called Project1:
Main.patch
Effects folder
Images folder

Right now, if I put any patches within the Effects folder, or use a pictctrl with an image not directly in the Project1 folder, they don't work. I suppose I could go and add all my subfolders as sources to Max, but then I'd have to repeat that for every new project I make, and even then I'm not sure if the pictctrls would work.

mesa.elech/tele's icon

i think, if i remember correctly, relative paths don't work in max, instead absolute paths do.
you can use [thispatcher] with |path| message to get the absolute path.
i do this when i use sound files in sub-folders.

also maybe you can use [filepath] object to set the folders of your choice to be looked at.

Roman Thilenius's icon

the basic rules are:

1.
always use unique, custom names for your project files, like "myname.myproject.abstraction7.mxb"
and "myname.myproject.drumsound3.aifc"

2.
and then put them into folders as you wish, and see if they are all - somewhere - inside the search path.
thats all of the magic required.

when building an application from the project, the files must be side-by-side to the
runtime (=your app), as this is the only valid search path.

-110

gassafe's icon

Thanks Roman Thilenius, I like your process of finding folders. I am interesting to try this procedure.

dupecom's icon

hello cycling team,

every 1 or 2 month we see this feature request in the forum.
it would be really great, if you could give us the possibility
to set a realative search path BEFORE our main patch is loaded.

it would be much easier for us to manage our projects.

is it that complicated to give us more than one realative search path ?
since years, we go begging for that ....

dupecom

LLT's icon

yep

2396.test.zip
zip
dupecom's icon

hello LLT,

thanks for your reply !
with media files your method works, thats clear.

but what we need is a way to place our subpathers
in a realtive folder near our application.

NOT in a folde with an absolute path, which is defined as a searchfolder in max.

it is a limit in organizing our subpatches.

we only have 2 workarounds:
1) putting our subpatches somewhere in a folder, which is defined as a searchpath.
this method has the disadvantage, that we have to choose unique names and
its difficult to move projects with all its dependencies.
yes, there are some people, which are working on more than one project ;-)

2) putting all our subpatches beside our standalone, which is messy ...

it would be really helpful to have an other relative searchpath for our patcher :-)

dupecom

LLT's icon

Hello dupecom, I know this problem.
I call my abstractions / patch with this method.

LLT.

2408.test2.zip
zip
dupecom's icon

hello LLT,

great work ! nice workaround :-)

here we see how creative we have to be to get
a basic functionality into max.

the disadvantage of this technique is, that it always create a new
instance of the pather.

so we have to delete the "dynamic" pather automatically
on closebang.

but then we loose all the connection we did.
ok, we could do the communication via send/receive

but why not give us the option of a second relative searchpath.
that could make the everyday max life much easier :-)

dupecom

officeplus2010's icon

but what we need is a way to place our subpathers
in a realtive folder near our application.

NOT in a folde with an absolute path, which is defined as a searchfolder in max.

it is a limit in organizing our subpatches.

but what we need is a way to place our subpathers
in a realtive folder near our application.

NOT in a folde with an absolute path, which is defined as a searchfolder in max.

it is a limit in organizing our subpatches.

officeplus2010's icon

the disadvantage of this technique is, that it always create a new
instance of the pather.

so we have to delete the "dynamic" pather automatically
on closebang.

Zachary Seldess's icon

I've definitely posted an example of one way to do this in the past, but I'm too lazy to find it, so here it is again. I do this with large projects all the time, unless I build as a standalone.

2451.loadpatchwithTempSearchPaths.zip
zip
Pierre Alexandre Tremblay's icon

Sorry to revive this thread, but it would be good to have the option that the subfolders of the patcher's path to be included the same way that the folder in which the patch is is included...

simple and avoids the (clever) absolute path wrappers above

p