loading a umenu properly

I’ve been having an issue as of late while working on a remixer patch that involves loading midi files. My goal is to load a [umenu] object with a group of midi files and then plug the [umenu] into a [seq] object. I’ve gotten to the point where i can use a [read $1] message but it makes me load the files manually. I’ve also tried to configure a drop file section using a [folder] and [filepath] objects but it will not load the midi files within the folder, it only will load up .maxpat and. rtf into the umenu. I did try to [loadmess] the file type into the [folder] object. Again, my goal is to load a umenu with midi files within a folder where my patch is and to be able to load the .mid into a [seq] object. Hopefully someone can help me! I know its probably so simple that i’m overlooking it. I’m sick of typing them all into the umenu myself then they won’t save. Please help!

Sorry for the delay but i will fiddle those with that idea today involving the folder object. Don’t you hate it when your brain hits the wall like this? Also i tried to copy the patch, save then open the text but it was opening as text even after trying many times and on two different computers. I’ll try on a third computer today if i can get to it but maybe its me. If you could repost the patch that would be great and thank you so much for reading and caring about my problem :)

Attachments:

Good news is that it works! I got it to load the umenu but the bad news is it will only play 1 .mid file out of the list for every option I choose. So half of it is complete but i’m just baffled as to why that is happening, have any ideas? Thanks again for the help by the way :)

hey good stuff with the [zl] and [atoi]. But the [umenu] file types can be set directly. I don’t think you need to change the types in [folder], just put in "Midi" (no quotes) in the File Types line of [umenu] Inspector, see example below. This one has the default folder depth of 0, so if you have subfolders, you need to change that so it’ll see them.

For all the file type codes look to the Max app folder: Cycling ’74–>Max 5.0–>Init–>max-fileformats.txt. Not all of them are the same as the extension, for example .mov becomes MooV.

– Pasted Max Patch, click to expand. –

Copy all of the following text. Then, in Max, select New From Clipboard.