Forums > MaxMSP

Max 5 Application Building

July 21, 2008 | 8:09 am

So I’m building an application, and I need to include a bunch of small (<4kb) audio files in it. Including the folder containing all the files, and including them one at a time, does not work. The only way the built app recognizes them is if they're in the same folder as the app itself, which is... messy.

Whenever I put the app on another computer, without the audio files, I get a ‘buffer~: can’t read’ error.

Any thoughts?


July 21, 2008 | 8:53 am

There’s a thread about this every couple weeks. Max can only find files in the same directory, or in the search path. I suggest you add your samples folder (which is relative i suppose) to the search path when loading the patch. Use the [filepath] object for this.

Here’s one thread about it:

http://www.cycling74.com/forums/index.php?t=msg&th=34514&start=0&rid=5118&S=7e41d0662ddf6ae6da9211efc580f0fe


July 21, 2008 | 8:59 am

Ah, I must have phrased it badly – I’ve got it working quite fine in MaxMSP 5, adding new filepaths is oldschool. The problem is when I try to build it into an application, and tell the build script to include the folder of samples, it just… doesn’t. The application (which I’d like to be fully self contained) has to be sitting in a mess of sample files, because if I send it to someone that doesn’t have a full Max5 install, they can’t very well change their file search paths.


July 21, 2008 | 9:02 am

WAIT

I fixed it!

OK, here’s what I had to do: I’ve got all these sample files – instead of putting them in the same folder as the application, open the application as a package (in OSX, ctrl-click and select ‘Show Package Contents.’

From there, go to Contents: MacOS, and drop your files inside that folder.

Your standalone application will now run fine, loading your files when necessary, while staying completely self-contained!


July 22, 2008 | 12:08 pm

Ah, i indeed got you wrong there…
Smart solution (although personally i think the Mac package system is not very intuitive, i didn’t know there were folders behind everything at first). But in this case, it works fine.


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