Getting path of a file (Not Dropfile)

Jun 24, 2009 at 3:49pm

Getting path of a file (Not Dropfile)

In a umenu I have a bunch of mp3′s listed (along with their file path) so that when I select them they play. For every mp3 selected/played I want the filepath of that .mp3. The only maxobject I have seen that can determine the filepath of a file is dropfile, but I am not dropping files, and dropfile does not accept any input. Any ideas?

#44527
Jun 24, 2009 at 4:13pm

I think a simple example of what you are doing would help, as there’s a million ways of doing this.
However, off the top of my head, you may want to look at “regexp”

– Pasted Max Patch, click to expand. –
#160132
Jun 24, 2009 at 4:17pm

That works nicely, thanks! I have never understood regexp and I hate it with a passion Sad

#160133
Jun 24, 2009 at 4:27pm

There’s a running regexp tutorial on this list. Also, the MMJ depot at cnmat has a regexp tutorial/example patch.
Download:
http://cnmat.berkeley.edu/files/maxdl/ALL/CNMAT-Everything-OSX-MachO.tar.gz
unzip and go to:
/CNMAT-Everything-OSX-MachO/CNMAT_MMJ-Depot/tutors/object-tutors/about_regexp.maxpat

Regexp may be confusing, but it is your friend.

#160134

You must be logged in to reply to this topic.