another expr issue

Dg's icon

Hello,

I want to manage 2 expr in one [jit.expr] object ... without success
Could anyone give help.

This:
jit.expr @expr "((cell[0]*0.1)*2.)-1." "((cell[0]*0.1)*1.5)-0.75"
does not work

but this:
jit.expr @expr "((cell[0]*0.1)*2.)-1."
with
jit.expr @expr "((cell[0]*0.1)*1.5)-0.75"
packed inside [jit.pack 2] , work nice.

In Max5 I tryed:
jit.expr @expr (((cell[0]*0.1)*2.)-1.) (((cell[0]*0.1)*1.5)-0.75)
jit.expr @expr "((cell[0]*0.1)*2.)-1." "((cell[0]*0.1)*1.5)-0.75"
jit.expr @expr ((cell[0]*0.1)*2.)-1. ((cell[0]*0.1)*1.5)-0.75

but it is a hard way ...

thanks.

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

Dg's icon

Here's a similar problem.
the side with [expr] is good but my [jit.expr] gives bas result.

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

Any help would be greatly appreciated.

Emmanuel Jourdan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

aren't you looking for in[0] instead of cell[0]?

Dg's icon

Thx e.j

---------

Hello,

I want to multiply the expr by its inverse, no success within one [jit.expr],
and I don't want the [jit.op @op * @val -1.]

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

Any idea?

Emmanuel Jourdan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

jit.expr @expr "(in[0] * -1.)" just works fine. jit.pwindow represent negative values by black... which is the reason why it gives the impression of not working properly.

Dg's icon

wow! stupid boy!

So the inverse would be @expr "abs(norm[0] *-1.)"

Thanks again e.j