I’m wondering if someone could give me a straight forward answer here. I’m a bit confused about things.
I’m in the process of creating a Max/MSP setup that I will eventually want to save as a standalone application. One of the things that I need this to do, is to ‘Import’ a series of MP3′s into various buffer objects upon startup.
How do I program things so that no matter who’s computer the app is running on, Max will find the right MP3′s? Anytime I’ve successfully done this, I’ve needed to include my harddrive name in the file path. How can I be sure that Max will find the right files when it’s running off of someone else’s hard drive?
Sorry if this is a basic question, but since this is work for a client, I need to be absolutely sure that this app will reliably run… anyone’s expertise would be hugely appreciated.
You will need to [loadbang] a "; max sendapppath somename" and the location of your app will be sent to a [receive somename]. Then you can use [sprintf] to set the desired location inside your application, for example [sprintf symout %s/App Name/Contents/support] is a good place to put your audio files. You can do this after building your application by right-clicking, then selecting "show package contents". I hope this helps.
Thank you for this!
I must admit, that this does not immediately make sense to me – but that has to do with my limitations as a MAX programmer – I am very comfortable with patching knobs, dials, etc. but things like ‘sprint’ scare me a little .
This will definitely give me a direction though, thank you for putting me on the right (file)path.
I’m eating my words.
This took me about 10 minutes to wrap my brain around. Your explanation was perfect.
Thank you so much for your help!
|[sprintf symout %s/App Name/Contents/support] is a good place to put your audio files. You can do this after building your application by right-clicking, then selecting "show package contents".|
I wouldn’t put the mp3 there if they’re big. If you need to regulary update your app for your client, you’ll then have to put the mp3 yourself in the package and send him a very big app.
But of course, tthe package is a good location to "hide" the mp3 to the client and make sure the app will find them.
i’m having problems with this.
for a standalone app, trying to load a preset file on start, and save the same file on close.
so i’m using
(sprintf symout %s/App Name/file.maxpresets)
but for some reason, the write ends up in the same folder as the app (rather than in the app).
and the read cant find the file even when i place it manually.
i’ve tried a variety of paths inside the app and none seem to work for me :p
directing it to the same folder as the app does actually work.
(sprintf symout %s/file.maxpresets)
i’m running Max 5.1.9 with Mountain Lion 10.8.5
----------begin_max5_patcher---------- 671.3oc4Xt0aaCBEG+YmOEHKs25ZMXvW1dpeN1plbhIILYisLD0jU0u6iK1a NUxS9RLpU6kf7AD7+7iygCjW134us5LU3C9B3a.OuW134YLoM309smeY14cE YByv74zmq19S+6rcIomkFy6JpDzsY7Cc8ruhKEreQ08BQ2GzZlepjwKnRyj0 yX0IYmUXq05L4tiL9gezP2IsRDmFnlI.JBqahHlOTl.O0aU4YklU0+wFVVQm dX4FaJs+YXmM6hJuTSsSuuwA.Oo680Maz+b2xvRcCslxyAO2vjzofF3LQSHI U2jDNOzfhFjMqBWZnY4qJVhSLTI1DvjflIUHtgJ4zhrK.RPvTPBZpHIwDn.w wlbn4FnfWgjnRpPjcftpdea.QPrEBliPfIS18CcSDgntgwk6AhKZ2C7IwCxi Lwi00OrmUPuWMEpLIg1qWyjHT.t2wtnv4FyftwPy569i2Gw+CeL13UXaZALv jjf66i8qfjNnmzoIfuZiS2bsg4EbbpbKsY4awngceRPjwgsmGPBlYk0jA4RK MVPEVG.AaYBbDbQPH9CMDvDjEBnEAgnOzPHLM4V.Ax5AAWTqr6NkP7hJVl9+ TsxHXzsnVYhaXVCPyn08Ma1KO.iSs2Ded73V+tj2j97Gf70u2nFGPndbRVcs xcNdEgJXb5tpSbY+7oUI2CRLwQ1LPHxdqUzTwlitlZQUV9Te7OblDgXxnhl4 QxnI7rEyLa1xey+PhQbZ6WSJQ0olccSWaPK3u5KmJjLdljUw6MljqFyQVdNk 2OOqjkWWoNWqUBCrqMVEkLBEoNtF.clhFCizObvgP5MK2.ZJzoXBNxMNGRow .IrakDdrabNTSjQnIni25BGCmHtUSQu+3T5XvTz6trtkDfq930M+FDP1WhO -----------end_max5_patcher-----------
i just noticed that Max wont create a folder.
in this case the folder "presets"
(sprintf symout %s/presets/file.maxpresets)
and instead will put them with the app, rather than the non-existent folder. so i’m guessing that Max is not seeing the app as a folder ?