A newbie here. This is my first post to the forum so bare with me.
I am working on a very simple patch that randomly plays audio files by using lots of "open" message boxes connected to a SFlay~ object. This is impractical as I intend to use hundreds of files.
What I want to do is create a path to a folder containing all the files which i can add to.
I have looked at "ubumenu", assigning it a folder (prefix) in the info box and using autopopulate. But I am not sure how to filter out everything apart from the aiff’s. i cannot get the types message to work.
Also I am not sure how to implement a random select function on "ubumenu".
I have also been told to look at Sprintf but not entirely sure what it does and whether it would be useful in this context.
Any advice would be invaluable
here you go, this might help you out. you basically need to tell the folder objects which types of data to consider( text, movies, sound files etc… )
good luck and welcome.
copy and paste this text in a new patcher window :
#P window setfont "Sans Serif" 9.;
#P user ubumenu 67 209 100 196617 0 1 1 0;
#X prefix_set 0 0
#P button 67 56 15 0;
#P window linecount 1;
#P newex 67 104 40 196617 t b s s;
#P newex 67 74 84 196617 opendialog folder;
#P message 67 145 141 196617 types TEXT , types AIFF , bang;
#P newex 67 186 35 196617 folder;
#P connect 0 0 5 0;
#P hidden connect 1 0 0 0;
#P hidden connect 3 1 0 0;
#P hidden connect 3 0 1 0;
#P hidden connect 2 0 3 0;
#P connect 4 0 2 0;
#P window clipboard copycount 6;
Check out the following objects:
sflist~ (as it relates to various sfplay~ objects)
dropfile, or one of the folder objects
sprintf can help you with filepath names and automatically adding
commands to the top of them. Mayhaps, "preload"?
It’s fun once you get it.
Put this in the "filtered types" area in the "cmd-i info" of [ubumenu]
For random selection, use [random]. Use right outlet of sfplay~ to trigger
a random number from [random].
Hi Patrice, Karl and C
Thanks so much for all your help. I am going to look at Sprintf in depth and also the Folder objects which are really useful.
I eventually found this patch on the list by Manuel Poletti which does exactly what I want to do. (i don’t think i was that clear in my question)
http://www.cycling74.com/forums/index.php?t=msg&goto=320 53&rid=3903&S=caa61f3f1b3e4a8e5f5f3b60517def53&s rch=random+sample+play#msg_32053
Again thankyou for your quick responses and support.
In the future I will search a little more deeply before i ask questions.
Forums > MaxMSP