Polling the current zoomfactor within a patcher

Tilman Ehrhorn's icon

Hello, this is about the ’zoomfactor’ which can be set as a message to 'thispatcher' in order to control zooming in and out also in smaller steps than "cmd = / cmd - " or "Z" would do.

I was wondering if there was a possibility to poll the exact zoomfactor as a message, as it is possible to get a 'window getsize/getflags/gettitle‘ -message from 'thispatcher' to define the current state of the zoom and use it for increment/decrrement exactly from the current value, which is at least visible as percentage numbers in the left corner of the patcher window in Max 7.

Here´s a little patch I´ve made, which ables to zoom in/out via mod wheel or pitch wheel as well as with some sliders or a number box or the arrow keys but when ever I use the common key commands (cmd 1 for reset/cmd = for increase/cmd - for decrease) temporary I wouldn´t get any value to update the number boxes of my patch, as they would increase resp. decrease from their last value rather then picking up the current vaue.

Any suggestions? Thanks in advance!

Cheers, Tilman

zoom-in_out.maxpat
Max Patch
Andrew's icon

You can find this through javascript:
this.patcher.getattr("zoomfactor")

Posting here because this is the only thread I've found with this question.

Tilman Ehrhorn's icon

Thanks -- I will give it try!