Loading a whole folder of images?

Sep 22, 2008 at 11:38pm

Loading a whole folder of images?

Hi,
can anyone figure out a nice way to load a whole folder of images to be triggered randomly using the fpic object, or any other object?
Without having to write ‘open example.jpeg’ for every command either.
Basically, I want to be able to trigger images without programming every file neame etc? This means i could trigger a random file from the folder.

thanks,
help is much appreciated!
Matt

#39961
Sep 23, 2008 at 5:57am

like this

#P window setfont “Sans Serif” 9.;
#P number 228 296 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 382 259 33 196617 clear;
#P button 347 340 15 0;
#P newex 364 136 38 196617 sel 32;
#P newex 364 103 40 196617 key;
#P newex 135 366 32 196617 print;
#P newex 183 330 68 196617 prepend read;
#P newex 330 299 27 196617 urn;
#P newex 228 258 74 196617 route populate;
#P newex 199 150 48 196617 loadbang;
#P newex 84 140 76 196617 prepend prefix;
#P message 195 175 73 196617 autopopulate 1;
#P user ubumenu 138 226 100 196617 0 1 1 0;
#X add;
#X prefix_set 0 1 0;
#P newex 84 104 76 196617 opendialog fold;
#P button 84 58 15 0;
#P window linecount 2;
#P comment 109 59 100 196617 1. first bang to choose folder;
#P comment 381 70 100 196617 2. press spae to pick next random file;
#P connect 8 0 16 0;
#P fasten 8 0 9 1 233 284 352 284;
#P connect 4 2 8 0;
#P fasten 15 0 9 0 387 290 335 290;
#P fasten 14 0 15 0 352 365 370 365 370 248 387 248;
#P connect 9 1 14 0;
#P fasten 13 0 9 0 369 232 335 232;
#P connect 12 0 13 0;
#P fasten 9 0 4 0 335 322 111 322 111 218 143 218;
#P connect 10 0 11 0;
#P connect 4 1 10 0;
#P connect 7 0 5 0;
#P fasten 6 0 4 0 89 187 143 187;
#P connect 3 0 6 0;
#P fasten 5 0 4 0 200 215 143 215;
#P connect 2 0 3 0;
#P window clipboard copycount 17;

>Hi,
>can anyone figure out a nice way to load a whole folder of images to
>be triggered randomly using the fpic object, or any other object?
>Without having to write ‘open example.jpeg’ for every command either.
>Basically, I want to be able to trigger images without programming
>every file neame etc? This means i could trigger a random file from
>the folder.
>
>thanks,
>help is much appreciated!
>Matt
>

#140981
Sep 23, 2008 at 7:07pm

#140982
Sep 24, 2008 at 2:55am

I just did this the other day for a project I am working on.
Use it as a bpatcher!!

Drag a folder right on it and it will load itself into the jit.cellblock. Click on any item and its name will be output the left outlet (just prepend read/open, or whatever you need). The length of the cellblock is output the right outlet (to be used with random or other things).

Right now it’s setup to only accept certain files (movie and some picture formats, I think). You can change this inside the patcher.

That’s pretty much it. Hope it’s helpful.

#140983
Sep 24, 2008 at 6:11pm

#140984

You must be logged in to reply to this topic.