question about resizing jit.pwindow with javascript.

Oct 6, 2008 at 4:10pm

question about resizing jit.pwindow with javascript.

I try to resize jit.pwindow and patcher window with javascript, but i have problems i can’t resolve alone ; here a demo patch to explain what’s happen ; it’s probably about openGL stuff that i don’t understand very well.
Do you know how to avoid this distortion ?

Oct 7, 2008 at 4:14pm

i didn’t search enough, sorry ! after few hours (i’m stupid !), here a way to do it, it’s not very beautiful, but that works.

May 18, 2011 at 10:03pm

believe me you’re not stupid. I don’t know any js or java…and I need to accomplish this. sadness fills 0.o

May 19, 2011 at 8:30am


more or less equal to missing zips …

May 19, 2011 at 2:03pm


wow…i think I understand that, as a simple switch. But I need to do it dynamically. I’ve got 12 jit.pwindows playing one video stream cut up and spread about a window. I want them to start in a random positions and in roughly 5 minutes finish in a shape. I imagine a basic reconstruction of the video stream in natural order.

i guess today I dive into the java docs.

May 19, 2011 at 4:17pm


without javascript …

– Pasted Max Patch, click to expand. –


May 19, 2011 at 10:36pm


2 questions though.

– Pasted Max Patch, click to expand. –

1) am I hallucinating or does that rectangle turn into a square at higher values?
2) is there anyway to move the pwindow around in the patcher window? like this

– Pasted Max Patch, click to expand. –

i’ll be honst I can’t decipher the flower =,*(

May 20, 2011 at 5:36am


– Pasted Max Patch, click to expand. –


May 20, 2011 at 5:36am


May 20, 2011 at 8:52pm

is there no limit to your genius!!!!????? thank you so much. why do you say oops?

May 21, 2011 at 6:51am


because i posted twice ;-)

May 21, 2011 at 3:28pm

did you know about this attribute the jit.pwindow has. it’s called patching_rect.

– Pasted Max Patch, click to expand. –

I was just showed that and it’s LOADS simpler.

May 21, 2011 at 3:50pm


yep, much more easy like that …

If you want to know all attributes :
- open the jit.pwindow inspector (select the [jit.pwindow] then cmd + i),
- click on @ in bottom left (“Show attribute name”),
that’s it !


May 21, 2011 at 5:52pm

oh snap! thank you for that! I’m familiar with the inspector but I didn’t realize they were all @rguments…. and now I know how to access them! this is excellent. learning so much =) thanks!!


You must be logged in to reply to this topic.