Forums > Jitter

[bug] jit.change report mode backwards

December 4, 2007 | 4:39 pm

Hi,

As far as I can tell, jit.change’s "report" mode is backwards.

Expected: a different matrix into jit.change should trigger a report
1, the same matrix should trigger a "report 0" message. (As per
HTML reference)

Results: The real results are the reverse – "report 0" for a
changed matrix, "report 1" for a different one.

max v2;
#N vpatcher 40 104 716 647;
#P toggle 109 60 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 111 92 57 196617 qmetro 30;
#P user jit.pwindow 64 323 162 122 0 1 0 0 1 0;
#P toggle 237 316 34 0;
#P newex 45 131 50 196617 t b i;
#P user radiogroup 45 71 18 48;
#X size 3;
#X offset 16;
#X inactive 0;
#X itemtype 0;
#X flagmode 0;
#X set 1;
#X done;
#P newex 237 280 84 196617 route report;
#P newex 121 245 190 196617 jit.slide @slide_up 5. @slide_down 5.;
#P window linecount 2;
#P newex 121 271 97 196617 jit.change @mode 0 @report 1;
#P window linecount 1;
#P newex 85 190 50 196617 gate 2 1;
#P window linecount 2;
#P newex 266 209 127 196617 jit.expr @expr "sin( norm[0]*(PI) )";
#P button 151 128 15 0;
#P window linecount 1;
#P newex 121 218 127 196617 jit.expr @expr "norm[0]";
#P newex 125 166 142 196617 jit.matrix 1 float32 320 240;
#P connect 8 0 9 0;
#P connect 5 0 11 0;
#P connect 9 1 4 0;
#P connect 13 0 12 0;
#P connect 4 0 1 0;
#P connect 3 0 6 0;
#P connect 1 0 6 0;
#P connect 6 0 5 0;
#P connect 12 0 0 0;
#P connect 9 0 0 0;
#P connect 2 0 0 0;
#P connect 0 0 4 1;
#P connect 5 1 7 0;
#P connect 7 0 10 0;
#P connect 4 1 3 0;
#P pop;


December 16, 2007 | 12:14 pm

The logic here is that of == – are the two matrices equal? 0 = false;
1 = true — so as far as that goes, the object works properly.

jb

Am 04.12.2007 um 17:39 schrieb evan.raskob [lists]:

> Expected: a different matrix into jit.change should trigger a report
> 1, the same matrix should trigger a "report 0" message. (As per
> HTML reference)
>
> Results: The real results are the reverse – "report 0" for a
> changed matrix, "report 1" for a different one.
>


December 16, 2007 | 1:20 pm

Yes, what you wrote is correct, and this is the behaviour of
jit.change. But, what I read in the HTML reference is the reverse:

"With report set to on (1), jit.change will behave a bit like Max’s
== object. If jit.change determines that the matrix input has not
changed (within the parameters set with the mode and thresh
attributes), it will send the message report 0 from its rightmost
outlet. If the matrix input has changed, jit.change will send the
message report 1."

this says that:
[same matrix in] — [jit.change] = 0
[different matrix in] — [jit.change] = 1

which is the opposite of ==.

Right?

Cheers
Evan

On Dec 16, 2007, at 12:14 PM, Jeremy Bernstein wrote:

> The logic here is that of == – are the two matrices equal? 0 =
> false; 1 = true — so as far as that goes, the object works properly.
>
> jb
>
> Am 04.12.2007 um 17:39 schrieb evan.raskob [lists]:
>
>> Expected: a different matrix into jit.change should trigger a
>> report 1, the same matrix should trigger a "report 0" message.
>> (As per HTML reference)
>>
>> Results: The real results are the reverse – "report 0" for a
>> changed matrix, "report 1" for a different one.
>>
>


December 16, 2007 | 4:54 pm

Yeah. That’s a documentation bug – will be fixed for Max 5. Thanks!

jb

Am 16.12.2007 um 14:20 schrieb evan.raskob [lists]:

> this says that:
> [same matrix in] — [jit.change] = 0
> [different matrix in] — [jit.change] = 1
>
> which is the opposite of ==.


December 16, 2007 | 9:27 pm

You’re welcome – it was such huge doc bug that after 5 years (?) of
jitter being around, no one else has realized it… :)

cheers
evan

On Dec 16, 2007, at 4:54 PM, Jeremy Bernstein wrote:

> Yeah. That’s a documentation bug – will be fixed for Max 5. Thanks!
>
> jb
>
> Am 16.12.2007 um 14:20 schrieb evan.raskob [lists]:
>
>> this says that:
>> [same matrix in] — [jit.change] = 0
>> [different matrix in] — [jit.change] = 1
>>
>> which is the opposite of ==.
>


Viewing 5 posts - 1 through 5 (of 5 total)