forcing jit.window to black

Apr 8, 2008 at 6:41am

forcing jit.window to black

I am making a video player and want to be able to force the jit.window to black. I know that it can be done easily on a jit.pwindow, but I am using a jit.window. There are klugey ways to do it, but I am wondering what people think are the most elegant.

Thanks.

sasha.

#36788
Apr 8, 2008 at 7:27am

Are you using opengl?
wes

On Tue, Apr 8, 2008 at 12:41 AM, Sasha Harris-Cronin
wrote:
>
> I am making a video player and want to be able to force the jit.window to black. I know that it can be done easily on a jit.pwindow, but I am using a jit.window. There are klugey ways to do it, but I am wondering what people think are the most elegant.
>
> Thanks.
>
> sasha.
> –
> — sasha harris-cronin —-
> — sasha@mortalspaces.com
> — http://www.mortalspaces.com
>

#126444
Apr 8, 2008 at 1:02pm

i use a bline powering a jit.op @op * for a slow dimmer.

On Apr 8, 2008, at 2:41 AM, Sasha Harris-Cronin wrote:
>
> I am making a video player and want to be able to force the
> jit.window to black. I know that it can be done easily on a
> jit.pwindow, but I am using a jit.window. There are klugey ways to
> do it, but I am wondering what people think are the most elegant.
>
> Thanks.
>
> sasha.
> –
> — sasha harris-cronin —-
> — sasha@mortalspaces.com
> — http://www.mortalspaces.com

#126445
Apr 8, 2008 at 3:29pm

No, I’m not using openGL currently.

sasha.

#126446
Apr 8, 2008 at 3:32pm

I’m definitely looking for a cut to black. This will be in response to an external command.

sasha.

#126447
Apr 8, 2008 at 5:43pm

eh, depends…
what’s playing in yer window?
you can alwaqys just send it a “black” matrix (one with all cells set
to 0 either by default or by “setall 0 0 0 0″ msg to it)

On Apr 8, 2008, at 4:32 PM, Sasha Harris-Cronin wrote:

>
> I’m definitely looking for a cut to black. This will be in
> response to an external command.
>
> sasha.
> –
> — sasha harris-cronin —-
> — sasha@mortalspaces.com
> — http://www.mortalspaces.com

#126448
Apr 8, 2008 at 8:16pm

can’t you also just send the matrix a “0″? I believe that should work too.

andreas

evan.raskob [lists] skrev:
> eh, depends…
> what’s playing in yer window?
> you can alwaqys just send it a “black” matrix (one with all cells set
> to 0 either by default or by “setall 0 0 0 0″ msg to it)
>
>
>
> On Apr 8, 2008, at 4:32 PM, Sasha Harris-Cronin wrote:
>
>>
>> I’m definitely looking for a cut to black. This will be in response
>> to an external command.
>>
>> sasha.
>> —
>> — sasha harris-cronin —-
>> — sasha@mortalspaces.com
>> — http://www.mortalspaces.com
>
>
> .
>

#126449
Apr 8, 2008 at 8:25pm

As people have pointed out, there are many ways to do this. By far
the fastest and highest quality solution will be to use opengl with
jit.gl.videoplane. You can get a real simple fade to black by
enabling blending and setting the alpha to 0.

wes

On Tue, Apr 8, 2008 at 2:16 PM, Andreas Wetterberg
wrote:
> can’t you also just send the matrix a “0″? I believe that should work too.
>
> andreas
>
> evan.raskob [lists] skrev:
>
>
>
> > eh, depends…
> > what’s playing in yer window?
> > you can alwaqys just send it a “black” matrix (one with all cells set to 0
> either by default or by “setall 0 0 0 0″ msg to it)
> >
> >
> >
> > On Apr 8, 2008, at 4:32 PM, Sasha Harris-Cronin wrote:
> >
> >
> > >
> > > I’m definitely looking for a cut to black. This will be in response to
> an external command.
> > >
> > > sasha.
> > > –
> > > — sasha harris-cronin —-
> > > — sasha@mortalspaces.com
> > > — http://www.mortalspaces.com
> > >
> >
> >
> > .
> >
> >
>
>

#126450
Apr 8, 2008 at 9:16pm

I’m playing back a straight quicktime movie. Since I’m looking for a cut (not a fade), it sounds like creating a black matrix and sending it to the window is probably the way to go.

It’d be useful to actually have that as a window property. I can think of several instances where I would want to blank a window.

Thanks all.

sasha.

#126451
Apr 8, 2008 at 9:25pm

> It’d be useful to actually have that as a window property. I can think of several instances where I would want to blank a window.

Perhaps, but I would call this feature creep. It’s way to easy to do
without such an attribute to merit its addition.

wes

#126452
Apr 8, 2008 at 9:29pm

I guess it’s because I come from a hardware perspective, so I am viewing this as a player/screen. Every hardware video player (and just about every projector and screen) that I work with has a “video black” feature and we use it pretty extensively. To me, it’s just standard.

I don’t really care. It’s not a big deal.

sasha.

#126453
Apr 8, 2008 at 9:48pm

my solution to this and other problems was to create a QT player
patch that has drop file, color & contrast control, scrub bar, audio
level control, speed control and fade & cut to black with audio
follow. slap it in a bpatcher and you’re off. i found out quickly
that building your own “hardware” was pretty great.
b

On Apr 8, 2008, at 5:29 PM, Sasha Harris-Cronin wrote:

>
> I guess it’s because I come from a hardware perspective, so I am
> viewing this as a player/screen. Every hardware video player (and
> just about every projector and screen) that I work with has a
> “video black” feature and we use it pretty extensively. To me,
> it’s just standard.
>
> Not a big deal.
>
> sasha.
> –
> — sasha harris-cronin —-
> — sasha@mortalspaces.com
> — http://www.mortalspaces.com

bruce tovsky
http://www.skeletonhome.com

“Sometimes the appropriate response to reality is to go insane.”
Philip K. Dick

#126454
Apr 8, 2008 at 11:51pm

This is a very simple solution, and I don’t think it’s a kludge. Seems pretty normal to me, maybe even simple enough to be “elegant”.

Adam

max v2;
#N vpatcher 445 223 1102 914;
#P origin 9 18;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 347 110 196 9109513 Stop and clear (optionally return to frame 0);
#P newex 130 373 47 9109513 jit.window;
#P newex 356 164 40 9109513 t b b b;
#P message 358 222 41 9109513 frame 0;
#P message 328 222 28 9109513 clear;
#P message 402 223 27 9109513 stop;
#P user jit.pwindow 184 365 322 242 1 0 0 0 0 0;
#P message 248 158 28 9109513 read;
#P message 284 158 31 9109513 start;
#P flonum 219 137 35 9 0.5 0 1 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 185 137 15 0;
#P newex 185 157 44 9109513 metro 2;
#P newex 185 306 103 9109513 jit.qt.movie 320 240;
#B color 5;
#P button 359 130 15 0;
#P comment 184 111 100 9109513 Read and start movie;
#P connect 2 0 13 0;
#P connect 4 0 3 0;
#P fasten 7 0 2 0 253 184 190 184;
#P fasten 6 0 2 0 289 184 190 184;
#P fasten 3 0 2 0 190 187 190 187;
#P connect 9 0 2 0;
#P connect 11 0 2 0;
#P connect 10 0 2 0;
#P connect 2 0 8 0;
#P connect 5 0 3 1;
#P connect 12 0 10 0;
#P connect 1 0 12 0;
#P connect 12 2 9 0;
#P pop;

#126455
Apr 10, 2008 at 11:13pm

Strangely, in my original patch, something was causing the window to buffer the last frame, so “clear” to jit.qt.movie was not clearing the window. I need to do a little digging around to see why.

sasha.

#126456
Jun 1, 2013 at 2:54pm

this is still a stupid-hard problem to solve. and no, you cannot just send a ’0′. trying to figure out how to use gl…but seems so ridiculous, just to cut to black for a bit! ‘clear’ isn’t working on jit.window.

#251401
Jun 2, 2013 at 5:19am

What’s hard about sending a full black matrix, or crossfading to one?

#251424
Jun 2, 2013 at 12:04pm

Try this:

<code>

– Pasted Max Patch, click to expand. –

</code>

#251433

You must be logged in to reply to this topic.