Need timing/logic help for slideshow patch

laserpilot's picture

I have been wrestling with this problem for what feels like days and it seems like it must be simpler than it appears.

I am working on a patch that just takes photos from a folder and transitions between every photo in the folder automatically, just like a slideshow patch. I've got that part down with some interpolation and things, but it's a little too automated.

One issue is that I can't have it pause on one photo, it just keeps rolling through the composition. Ideally the process should go like this:

Receive an "advance" bang/click/message Photo transitions to next one with specified timing Photo sits there until next "advance" message

I can stop it from transitioning with the stop watch object and an external timebase on the interpolation, but I end up hitting it right in the middle of a transition and can't reliably stop it when a full photo is up. I've tried various javascript statements to catch it at the right spot, but interpolation seems to zip past the range I'm trying to catch it in so none of my logic appears to work correctly.

The attached patch demonstrates how everything is right now: 1. Receives a bang 2. Starts the first stop watch 3. Transition interpolation runs from 0.-1. 4. Precisely when the transition reaches 1, start the interpolation meant for pausing on the full photo and stop the other stop watch 5. Pause for 3 seconds 6. Repeat

Any ideas? I think somewhere in step 4 is where I'm getting screwed up..anyone else have a slideshow patch around?

PreviewAttachmentSize
Image downloader CLEANUP.qtz20.59 KB

laserpilot's picture
Re: Need timing/logic help for slideshow patch

custom interpolation curve is saving me for now although not the classiest option..would still love to figure out a good logical way to do this..i'm too much of a max/msp/jitter guy to get by without my bangs and metros, haha

gtoledo3's picture
Re: Need timing/logic help for slideshow patch

Try this out.

If you click on your primary mouse button/trackpad, pictures will progress per click. If you press spacebar, the pictures will progress, timed by the lfo.

You can turn the instructions and filepath stuff off/on, etc. This should get you started. Look inside the file cycler macro, and check out the pulse/counter stuff, which is sort of like the bang stuff you were looking for. Also, checkout the virtual watcher, signal, the previously mentioned pulse for those kind of functions.

PreviewAttachmentSize
Picture Browser_gt.qtz11.03 KB

laserpilot's picture
Re: Need timing/logic help for slideshow patch

thanks...I initially had something with a counter going but it wasn't always reliable..maybe I'll try your version and see if I can time the pulse to change the photo and n+1 photo and run the interpolation transitioning between the two

Ripple and swipe transitions have a funny behavior where their full transition (reached at time 1) is actually incomplete which makes sense when it loops but it messes me up if I try an custom interpolation curve because it sits at that incomplete transition

gtoledo3's picture
Re: Need timing/logic help for slideshow patch

I didn't actually look at your original composition yet...

Do you have that interpolate that runs the transitions in no repeat mode? It sounds like it might be in mirror loop.

laserpilot's picture
Re: Need timing/logic help for slideshow patch

Just had to come here to say the obligatory eureka!

I got it..there are still some small kinks to be worked out, but through some javascript and some pulse objects and other things I got it to work the way I have been imagining. Whew..that feels good.

Attached is the one I think works..it doesnt work very well with the desktop pictures because I am doing a resize only if the image is bigger than the screen so it sort of jumps between images..but it doesnt do that with my photos.

The original use for this is to receive images wirelessly through one of those nifty Eye-fi wifi capture cards and display them at a venue's screens in real time (ie take a picture see it on the screen a couple minutes later).

One issue I'm now sort of stuck on is how I could display portrait images instead of being limited to landscape. Should I just do clever image resizing or is there something simpler?

I also want it to only cycle through the 20 or 30 latest images because it can get a little long when there are 100-200 photos loading into the folder, but I'm hoping I can figure that out quickly.

Also, when I ran the old version of this patch it would eventually slow my computer to a crawl..would that just be a consequence of loading a ton of photos into ram over a few hours?

edit: to advance photos: hit the right arrow key

PreviewAttachmentSize
Image downloader CLEANUP2.qtz21.81 KB

laserpilot's picture
Re: Need timing/logic help for slideshow patch

double post deleted

laserpilot's picture
Re: Need timing/logic help for slideshow patch

Ack..well I thought i had it..now it's doing a pause at the end of my transitions so it's not really working quite right...my image sizes might be too big to load into ram that quickly though

Had a quick question...I saw the signal object in a composition as I was playing around with yesterday but I've lost track of which one I was looking at, and signal doesnt show up in my normal library...it would be super helpful right now, but I'm not sure where it's hiding...

EDIT: ah..after a few more minutes of googling (signal is a terrible search term in the forums, haha) i see that it's a private patch..i forgot about those from the early days

cybero's picture
Re: Need timing/logic help for slideshow patch

Private Patches can be shown by going to the Application menu, holding down Alt whilst selecting the Preferences option. This opens up a world of goodies to be used with caution ;-), including, under the System tab , QCShowPrivatePatches, QCShowPrivatePatchSettings & QCPrivatelBPalette.

See screen grabs for pictures do speak a thousand words.

then under the Editor tab enable report PrivatePatches & reportPrivateProtocols.

Flag all those and you are pretty well good to go

PreviewAttachmentSize
PrivatePatches.png
PrivatePatches.png74.33 KB
PrivatePatchestwo.png
PrivatePatchestwo.png67.95 KB

franz's picture
Re: Need timing/logic help for slideshow patch

don't enable QCPrivateIBPalette, it is buggy (it only adds non-working setting pane for QCviews in IB)

cybero's picture
Re: Need timing/logic help for slideshow patch

Non essential then, unless creating an interface for iOS. Would it be essential even then, what about syncing resources, is it essential then, if ever?

Just double checked on this. The pratfall on this was, I believe, the following

Quote:

When I open my application's XIB file in interface builder It raises an exception from the QCView:

Interface Builder[2400] [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key allowsFileCreation.

However, I tried to reproduce that problem, which was first posted about to my knowledge in about 2007, and I think I've failed to do so, see attached ....

Does this mean that the reason for not flagging that preference has now gone?

BTW - just realised, I'd screen grabbed the NSView version, but QC view does allow for entering of parameters .

PreviewAttachmentSize
IBQCViewHalfSize.png
IBQCViewHalfSize.png96.77 KB
IBQCView.png
IBQCView.png184.32 KB

franz's picture
Re: Need timing/logic help for slideshow patch

mmmm, so maybe the problem has been addressed since. I'll double check on 10.6.4

cybero's picture
Re: Need timing/logic help for slideshow patch

I think, if I remember correctly, this was an issue between versions 2 and 3 of QC, though I might have that versioning split wrong. Key questionis not only does the QC View list and open up settings panels like other Views and such , but does it pass that config on to the application built?. I'm going to take a closer look at that too.

laserpilot's picture
Re: Need timing/logic help for slideshow patch

I actually ended up scrapping my original idea and ended up making something that looks a little cooler than some of the transitions. This slideshow patch is going in 3d space anyway, so it's best to have some transitions that go 3d!

Using some truly terrible javascript programming (I tried to use arrays! really i did! but I think I wasn't calling them correctly...) and some really messy patching I made a slideshow that shows the 3 last pictures and 'tosses' them on top like a deck of cards. I used the spring behavior with inertia to add more natural motion..rarely do I get to the end of a composition that I feel proud of..despite how ugly it looks inside, haha

PreviewAttachmentSize
Toss Image.qtz43.95 KB

gtoledo3's picture
Re: Need timing/logic help for slideshow patch

Hey, that's really cool.

Check it more... every so often a blank sprite gets tossed in. I didn't really look at what was going on in your patch code wise at all, but it's probably a small fix.

laserpilot's picture
Re: Need timing/logic help for slideshow patch

Thanks! I imagine it's due to improper looping..i think the index count goes higher than the structure count at some point and I should be using the blocking director scanner and just double checking the math on the counter