jit.phys.multiple posoutname possible bug

pry's icon

Hi All,

I expected the posoutname attribute of jit.phys.multiple to be equivalent to out_name attribute of common jitter objects, but it's not. Have I misunderstood or is it a bug ?

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

Pry
----------------------------------------------------------
Max 7.0 - Windows 7 - Intel core i5 - AMD Radeon HD 6800
----------------------------------------------------------

Rob Ramirez's icon
Max Patch
Copy patch and select New From Clipboard in Max.

this behavior is not supported by jit.phys.multiple. if you need to use named matrices, simply do the following:

pry's icon

Hi Rob,

Thanks for your reply. What I'm actually trying to achieve (unsuccessfully) is port this patch in Javascript. As I'm not very fluent in Javascript I complicated things instead of using correctly posoutname property of jit.phys.multiple. If you have any suggestions or examples of using jit.phys.multiple with Javascript, I'd appreciate...

Pry

Rob Ramirez's icon

here's a basic example of using phys.multiple from javascript. you are somewhat limited with both phys.multiple and gl.multiple in that it's impossible to change the number of input matrices when instantiating from javascript, it's has to stay at the default of 2. this is something that will be remedied in a future update.

hopefully this example explains enough to get you going.

pmultjs-test.maxpat
Max Patch
pmultjs.js
js
Rob Ramirez's icon

actually i just realized that my previous statement about limited functionality was incorrect. you can change the glparams or physparams list easily from javascript, simply by setting the attribute. updated example patch that now includes setting the scale of the objects is attached.

pmultjs-test1.maxpat
Max Patch
pmultjs1.js
js
pry's icon

Thank you very much Rob, it's very instructive to have an example based on jit.world.

pry's icon

Hi Rob,
I'm not far ... But with the patch below, Max crashes if bang() is not delayed. I don't know why.

essais-JS.zip
zip
Rob Ramirez's icon

cool. not sure why it's crashing, but i would create your position matrix in JS like this:JPM_1_position_matrix_OUT = new JitterMatrix(JPM_1.posoutname);

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

and you can use the init notification of phys.world to bang your js, like this:

pry's icon

I haven't seen your reply. Many thanks Rob.