automate selection of media from library on hardrive

joshualeeginsburg's icon

hi -

How do i randomly automate the opening/reading of data (images, video, music) from a file on my hardrive?

i.e i have a movie object and on command, the read function will look to a file on my hardrive with many video's in it, and on account of some random number select a video and open it.

thanks,

josh

jan.jdo's icon

Something like this will let you select a random file from a folder:

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

jan.

MIB's icon

here is another way of doing it, based on the same idea. but here you can see the data and choose it manually or randomly (if you hook up your random number generator to a [send selCell] object or the right inlet of the bpatcher).

happy patching

joshualeeginsburg's icon

thank you both. gonna try the methods this evening and see how it goes.

josh

joshualeeginsburg's icon

hi martin -

thank you for your patches - really appreciate it.

ive been trying to get the patch to work with video but even when i add msg's with mp4 or mov or even jpeg it doesnt let files into the bpathcer. any ideas?

thanks,

josh

Jean-Francois Charles's icon

Open the umenu inspector, Files tab, look at "File types". For the moment, umenu is filtering, and accepting only .mov files. Erase to accept all files in a folder, regardless of type.
J-F.

joshualeeginsburg's icon

sorted.

huge thanks to everyone.

josh.