Forums > Jitter

jit.gencoord scaling factor

October 12, 2007 | 2:58 am

Hi. I am having some problems with jit.gencoord. It seems that the
scaling factor of 1. in float32 the output will approach 1.0 (how
close depending on the dim you set) but never quite get there. to get
to 1.0 you have to find the magic number above 1. (case of 50 use
scaling 1.020408). Is this what is to be expected of jit.gencoord?

attached is the patch which demonstrates the behavior.

cheers,

(())_n

#P button 51 118 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 238 185 32 196617 print;
#P newex 51 213 58 196617 print close;
#P newex 51 185 41 196617 jit.iter;
#P newex 51 147 197 196617 jit.gencoord 2 float32 50 50 @scale 1. 1.;
#P newex 540 185 32 196617 print;
#P newex 281 213 59 196617 print there;
#P newex 281 185 41 196617 jit.iter;
#P newex 281 147 269 196617 jit.gencoord 2 float32 50 50 @scale
1.020408 1.020408;
#P button 281 118 15 0;
#P connect 2 0 3 0;
#P connect 6 0 7 0;
#P connect 9 0 5 0;
#P connect 5 1 8 0;
#P connect 5 0 6 0;
#P connect 1 1 4 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P window clipboard copycount 10;


October 12, 2007 | 3:55 am

On Oct 11, 2007, at 7:58 PM, (())_n wrote:

> Hi. I am having some problems with jit.gencoord. It seems that the
> scaling factor of 1. in float32 the output will approach 1.0 (how
> close depending on the dim you set) but never quite get there. to
> get to 1.0 you have to find the magic number above 1. (case of 50
> use scaling 1.020408). Is this what is to be expected of jit.gencoord?

Thanks for the report. We can fix in a future release to behave as
you expect, but for the time being you can use jit.expr @expr norm[0]
norm[0]

-Joshua

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 111 260 157 196617 jit.expr @expr norm[0] norm[1];
#P button 111 191 15 0;
#P newex 111 339 58 196617 print close;
#P newex 111 311 41 196617 jit.iter;
#P newex 111 220 130 196617 jit.matrix 2 float32 50 50;
#P connect 4 0 1 0;
#P connect 0 0 4 0;
#P connect 3 0 0 0;
#P connect 1 0 2 0;
#P window clipboard copycount 5;


October 12, 2007 | 4:24 am

On Oct 11, 2007, at 8:55 PM, Joshua Kit Clayton wrote:

> We can fix in a future release to behave as you expect, but for the
> time being you can use jit.expr @expr norm[0] norm[0]

Sorry for the typo. Above should read jit.expr @expr norm[0] norm[1]

-Joshua


October 12, 2007 | 4:43 am

On Oct 12, 2007, at 12:24 AM, Joshua Kit Clayton wrote:

>
>> We can fix in a future release to behave as you expect, but for
>> the time being you can use jit.expr @expr norm[0] norm[0]
>
> Sorry for the typo. Above should read jit.expr @expr norm[0] norm[1]
>
> -Joshua

Got it. Thanks. This is the technique I was using b4. Josh Goldberg
pointed out jit.gencoord which might be simpler, but then I was
always missing some data at the end. Good to know jit.gencoord will
work as expected in the future.

cheers,

(())_n


October 13, 2007 | 9:21 am

aha!!
this has been bugging me for awhile.
of course, i thought it was my fault…

On Oct 12, 2007, at 5:43 AM, (())_n wrote:

>
> On Oct 12, 2007, at 12:24 AM, Joshua Kit Clayton wrote:
>
>>
>>> We can fix in a future release to behave as you expect, but for
>>> the time being you can use jit.expr @expr norm[0] norm[0]
>>
>> Sorry for the typo. Above should read jit.expr @expr norm[0] norm[1]
>>
>> -Joshua
>
> Got it. Thanks. This is the technique I was using b4. Josh Goldberg
> pointed out jit.gencoord which might be simpler, but then I was
> always missing some data at the end. Good to know jit.gencoord will
> work as expected in the future.
>
> cheers,
>
> (())_n


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