Execution order with [js] mixed up / depending on if manual or metro bang
----------begin_max5_patcher---------- 607.3ocyVF1axBCDG+0rj8c3BuZKwGGETP7IYI6ywCKKUnh0.WIPw4lYe2ef h3Pm5Pcp6ElKd8n89+q8t1E2dil9HwbVlNLD9GnosnvilxWoGsZGZ5wz49Qz LUf59h3XFJ06rbPIatTMvCO.SoynY9o7DILlGwF5gd33bzWxEHDmE9BGk2M6 dObgGJxkQL4cFcfY2+WO7COb0TFwQluHGUyqcs2wBThzXlZwdJkSiV8AXdb0 zoRQiZ27.UrhQS+isdyoIi+tZZHlcWEbBU5Ogigujx7kUHgzypXbf3ZqL8MJ MCb6Z.O2Xk4X8BSTN+31aJsElNmNTGQwP3UtbBDyjoB3QnPnI4Rn3KXYk+AD iAQZ.KcH.l.Y6Pz7GAh8OFH5NPQsAMPnUuKNBioXNMJ5sMAHGWAOBXdNgWui AdNkCClVma3grWKxwuxtjTdCjdR525XzeO0wFKhasxKfgwET+uGAgoh7jFGM ZMDL2BD9bZpBT9VBqRo55cJ98ovNXHY5nL1VeCjLOZHMJWJE3NTKYap0Y2xs rprgb2srrq0yEdqWtV2zSaWu+t4fp9pxbBa9DWmqTExzLHPHmvy5NM6vo0VO 0ruhjihQKqILUcQrct3Lp5pahggwODgLZcc0gbWS0sLlpqbbHms1HRQXXD6. jKwc+kO6sKRkppdDxA2EoJL0qA17UxpkpbfMjZlHO0uN6V1xGZrdArLIGoku HtQPVqGzDdP.CW6lzXdPhnPsKyC34cy+1mZsJ2LuJ4V4ldKxMiqC3LZUx0+5 jb8+8tqV9hfe2fi7sI2oStRGEl+CCSJdU. -----------end_max5_patcher-----------
This is probably relevant:
Controlling a Function’s Thread of Execution
…most notably the line that reads,
This sounds like it should be the solution!
msg_int.immediate = 1;
Seems to behave differently on Windows and OSX.
According to different posts on this forum.
The immediate method is deprecated in Max6.
Calls to it in JS code will be ignored. Sorry about the confusion, we’ll tidy up the docs.
It shouldn’t crash either, we’ll have a look.
Still on Max 5.1.4 (on Windows 7).
Yes, unfortunately you may be looking at one of the reasons why we deprecated it.
JS in Max5 had a multi threaded implementation which had problems, and when we upgraded JS for Max6 it was deemed more trouble than it was worth.JS in Max 6 is single threaded.
Your patch behaves exactly as it should, both with Overdrive on and off. JS always executes in the low priority thread. Ui interactions also always occur in the low priority thread, which is why you see a difference between the button press and the metro with Overdrive on.
Forums > MaxMSP