umenu not populating when using opendialog fold
Hi everyone,
I’m trying to build a simple patch in Max 8.2 (macOS Mojave) that lets me select a folder and
automatically list only audio files (wav, aif, mp3, flac, etc.) inside a [umenu].
From there I want to load the chosen file into [buffer~] and play it with [groove~].
the base idea is:
1) select a folder
2) automatically list only audio files
3) load the selected one into a buffer for groove~ playback
The folder object lists everything (txt, images, etc.), and filtering with regex or route gets messy.
I’m currently testing with a small JS filter that checks extensions, but I’m not sure if this is the cleanest or most idiomatic way to do it in Max.
I attach the patch that I would like to modify
Any patch examples or cleaner approaches are super welcome.
Thanks a lot
you could simplify this and either use folder or umenu to list audio files.
Why both ?
You need to set proper file types in both cases.
A bit missleading is file types list im cycling docs
it says "four letter" but lists for example mp3 files as Mp3

which of course does not work and gives you a headache.
if file type has only 3 chars add a space at the end and
enclose it with doublequotas : "Mp3 "
that works.
You can also define own file types if cycling does not include them by default
by messages like

or directly edit max-fileformats.txt
Thanks for the suggestion! I tried your solution but unfortunately it's still not working.The main issue I'm experiencing is that the folder]object doesn't trigger correctly despite receiving both the path and the bang. Even following the approach you suggest (using folder or umenu with file types, when I select a folder the menu remains empty.
I've verified that:
The path is correctly received from [opendialog fold]
The [folder] object receives both the message with the path and the bang
The JavaScript filter works correctly when tested standalone
However, folder doesn't emit any output from its left outlet. I suspect there might be an issue with:
The message syntax sent to folder, perhaps it requires a specific format that varies between Max versions
The timing between sending the path and the trigger bang
Compatibility with Max 8.2 on macOS Mojave. possible different behavior compared to more recent versions?
Regarding file types, you're right that they can be defined, but my problem is upstream: [folder] simply doesn't list any files at all, so the filtering never gets applied.
Do you happen to have a working patch you could share, or suggestions on how to debug folder's output to understand what it is or isn't) emitting?
thanks
this is umenu example

What do you want to get from folder object ?
Hi, and sorry for the late reply. Strangely, I only receive email notifications for forum responses.
I’ll try it right after work, but to answer your question: I would like to obtain only audio material after the scan and therefore populate just one file in WAV or AIFF format (which should also include WAV and MP3).
thanks
as patch ...
add more types if you need
I really don't know how to thank you for your availability. I study it before anything. Thank you so much.
I still don’t really know who you are, but I do know that every time I’ve had a complex problem, you’ve been the one to solve it. So I just wanted to thank you. I also studied the patch carefully, and I find the depth-2 solution incredibly elegant. T
and sorry I'm still new if some questions may seem obvious
hanks again