display simple text in a video window
This is probably so simple, but I am not getting it. I have a patch that displays random short pieces of video. I have a number box in the patch that displays the number of the video file that is playing. I want to display that number below the video, either in that same window with a little extra blank space below, or in a different window that can be placed over the video window. Then, when I do a screen capture, I can keep track of which video is playing when.
I just don't see how to put that number into a form that can be sent to a jit.window. Can someone provide a simple method to achieve this. Just display a number in a window...
thanks in advance - - -
jit.lcd for text on a matrix
jit.gl.text for text on an OpenGL context.
Ok. Here is a simple example of what I am trying to do. I AM using jit.gl.text but how do I get whatever is going in the Number Box in my patcher displayed in a jit.window? I am obviously missing some critical piece of information/ understanding.
note: Unfortunately, the example image in the Reference Page for jit.gl.text is missing.
You need a render context to draw OpenGL objects such as jit.gl.text.
In this case you're missing jit.gl.render or jit.world.
Check out jitter tutorial 29, it shows how to render text on a video
Woah, Pedro. It works! Big thanks.
Now how do I get rid of that MenuBar? I don't see an attribute?
When jit.window is in fullscreen mode? @fsmenubar 0
Sorry for not being clear. The intent is to have this exist as a small window hovering over a movie in another window. So it has to be small and have no menubar. When this works I do a screen grab of the overlay. (There are actually 3 video windows in this project, and there will be 3 of these text windows as well, all on top of a black background. Everything is composted in the end.)
thanks - - -
You can compose everything in a single window, I don't understand the purpose of having 3 different windows with videos plus 3 different windows with numbers in order to then grab the composited result.
Anyway, it's possible to have a window with no menubar and no borders in Max.
Take a look at this recent thread for an example:
https://cycling74.com/forums/gui-inside-jit%C2%B7window
Yeah, There's no purpose to having all these windows overlaid. I'm just not good enough to know how to do that multiple render riff, let alone even know that this was possible.
I got the border to disappear by using jit.gl.render and jit.window. Then @border 0 works.
One last question; how come the background color is no longer black. I don't see how to set that. I tried setting the @erase_color of the jit.gl.render to 0 but now the numbers don't get erased! Yikes! It'll take me a while to digest that other thread. Thanks. You really know your stuff!
@erase_color 0. 0. 0. 1. (R G B Alpha), in this case black (0 0 0) and completely opaque (1).
Anyway, look at this example where you send videos to planes that can be positioned, scaled and layered independently. It's really simple.
Pedro, are you still there? Everything is working just how I wanted it, but I have another thought:
Is there any way to have the text stay on the screen and then add the next number following it, so you end up with a list of numbers, horizontally? I only run through 7 cycles at most so this will not be a lot of numbers.
thanks - - -
Like this?