Folder of Audio Files in Application
Hi All,
Please can you help me: What pathname do I need to give the FOLDER object so that it populates a umenu with the contents of a folder that is included in my max APPLICATION?
I have an application that plays random audio files from a folder. It is for an installation and so I want the staff at the venue to be able to open the application and press GO without having to locate the folder containing the audio files.
I have searched the forum and checked the tutorials but still haven't solved this problem.
Thanks for all of your help,
Nick
What do You mean by include exactly ?
Where is that folder located ?
Inside app bundle, or in a folder which encloses the application?
Give some details, then it will be easier to give You the solution.
There are few simple options, depending how You build the standalone,
if You make app subfolder a search path or not etc etc.
And You don't necessary need a folder object and umenu for the task.
umenu with autopopulate and proper file type set can do the whole job
Hi Source,
I would like to include the Audio Folder when creating the Application. This will hopefully allow me to transfer the application and all the necessary audio to run the installation onto the venue computer in one self-contained bundle. I suppose the question I'm asking is, what is the filepath of a folder that is included in an application? If I know that then I could perhaps set the filepath as an argument in either the Folder or Umenu objects in my patch so that the Umenu autopopulates with the audio files on startup.
I hope I'm being clear, please feel free to ask more questions.
Thanks for your help,
Nick
In that case maybe it will be enough to activate "Make Application Subfolder a search path "
in Standalone inspector, and also "Search for missing files"
Then only providing a folder name should work.
Other way would be to ask Max to send app path, and then combine that with Standalone name an folder name into a full path.
Have a look in the patch, I use that in order to get path I need while
working on Max Patch and when creating a standalone.
Hi Source,
That solved it! Thanks so much for your help and time, it's much appreciated.
Have a great evening.
Nick
Ah, I spoke too soon. It seems that it works as long as I place a copy of the audio folder on the desktop of the computer I'm installing the application on. i.e. On startup the application is not finding the audio folder bundled with the application but does find a folder with the same name if it's placed on the desktop.
I notice that thispatcher ouputs only a '/' for the filepath when getruntime = 0. Shouldn't this be ouputting the application filepath or am I missing something?
Cheers,
Nick
Can You precise which path You took, and what exactly is not working ?
And why do You place a folder on the desktop instead in the Standalone app bundle ?
In the example patch I posted, thispatcher only outputs path when runtime = 0,
if runtime = 1, then message ; max sendapppath gets triggered and
so one gets the path of the standalone.
The idea ist to place the folder that needs to be found next to the patcher while one programs it,
and if You want to find it in the Standalone, then combine the Standalone path with standalone Name and Folder name into absolute path.
In sprintf that would be {sprintf symout %sMyStandalone.app/myfolder}
-----------
But all that is not needed if You use Standalone inspector with properly set parameters
Ok, after further investigation it looks like I have a problem at the point of building the application... I am selecting "Include Folder..." and then choosing my folder of audio files. I then choose "Build" >> "Application" and Max builds the application. However, when I check the application package contents there is no sign of my folder of Audio Files. How should I be adding the folder of files to the application? Am I doing it wrong?
Thanks for your patience,
Nick
Sorry that it took so long to reply.
Better than including the folder when building the app,
just put it manually there, and forget the trouble.
I don't know what max does when one includes the folder
when building the app, and honestly I don't care.
Hey Source,
No problem at all. For this gig I'll do as you suggest and put the folder on the venue computer manually. It works fine so it's no problem. Files that I add that aren't in a folder are working fine in the application so I'm pretty sure it's a filepath issue, I guess I need to find the folder path once it's in the application. Anyway, I may start another thread to see if I can get to the bottom of it.
Thanks for all of your help. It really is appreciated.
Nick
Hello! Did you found a solution for this? Im having exaclty the same problem. Thank you!
Hi Manuel, Sorry, it's been a while but looking through the thread, I still don't know the solution. If I can find some time in the coming days I may take a look at it to see if the prices has got any easier with updates. I'll post here if I find a solution. Good luck.
Thank you very much for your response! If I can find it, I ll post it here as well.