OF to Syphon to Max

Julien Bayle's icon

Hi there,

beside making music with capacitive mushrooms driving karplus strong within a pi's RNBO export, I'm now focusing on a new feature for my late developments for a new a+v live performance.

Using OpenFrameworks for generative & procedural visuals is a strong way I already work with for many projects. I'm talking about agents drawing on the screens, different rules & contexts etc.

I built a small but efficient system for having different context, using OSC from Max for control purposes etc. Very cool.

Textures traveling through Syphon. Solid... on the paper side.

Actually, I cannot have a constant fps on Jitter's side and the classic (but sometimes too much theoretical) moving element from left to right is PERFECTLY drawn on OF side BUT on Jitter side... some subtle but visible stutter effect. I mean... the circle travel sometimes jitter a very bit at slow speed.

Most noticeable at 1080p than 720p and yes that could be performances problem too (M1 Max 64Gb) but OF side is really showing a ... PERFECT movement. Even with A LOT of circles etc.

Max 9.0.7, M1 Max 64Gb

Overdrive + Scheduler in Audio Interrupt enabled (tried also to disable them)

max side. Trying to force 60fps, but no way.

Small monitor of OF Side, Clear & clean 60fps

I'm wring through FBO on OF. Very conventional.

The subtle stutter probably comes from Max/Jitter pulling Syphon textures asynchronously within its UI scheduler, while openFrameworks pushes frames at its own perfectly stable GPU clock.
This pull-based texture retrieval lacks frame-perfect sync, causing micro jitter even at high FPS.
It is a structural limitation of Syphon client-side rendering in Max, not a performance bottleneck.

My question: should I expect a better quality rendering with any stutter or that way, if some tested it, always involves this kind of things ?
Shouldn't I instanciate syphon things on Max side on a different way ?

Let me know if you want variants for your forum posts or internal notes.

Any ideas, words, discussions around it would be very cool :-)

Rob Ramirez's icon

One thing I notice is that you are saying OF is sending at 60 FPS, but it looks like your jit.world is outputting 120 FPS. You may want to set @displaylink 0 so that you can lock your FPS at some rate that is not display refresh driven, which may help eliminate stutters. If you have displaylink enabled then the fps attribute is ignored.

other than that, the standard answers about eliminating stutters in jitter apply, which is to ensure no GUI elements are updating in your patch. If you need GUI elements you can run 2 instances of Max and send control data from the GUI instance to the render instance over OSC.