Help with auto-refreshing umenu and random file player

Byakko's icon

I need a patch that a) autorecords and creates the sound file constantly when triggered and b) playback those files constantly and randomly.

Max Patch
Copy patch and select New From Clipboard in Max.

I've gotten part A to work, but I can't get part B to work.

The problems is that with dropfile, the umenu never updates and I don't know how to trigger or refresh a folder in umenu. Probably not through dropfile, but I don't know any better. Another is that I don't know how to update the random maximum 'number' as the number can't be fixed as the files build.

Is there a way to simply have the patch autoplay and autorandom all files within a specified folder instead of using a maximum number?

PS: My recording patch more or less works, however I had to rig in a delay bang to make the open message get triggered first before the record message. I think there must be a much more elegant way of doing this, if so, can someone please advise me?

MIB's icon

have a look at the object "filewatch", it will tell you when the contents of a folder changed. then you can rescan it and update your umenu.

pSeudomorph_sutty's icon

If anyone stumbles on this looking for a way to refresh umenus years later, here is possible solution. But I guess looking at the help files for umenu will solve this kind of question. In any case.

Max Patch
Copy patch and select New From Clipboard in Max.