Forums > MaxMSP

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

June 26, 2011 | 7:02 am

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.


June 26, 2011 | 4:15 pm

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.


June 26, 2011 | 6:31 pm

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


June 27, 2011 | 5:47 am

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


June 27, 2011 | 10:27 am

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
June 27, 2011 | 11:14 am

yep

Attachments:
  1. test.zip

June 28, 2011 | 1:14 pm

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
July 1, 2011 | 7:35 am

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

LLT.

Attachments:
  1. test2.zip

July 1, 2011 | 5:50 pm

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


July 2, 2011 | 3:35 am

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.


July 2, 2011 | 3:36 am

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.

[url=http://www.fashionsport.net/outlook-2010-applied-in-business]Outlook 2010 applied in business[/url]
[url=http://www.storeuk.us/change-email-in-outlook-2010]outlook 2010[/url]
[url=http://www.clearanceoutletsell.info/corresponding-version-of-outlook-2010]corresponding version of outlook 2010[/url]


July 20, 2011 | 8:40 pm

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.


October 12, 2011 | 5:15 pm

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


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