Max 4 live autofocus acting strange (solved)

Hi!
I have added the autofocus from the devtools into one of my patches.

Every thing works fine, but when i choose autofocus on track mode, and i change tracks back and forth, when returning to the track containing my patch the monome does not update unless i press something on the monome.

For example if i have one track with my device ( it includes the autofocus) and its set to track, and i have another track with gome ( with autofocus) when i switch tracks the one with the gome updates the monome right away, but if i change to my track i need to press any button in the monome to get updated and autofocus to work properly.

Any ideas / max workarounds?

Thanks a lot

No ideas? Guess im missing something obvious.
Cheers

My guess (i don’t know autofocus) is it depends on the patch itself. Has your patch a way (like a global matrixctrl) to store all leds ?

Or simply you have to add something that observes the selected track and bangs when it changes to update the display.

Thans a lot chapelierfou!
I have been looking again into the serial osc dev tools.
There is a bang on the autofocus that resets the device.
I wonder if i could do this with some kind of live api abstarction where if the track is selected it wil send a bang to the autofocus.
Will check it out.
Thanks for your help!

That’s easily doable. I did this in a patch of mine.
First get your track’s id (device canonical parent ?). Then compare with the id of the selected track (observe this property). if it’s the same : bang !

BEAP has a module in the serialosc section for refreshing leds. its called Grid Monitor. its set up with the prefix “monome” though, so it’ll need some modification unless u want to use that as the prefix for your app.

this is the autofocus abstraction i use. it has some added bits for detecting/observing if the track’s id changes. (like if u move the device to another track or something)


----------begin_max5_patcher----------
3774.3oc6cs8iqZiF+4L+Uf3oVooyhswbYk5Ca6CceYqVoVoUqNpJhD7jwsD
HBHybNsp+uWegjvECXRfYfoy4gbXvPx20e1e1ee1+wcqL2j7YRlow+z3SFqV
8G2sZk3V7arp3uWYtO3yaiBxDOl4dRVVvNh48x1xIeNWb+LRJMHJIa6CrG+P
P9oGH4XdDIO+KGHxeESSieonI1Ss8IZ7t0ojs4xVQX2Grt2.XiD+mEf+eP3C
Vmeo3i6owruQA0.KtIMTPCIa90uAad4Ak+1hmDTb2r7uDInDSS9M9y6ti+w8
Zx7wjWX+FM38fs4zmIsxwz37NYZaeaNa5Zw+zVxxf1X4SLxiIw4YzeW7a..O
f8w.O2lhCfMvrzaDGrWx8+Kt15MPTcvHhIpV+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JWeQy5G3Nmte4xdv9TdeJVtzptQ2
W5iR9MbyRFilSRWKO3UJ+cK35MIoL+2pP+rQEJ8IUd04ualUZk2SLRxSeTgH
JwbkkVtdL3VnGeXuHYB3iArQwhcPdMkYMWhTymhx0lvKSOJ3Y34WP0UWd0fs
4LC7ZHQ59xRu7yt2c3n+b.a.gIOdF.8D.TI8YTR7tVMhq7jYOwFmtdO5Iqdn
h1X9z6OE01iOxcH39ZzX9Uxj35BZcoWiFSyoAQMs+T8TEasUkA9q7PkOkktq
b3DUvpDub0EEWBcUOB1B.LEGDwUh8uk3VqLIzMCYsY3pMfR0kd.15POvpmBn
SJEI.izjhrtBJRpBqcTrwIlZG8Z0Nx0ZdTq09QrV8iVM1u7ed2eAiiFCQ
-----------end_max5_patcher-----------

Hey @elquinto, thanks for that patch.

For some reason i could not get it to work with serialosc v1 maxpatch.

I ended up doing as @chapelierfou suggested. Sending a message when selected track was changes and comparing ids with track containing the max device.

Thanks a lot