Screen Scaling

Christopher Moore's icon

Hi, I was wondering if anyone knew an easy way of getting a patch (ideally just presentation mode) to scale based on screen size. I'm currently exploring "this patcher" but I was wondering if there is an easier way. Basically I just want it so whatever the users screensize/window size is the presentation mode and object within scale to that area?
Many Thanks
Chris :)

Roman Thilenius's icon


thispatcher
is right and probably without alternative.

there is also an object called screensize and there is jit.displays.

want size 60% but centered? edge lenghts is (screensize* 0.6) and position is ((screensize - egde length)/2)

have fun with getting the order right for the windowsize message.

Andy Maskell's icon

@Roman, do you know if one can create a full screen window WITHOUT the menu bar using the presentation mode from the main patcher? I think it's something that the development team might be looking to implement if they haven't done it already.

11OLSEN's icon

@Chris with "scale" you mean zoom?
@Andy I don't see a menu bar when I put a patcher to fullscreen.? Or do you mean the toolbars?

Christopher Moore's icon

@11OLSEN, Yeah so basically whatever screen my presentation mode is opened up on. I want the presentation mode to fit that screen size. Almost in a way that you couldn't tell it was a Max patch and it works more like an app

Roman Thilenius's icon


@andy

i probably should - but my personal interest in "presentation mode" is so low that i never checked it out.

in normal window mode all this is relatively easy - and it is far better to create your own fullscreen mode (by combining size, position, menubar and border style commands) than using the built-in fullscreen function, especially on mac, and especially when you run multiple monitors.

for example i just love to be able to get the menubar back during fullscreen using a keyboard command. and, of course, span the window across 3 screens, or leave a 100 pixels wide gap the bottom (drag´n drop from the desktop?) and such.

Source Audio's icon

presentation mode makes no difference.
it is easy to adjust widow size to anything,
but fullscreen mode is causing several troubles, trust what Roman is saying.

In addition, on Windows - running standalone without title - menu
ends up in ruined storage of dsp settings for audio driver.
That was no problem in older max versions.
Now - to run Windows standalone with nogrow , noclose and and and
forces me to completely disable quitting of app using anything but button
that unlocks window settings and "nicelly" quits App, allowing it to store current
driver selected and it's settings.
I posted few times here about it, nobody reacted.
well I don't care , as long as I have workarround.
--------
The other challenge - tame object offsets after zooming the patch,
to fit different screen sizes - I know only of js ps.window
which Pedro Santos posted in 2017 that does that well

Roman Thilenius's icon


if you only have very few GUI elements in your window, you can also just script-create them to sit in the right position independent from the current screen size. or put the whole interface into a bpatcher.

as for zooming, one might use only 3 different zooming sizes depending on te monitor size.

nothing of that is perfect though.

and look how it is made in many games or 3D engines: it is not automatic, instead the user has to / may set the size and resolution he wants to use.

Andy Maskell's icon

I'm wondering if "fullscreen" is really what I meant. I want the window to fill the screen without the menu bar visible but I want to retain the window control bar at the top with the application name, close and re-sizing controls. I've already hidden the toolbars but I wasn't sure how to hide the menu bar.

Roman Thilenius's icon


the menubar can only be turned on and off with a message to max.


but making a window with sidebars which fit perfectly onto a screen is difficult, because the sidebars have different sizes in every OS - while the OS´s feature to widen the window can´t be controlled programatically.

that´s one of the great features of max v 4.x ; you can see the object icons while in "nogrow", working in fullscreen is a real joy here. - SCNR

Andy Maskell's icon

The Max message (;max hidemenubar) doesn't appear to work on Windows.

Roman Thilenius's icon


windows has a menubar?

11OLSEN's icon

"window flags nomenu / menu" it's in the thispatcher helpfile.

11OLSEN's icon

@ Christopher Moore If you haven't found the js script already, I have a new external coming up which is kind of an extended [thispatcher]. It will be helpful with this kind of zooming tasks. I will push it out tomorrow. I want to do some more tweaks to the helpfile before.

Roman Thilenius's icon


you dont even need nomenu; the window menu in windows goes away in notitle mode anyway.

11OLSEN's icon

Yeah but @Andy wrote he wants to keep the topbar with appname, close- ,minimize-buttons..

Roman Thilenius's icon


it is interesting that menu/nomenu does something different on mac vs win, but it works and i think it looks good.


if he wants to keep the closebox, he has one little problem left and that is the vertical size, which is now not the screen height.

Andy Maskell's icon

Thanks 11Olsen, I used this in the end:

It gives me a window without the menu bar but retains the title bar with the window controls on it. It's also possible to selectively remove elements of the title bar this way.