Forums > MaxMSP

[metro] not doing the same thing as pressing button at the same speed

October 28, 2011 | 10:32 pm

I’m just playing around with filling matrices and something strange is happening. When I turn on a [metro] to re-fill the matrix at regular intervals it stops working. But if I click on a button (the red one in the patch copied below) to do the same thing it works fine. I’ve slowed the [metro] way down, tried a [qmetro]… nothing works. What am I doing wrong?

I just slowed the metro down to 1000 and let it run for a bit. Every 6 or 8 bangs, it changes what’s showing in the pwindow and it seems totally random. When I manually click the button it works every time.
(Max5, OSX 10.6.8, Mac Pro)

– Pasted Max Patch, click to expand. –

October 28, 2011 | 11:18 pm

maybe add a deferlow?

– Pasted Max Patch, click to expand. –

October 29, 2011 | 1:02 am

Thanks, Chris. That helps a little bit, but it still only works every 2 or 3 bangs, even with the metro at 1000ms. I can click as fast as I want on the button and it changes with every button click. I don’t get why bangs coming from the metro and through the button would be any different than button clicks. ??


October 29, 2011 | 1:22 am

It’s something to do with not liking the high priority thread, but Chris got his deferlow in the wrong place, so the left hand side was being deferred, but not the right. Probably the right hand subpatch was therefore crunching several times before the left hand bang were processed, In this case anyway, I think you also only want defer. The below works for me:

– Pasted Max Patch, click to expand. –

October 29, 2011 | 11:57 am

I’ve noticed that similar problems happen quite often, in particular also with M4L.
It would be nice to have some warning/error message in such cases.


October 30, 2011 | 12:16 am

Thanks, Alex. Like Chris’s, that helps a little, but doesn’t solve the problem. It still only changes the image in the pwindow every 2 or 3 bangs. It’s not like I’m on a wimpy machine (8-core, 14GB RAM) that can’t handle a 100×100 matrix. I’m confused.


October 30, 2011 | 1:25 am

Hmm, it looks like jit.qball solves the problem. I still don’t understand what’s causing the problem, but jit.qball does the trick.

– Pasted Max Patch, click to expand. –

October 30, 2011 | 2:16 am

All of these approaches have one thing in common: moving timer-based events to a lower priority thread.


October 30, 2011 | 3:07 am

Actually my solution works if overdrive is on (at least on my computer). It does not work if overdrive is off, but jit.qball works either way. The difference is that this will (in default mode) not queue backlogged messages of the same type, but replace them. I still don’t understand quite why this seemingly simple example works this way, but apparently it does…


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