Hi all,
I have a HUGE folder of images (~800 megs), and want to be able to just cycle through them one at a time with the press of a midi button.
I figured out the Folder DAT, but I don’t know python to save my life, so how would I cycle through the images using a single button press?
Basically all it needs is to +1 to the table lookup with each single button press, which loads into a Movie In.
Pretty simple but don’t know the best way to do it.
Thanks! - slv
i guess all i need is a way to figure out how to +1 to a chop with the press of a button, looking at count chop i think
You should be able to send your incoming midi into a Count CHOP. If you find the count chop is triggering too much, you could put a Logic CHOP inbetween and either set the Channel Pre Op to something like Toggle, or you can set the Convert Input to On When Value changed. Then setup a select DAT after your Folder DAT, set it to select by row index, and you can use your incrementing value to drive the index up. Then you would reference the first row in your moviein top’s file parameter, using:
op('DAT_NAME_HERE')[COLUMN_HERE,ROW_HERE].val
So in your example, if the operator was null1 if the path was the 3rd column, and your first row was the data you wanted, you would do something like:
op('null1')[3,0].val
awesome elburz, thanks! gonna see if i can’t get this working
Let me know, I can make an example later if you get stuck.
works perfectly elburz, thank you!
now my only issue that some of the images are on the big side, some 5 megs or larger, and there’s a slight freezing when loading them… i suppose there’s no way around that short of loading all the images into a cache top, or using 300 movie in’s and a switch top?
i think i’m just going to copy all the big images to their own folder then try to batch shrink them, as i don’t get any lag on the smaller images
favorite thing about touchdesigner - you can totally figure out your own ways of doing things.
simply made an animation in windows movie maker where each image was ~2-3 frames (wouldn’t let me do a single frame, and don’t really have enough time to bash my head against an ffmpeg script)
voila, ~800mb of images are now a single 17mb video (and very little quality lost, probably can’t even tell).
now i have to hit the “forward” button a couple times to get to the next image, but - no lag whatsoever.
still thanks for the help elburz, using the table to load various things was giving me lots of problems before, and now i feel like i have the method down.
cheers!
No problem. Normally if you were going to use that in performance or something, you would set up scripts to preload files before playing them, but if you dont know Python, then 1 step at a time!