Simple jit.matrix output from max object?

Aug 10, 2007 at 7:52pm

Simple jit.matrix output from max object?

Hello,

I have a max external that basically consists of a flext wrapper around a program I have written.

I am wondering if rather than transform my flext based external into a jitter external I might instead simply reference a jitter matrix to which I would output the data my program is producing.

If this is possible, can someone point me to an example?

The goal is to visualize parts of the state of the program.

many thanks,
Yon

#33208
Aug 10, 2007 at 8:23pm

Yes this is possible. Al you have to do is include jit.common.h in
you max external and do something like the following to create a
matrix:

void *m;
jit_matrix_info_default(&info);
info.type = _jit_sym_float32;
info.planecount = 1;
x->Uname = jit_symbol_unique();
m = jit_object_new(_jit_sym_jit_matrix, &info);
m = jit_object_method(m, _jit_sym_register, x->Uname);

wes

#110322
Aug 10, 2007 at 8:28pm

On Aug 10, 2007, at 12:52 PM, Yon wrote:

>
> I am wondering if rather than transform my flext based external
> into a jitter external I might instead simply reference a jitter
> matrix to which I would output the data my program is producing.

Sure, this is possible. There is no requirement for being a jitter
MOP to process or output Jitter Matrix data. One example in the
Jitter SDK which is a normal Max object which references a Jitter
Matrix, is jit.fill. For an MSP object which does similar, see
jit.peek~/jit.poke~.

Hopefully these point you in the right direction, but if you have
specific questions, just let us know.

-Joshua

#110323
Aug 10, 2007 at 10:51pm

Hey, many thanks for the rapid responses and info!

Indeed, the jit.fill example does really what I need, which is to copy my data (basically, a particle set with various attributes) to an existing named matrix (in my case, for subsequent rendering)

I’m studying the jitter SDK now trying to understand the jit.fill code well enough to implement the needed functionality, but it will take me longer than I reckoned to get my head around all the details.

cheers,
Yon

#110324
Aug 13, 2007 at 9:49am

This was fairly easy to get working, even amidst the natural distractions of the rural swiss alps. I made a little C++ class to dump matrix data to a named jitter matrix. After a little cleanup, I’ll post it in case it is useful for someone else.

- Yon

#110325

You must be logged in to reply to this topic.