### how to learn about jit.expr, and jit.bfg.

I have tried hard to read the help files of jit.expr and jit.bfg, but cannot understand them at all.

Could anyone let me know how I can understand these parameters and terms?

- cell[0-31] (integer coordinate across dim);

- norm[0-31] (normalized coordinate across dim);

- snorm[0-31] (signed normalized coordinate across dim);

- dim[0-31] (matrix size across dim);

- in[0-31] (input matrix, corresponding plane);

- in[0-31].p[0-31] (input matrix, specific plane);

- matrixname (any named matrix, corresponding plane);

- matrixname.p[0-31] (anynamed matrix, specific plane);

- PI, TWOPI, HALFPI, INVPI, DEGTORAD, RADTODEG, E, LN2, LN10, LOG10E, LOG2E, SQRT2, SQRT1_2;

Does any one have simple patches with better documentation than Jitter help or reference ?

Or should I find some books about image or video processing in order to understand the usage of jit.expr and jit.bfg help files ?

Please help or recommand some books to start.

Thank you so much.

jit.print is your friend. just start plugging in values and look at what comes out. no better way to learn imho.

also, search the forum. there are several good examples floating around here.

**all**of the following text. Then, in Max, select

*New From Clipboard*.

```
----------begin_max5_patcher----------
510.3oc0VtsaiCBDF9Z6mBDWtJMxfOk165KwdSkUEwllRkMXYSz5cq569ZN3
FkTRqq10ozaXDCiw+yGCGdNL.tULP6gfa.2ABBdNLHP6R4Hv1O.1PFJqI85v
fa2KkBNbkYHVk1oX6SWkM4iuugwqoRc7nCNE6km503R96VpQBvsD9NHnvNbK
QV9Hiu69NZozDABEsNZEvzhesETn9hWBCUMqlYpzP66I6nS5VRGz+DHcnsCT
wZtKpPaPENR2D24K157AAWxIM57BdaGiTC+bj3.ETSUO6O5APn0oWmh1j+ND
ZikJVPEqMaVBFwEcZHostoTtuRoLCdrFEetHTJxIk13qTJ0fmjkmRkz55wZn
IqCJkh7UJYwC1tiKZwqk9gcG2o8cQsDekZ4VNYOtJagqshJlrtnj2dZd7QEU
+i0Vb5uFy12.omXx0scLtzAYhe2q0OBL+j1UQ3D2nAeNzL9yuugH6XCvUmET
pz9idSPrANIlCot9+OhT0RNHDd9kNewDBatsKIeoHjQk.L3gZAQFiAIfTGDC
8solZ5j8TmDSOuvZF+zmPqmPk+iwXuXeW4jFsf.D8p5pn8RFmHYiuu9PL3ih
4QVUEUO7j3aXUshw8tVIblkz4pnrYnHzEUQ3Ynn3KphRy7tksT+qRR8nVeSR
492BWh+Qokt7dryKg+UclYMa
-----------end_max5_patcher-----------
```

It seems our documentation for jit.expr syntax could be a little better, as I hear this question often. In general, the most helpful thing for understanding is to hook the output to jit.cellblock and watch the numbers. For cell,norm,snorm,dim the number in the brackets should be the dimension that you are querying (x=0,y=1,etc.). Each of these gives different values depending on the cell location.

- cell[0-31] (integer coordinate across dim);

generates an integer coordinate value of the cell location using the dimension specified in brackets.

- norm[0-31] (normalized coordinate across dim);

similar to cell, but gives normalized values (0.-1.)

- snorm[0-31] (signed normalized coordinate across dim);

similar to cell, but gives signed normalized values (-1. – 1.)

- dim[0-31] (matrix size across dim);

gives the size of the matrix (constant for all cells)

- in[0-31] (input matrix, corresponding plane);

specifies one of the inputs as a variable

- in[0-31].p[0-31] (input matrix, specific plane);

used to get aspecific plane of the input matrix

- matrixname (any named matrix, corresponding plane);

specifies a named matrix as a variable

- matrixname.p[0-31] (anynamed matrix, specific plane);

used to get a specific plane of that named matrix

- PI, TWOPI, HALFPI, INVPI, DEGTORAD, RADTODEG, E, LN2, LN10, LOG10E, LOG2E, SQRT2, SQRT1_

These are all common mathematical constants and functions.

Hope that helps…

Best,

Andrew B.

Dear Andrew and all

Thanks for this, it was much needed. Another point: is there a way to do translation i.e. to refer to a cell in the input[1] that has not got the same address than the input[0] or does it have to be parallel?

thanks

pa

I am still very confused. For example, what and how does "expr cell(0)cell(0)" do to the matrix ? I can see the results from jit.cellblock, but still cannot figure out the rules according to which "expr cell(0)cell(0)" or "expr cell(1)cell(1)" makes the matrix.

Could you explain more by using "expr cell(0)(0)" and "expr cell(1)cell(1)" as an example ?

Thank you so much.

Hello,

I don’t know TWOPI as a mathematical operator, is there anyone to help on this?

@Cheng

In my knowledge, If you have for example "cell(1)cell(1)" :

-> the first cell(1) talks to plane 1

-> and the second cell(1) talks to plane 2.