How do I specify a filepath?
Hi sorry guys, I'm trying really hard to not get frustrated over this :P (newbie)
I've built a simple generative music player that works from samples, if I save the patch in the sample folder it will read them and works efficiently, obviously I don't want the patch to be mixed up in this folder, I want it to be at a higher level in the project folder and to know where to read the samples from on my HD. I've tried a number of objects that are mentioned in the documentation but I can't work out how to specify a filepath, just getting error messages!!
At the moment the patch opens the files with a loadbang going into a message specifying the particular files, but as I mentioned, only works if the patch is in the samle folder
can anyone help me out with this?
Aid
Think this has been asked a couple times before^^...
You can include subfolders in the search path, and max will be able to find them. But this can get messy, for example when multiple files are in different folders but have the same name.
Another way is to specify full paths when loading the samples. If you know where the sample directory is, store the folder path somewhere (like [zl reg]), and then add the filename to it with a [sprintf %s%s]. You can even load the sample names into a ubumenu...
Good luck!
is it possible with a [folder] object ?
Yes, very much so. Here's a part of what i use to load dirs into ubumenus. It checks for a file extension and sends it through.
thx !
i will check it out tonight
thankyou, this sounds very similar to the method I was trying though, could I trouble you for a screen shot implementing this?
I did also try to use the "folder" object but with no results either, I am more than sure that I am using the correct filepath, but I imagine I am inserting or implementing it in the wrong way.
There must be a simple way to do this!
cheers again
aid
Just a picture of the patch? You out of max then?
Sure, no prob...
I found a much easier way to do it (maybe specifically for what I was doing) you go into the "options" drop menu and then open the "file preferences", there you can quickly designate a folder in a search path and even give it a name tag, I just added the tag in a message object then and the patch detected my samples straight away!
Yay
ok that's good to know.
would you show or share a patch ?
Quote: Lematt wrote on Wed, 02 July 2008 14:00
----------------------------------------------------
> ok that's good to know.
>
> would you show or share a patch ?
----------------------------------------------------
ok, I'm fairly new to max/msp so this is a really basic patch! :P it's basically a two track generative music player
as I mentioned "Samples A" is a tag designated in "File Preferences" which can be found in the "Options" drop down menu, If you are using a previous version of Max than 5 then you won't be able to designate a tagname as far as I know, however you can just copy and paste the search path and it will do the same job.
I'm not sure yet, but I suspect that if you were to compile the patch as an application and run it on a different machine then it would have trouble locating the folder (as the search path would change) I will be working on this over the next few days and post my results if anyone is interested
if anyone more experienced is looking at this and can see errors in my terminology or anything, please correct me, it would be much appreciated!
Aid
ok thanks for the .png
yeah it wouldn't work on my computer, but with the screenshot i get the idea.
it's crazy: does Max create all the message "open ... .wav preload jkjk.wav preload blahblah.wav" by itself on the loadbang ?
Quote: Lematt wrote on Wed, 02 July 2008 14:29
----------------------------------------------------
> it's crazy: does Max create all the message "open ... .wav preload jkjk.wav preload blahblah.wav" by itself on the loadbang ?
>
>
----------------------------------------------------
no I had to type all of that!! and as this project developes I will be using loads more samples, so I need to find a better way to do this, I want the random function to work by selecting the files from a designated folder, on the hard disk, without me having to specify all the filenames
oh god... it's a lot to type.
i guess it's better to use [folder] and a umenu, than a [random] choosing the files in the menu.
but then it's no longer a generative player :P
well...
i guess yes !
it's the same process than yours, but realized differently.
i'll try to patch it later.
hey, i compiled the patch as an app, transferred it to another computer and it all worked fine!! I included the sample folder in the build. I think the only error is I used samples at 96k and the app is trying to play them at 44.1
Quote: Lematt wrote on Wed, 02 July 2008 15:23
----------------------------------------------------
> oh god... it's a lot to type.
>
> i guess it's better to use [folder] and a umenu, than a [random] choosing the files in the menu.
----------------------------------------------------
oh wait, yes I see what you are saying now this could be really handy!
here's a patch i have been converting from max 4 > 5. it loads samples in a folder (drag & drop) into a coll.
hopefully, this will provide some insights...
j
i can't seem to open the .wav files in the umenu, it will detect like .rtf or .maxpat but nothing else?
take a close look at the patch i just posted, particularly the patcher "create playlist"... you will see the types message is going to the folder object, and it specifies audio files only!
j
yep I fixed that, the problem was the umenu didn't like me specifying the file type, it detected them all after that.
The problem I have now is that I can't work out how to preload/cue the samples from the umenu to work with my original patch, the max help states that the files in the menu are assigned a number related to their position in the list starting at 0, given that there must be a way to assign those numbers as cues, any tips? I've been tackling it for a couple of hours and only managed to cue list number 1, and I'm not sure how I did that :P
Aid
group all ur filenames into one list with "zl group", then pass it through "listfunnel". this will index each item in the list, then you will probably need something like "prepend preload" before sending it to sfplay...
hth,
j