jit.phys.world when it is not connected to jit.gl.render

t's icon

I would like to trigger audio events as accurately as possible with physics objects so I decided to bang jit.phys.world with separate metro. I need the time step of physics engine to be as constant as possible with high timing resolution. As you can see from the patch I have:

Qmetro: "@interval 60 hz" ---> jit.gl.render
Metro: "@interval 180 hz" ---> jit.phys.world

And here are my questions:

1. Does maxsubsteps attribute (jit.phys.world) have any meaning in such configuration? Should I just keep it at 1?
2. Does automatic attribute (jit.phys.world) have any meaning in such configuration?
3. Fixedtimestep attribute (jit.phys.world) should be the same as metro interval (hz)?
4. Is there any limit for fixedtimestep and hence metro interval?
5. I should use metro instead of qmetro for banging jit.phys.world right?
6. Is this a good way to do what I want?
7. Any other things that need to be taken into consideration when jit.phys.world is not connected to jit.gl.render?

Max Patch
Copy patch and select New From Clipboard in Max.

Muchos gracias!!!

Rob Ramirez's icon

1. Does maxsubsteps attribute (jit.phys.world) have any meaning in such configuration? Should I just keep it at 1?

if you're able to match your update rate exactly to the fixedtimestep rate, then you can leave at 1, however setting to 2 or 5 or 1000 will not affect the patch. it's simply a limit on the number of sub-steps the physics engine is allowed to take between each update.

2. Does automatic attribute (jit.phys.world) have any meaning in such configuration?

it should be off, as in your patch, to remove the phys.world from the list of animators needing automatic updates.

3. Fixedtimestep attribute (jit.phys.world) should be the same as metro interval (hz)?

yes

4. Is there any limit for fixedtimestep and hence metro interval?

it's scheduler dependent, defaults to 2ms.

5. I should use metro instead of qmetro for banging jit.phys.world right?

i wouldn't recommend it, but if it works for you then great.

6. Is this a good way to do what I want?
7. Any other things that need to be taken into consideration when jit.phys.world is not connected to jit.gl.render?

seems like a reasonable approach, but you're in unexplored (by me) territory, so can't really offer much advice.