Reply To: load pattrstorage preset at low priority, or other strategies?

Forums > MaxMSP > load pattrstorage preset at low priority, or other strategies?

May 23 2013 | 5:38 am

Here’s a test patch lifted out of a bigger project. Please forgive the idiosyncrasies.

_pattrstorage test 2.maxpat is the main patch to open, the rest are abstractions/presets.

rota_fx.maxpat (in a bpatcher) is the one holding the shader fx, GUI controls and pattrstorage. It’s messy but the gist is that each flonum is linked to a patr.maxpat. Inside is a pattr with the speedlim construction we discussed above.

In patr.maxpat I’ve added a pipe before speedlim because I realized that without it the first recalled value will output for all of the pattr’s at the same time. The speedlim only kicks in after that.

There are 3 parameters to the patr construction:
update_rate : the base speedlim rate
rate_spread : the random variation to the base rate
pipe_spread : random variation to the initial delay

The blue slider will fade between preset 48 and 47. The messages to line do it automatically.

Hit the red toggle to start. When running without any fading I get 70fps constant. When fading fps drops down to between 20 and 50, depending on the update settings. The more flonum’s update at the same time the lower it drops. I haven’t found settings that keep it close to 70fps yet. (And in the actual project I have 25 more flonum’s pattr’d)

It’s possible to set it so the GUI only updates after some seconds. It’s then visible that the fps remains steady at 70fps until the GUI updating kicks in. That makes it clear that it’s not the jitter processing causing the lag but really the GUI objects.

The slowdown effect is also visible when making a hard preset change (by clicking in the preset object or changing the purple number box).

Any optimizations are very welcome! Actually I hope there’s just a toggle to enable somewhere that makes all of this totally obsolete…

Subscribe to the Cycling ’74 Weekly Newsletter

Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.

* indicates required