jit.gl.syphonclient: adapt frame-rate to syphon stream?
I've noticed that the output of jit.gl.syphonclient updates whenever it receives a bang, regardless of whether the incoming stream has a new frame. I don't see something like a "@unique 1" attribute so is there a way to adapt the fps to the incoming stream?
(I made a related post about implementing jit.change in opengl, which would be another solution: https://cycling74.com/forums/jit-change-in-opengl-only-pass-unique-textures)
Just bumping this because:
It's been a few months
I got no response when I raised an issue on the Syphon github
The Syphon forums are down: http://v002.info/forums/forum/syphon/
This seems like an important missing feature, and it's available in the Syphon framework itself. From the comments of SyphonClient.h :
SyphonClient allows for lazy drawing by the use of a new-frame-handler. Using a handler you can perform drawing without using a timer or polling, achieving frame-accuracy with the minimum of overhead. Alternatively, if your application uses a traditional display link or timer, you can use the hasNewFrame property to make decisions about work you may need to do.
i think the best place to stash this request is by filing an issue on my fork of jitter-syphon, which is the version used in the Max Package Manger - https://github.com/robtherich/Jitter/issues
Thanks Rob. Issue filed. @unique 1 would make my Syphon life so much easier!
Bumping this again, 5 years later. (No progress on the issue I filed in Rob's jitter syphon repo) I must be missing something, but it seems important that a Syphon client can output unique frames in sync with the server (rather than just spitting out the most recent frame whenever banged. I don't see another way to efficiently drive a GPU rendering chain based on the received frames.
it's a reasonable request, just not something others seem to need. I'll try and find some time to see if it's feasible. I'm curious to know more about your setup if you're willing to share.
Many thanks for considering. (I know there are a lot of things on your plate!)
I'm trying to increase the performance of a MAX-based system that captures frames from an HDMI source, analyzes them, and stores certain frames to disk. (It's for a DIY 16mm film transfer system, outdated documentation here.) I'm trying to separate the capture/analysis from the saving/UI by splitting them into 2 different MAX instances, connected via Syphon.
The capture/analysis half is a Syphon server that sends Syphon frames occasionally (currently 3 - 10 fps but will be variable). The Syphon client needs to know when these frames arrive so it can save each one, do slab processing, etc. (I've tried sending a full-speed 30p Syphon stream and using a network connection as a side-channel to tell the client which frame to save, but I can't get dependable sync.)
Currently, every bang to the Jitter Syphon client produces a frame, so I have no way of knowing if it's unique (or even to know the FPS of the server at all). Hence the desire for a "unique" attribute.
This fits into a broader use-case for anybody who wants frame-based timing. Example: In my video-processing patches I usually send one GPU render bang for each incoming frame (from grab, movie, etc) so the whole chain is rendering at source FPS. Currently the Jitter Syphon client breaks this logic because the client side must run at an arbitrary rate. Sync is especially important if you might be running non-realtime and/or recording back to a file at the end of the chain.
Whew, long one. Thanks for reading!