Forums > MaxMSP

Setting Scheduler Preferences

September 16, 2008 | 3:42 am

A note about my system, to start off: OSX 10.5.4, max 5.0.3, 8-core mac pro.

How does sending a message to max (such as ‘setpollinterval’) work in a built application? Would the message box still say "; max setpollinterval 50"? Or would it be "; name_of_app setpollinterval 50"? Does this get saved to the built application’s preference file automatically, or is it necessary to somehow explicitly write it to the preference file?


September 16, 2008 | 9:38 am

Quote: MuShoo wrote on Tue, 16 September 2008 05:42
—————————————————-
> A note about my system, to start off: OSX 10.5.4, max 5.0.3, 8-core mac pro.
>
> How does sending a message to max (such as ‘setpollinterval’) work in a built application? Would the message box still say "; max setpollinterval 50"? Or would it be "; name_of_app setpollinterval 50"? Does this get saved to the built application’s preference file automatically, or is it necessary to somehow explicitly write it to the preference file?
—————————————————-

; max setpollinterval.

‘max’ is simply a reserved message target; it’s not the name of the application. If it were the latter, you would have to send messages to ‘MaxMSP’, wouldn’t you?

Typically you trigger the message in an app by a loadbang. If you want the parameter to be user-configurable, you’ll have to manage your own prefs yourself.


July 8, 2012 | 6:18 am

I’m writing a patch that needs to be run on five separate computers – it would be really handy if there was a fast way to adjust scheduler preferences in Max 6.

It would be super useful to be able to always know that certain settings are always being loaded – no matter what machine a patch is being run from

Andy Schmeder posted a patcher (written for Max 5) on the CNMAT site that "automatically sets the preferences everytime the patch loads, which is good in case somebody changed them…".

http://cnmat.berkeley.edu/user/jeff_lubow/blog/2011/11/08/scheduler_settings_suggestions_maxmsp#comments

Can someone at Cycling74 confirm if there is a way to do this in Max 6 – and if so – what messages we need tosend to do this.
I’ve tested Andy’s patch in Max 6 – and the only setting I can change is turning Overdrive on/off.

Failing that – is there a specific file in the Cycling ’74 folder that contains this information that I could simply copy to other machines?

I’d like to set all of the other Scheduler prefs:

Enable Refresh
Event Interval (ms)
Poll Throttle
Queue Throttle
Redraw Queue Throttle
Refresh Rate (ms)
Scheduler Interval (ms)
Scheduler Slop (ms)

Here’s Andy’s patch –

– Pasted Max Patch, click to expand. –

July 8, 2012 | 6:42 am

From the Max 4.5 online documentation:

http://cycling74.com/2004/09/09/event-priority-in-max-scheduler-vs-queue/

This doens’t appear to be a file like this in the Max 6 folders – is that because it is no longer supported?

"As of MaxMSP 4.5, there is an Extras menu item patch titled "PerformanceOptions". This patch demonstrates how to set a variety of settings related to how the high priority scheduler and low priority queue behave–both the interval at which the scheduler and the queue are serviced as well as the number of events executed per servicing (aka throttle).

… while these values are not stored in the preferences folder, you can make a text file that is formatted to send these messages to Max and place in your C74:/init/ folder if you want to set these values to something other than the default each time you launch Max. An example which would set the default values would contain the following:

max setslop 25; max setsleep 2; max setpollthrottle 20; max setqueuethrottle 10; max seteventinterval 2; max refreshrate 30; max enablerefresh 1;

For more information on the various settings exposed by this patch please read the descriptions contained in the Performance Options patcher."

Cheers
G


July 19, 2012 | 11:56 am

OK I’ve done another test – with a patch that included all the scheduler prefs as messages – to see if there is a difference between Max 5 and 6.

here’s what I discovered:

REFRESH RATE
In Max 5 documentation it states:
The rate at which refresh is done can be set by using the setrefreshrate message.

If you send this message in Max 6 you get this error report in the max window:
max: doesn’t understand "setrefreshrate"

Question: how do you set this in Max 6?

REDRAW QUEUE THROTTLE
You need to use the message setsysqelemthrottle – to set Redraw Queue Throttle
not setredrawqueuethrottle – as you might expect!

SETSLEEP
"The word setsleep, followed by a number, sets the time between calls to get the next system event, in 60ths of a second. The default value is 2."
Question: does the relate/equate to any of the variables described in Max 6 Sceduler Prefs?
The word setsleep, followed by a number, sets the time between calls to get the next system event, in 60ths of a second. The default value is 2.


Viewing 5 posts - 1 through 5 (of 5 total)