toggles within a video?

    Jun 17 2006 | 6:54 pm
    Does anyone know if there is a way to put buttons and number boxes within a movie? I'm working on a project where the video is manipulated by a midi keyboard and I would like to show values and toggles from the patch within the movie image. Is there a way to make a patch of all the toggles and numbers I'd like to display and then put those into a jit.window so I could overlay it with the jit.window showing the movie? That was one Idea I had.

    • Jun 17 2006 | 7:07 pm
      How about mapping your MIDI keyboard to some 3d shapes in opengl and using to superimpose it with you video.
    • Jun 17 2006 | 7:24 pm
      There is also a jit.desktop object, it allows to get OSX desktop in a window.
    • Jun 17 2006 | 7:54 pm
      Hi, I don't really know how to use the open gl stuff yet. I was hoping to just keep it simple, with some number boxes, toggles and knobs. Someone mentioned using jit.desktop...I'm looking into that, but I feel like there has got to be a way to make a window, either graphics or patcher window with a line of toggles and knobs and then combine that window with my jit window. I am really stumped and jit. desktop looks a little clunky with lots of chances for the wrong info to be displayed because it depends on what is in the desktop. Thanks for you help since I'm kind of a newbie. sean
    • Jun 17 2006 | 8:04 pm
      You will need to do this with either OpenGL (see the JavaScript based jitter-gui-sliderexample.pat) or jit.lcd. jit.window and jit.pwindow report mouse activity which you would use to issue the necessary draw commands to overlay your video with whatever you like.
    • Jun 17 2006 | 8:47 pm
      Hi Joshua, I checked out that open GL stuff. Unfortuneately, I don't know anything about javascript yet. I don't think the lcd object will work for me because I'm not trying to use the mouse. All I want to do for example is have a toggle button on top of my video so that when I go full screen, I press a program change button on my keyboard and the toggle I have overlayed in the video shows that action. I will also do this with knobs. I'm looking at the jit.pwindow, but I don't see how to put toggles or knobs in that window.
      Thanks for your help on this. sean
    • Jun 17 2006 | 9:45 pm
      You can't put UI elements from the patcher into the pwindow etc. like you're trying to do. Instead, you have to make your own graphical elements in the context using the shape drawing commands that jit.lcd or opengl provide. I would suggest you stop trying to follow a deadend path of putting the max numberbox or toggle etc. in a pwindow and take this opportunity to expand your knowledge and learn how to use jit.lcd or opengl to do what you want. If you don;t want interaction and just want to show some kind of indication as to what the state of the params your keyboard is controlling are then it's going to be very very easy. Why do you want to show those things anyway? Why not do something a bit more expressive with shape and color?
      Anyway, just my $0.02. Take it how you will.
      best, wes
    • Jun 17 2006 | 10:09 pm
      Hey, I totally aggree with you. It seems as though I'm following a deadend. I am looking into the open GL and lcd object and some sort of xfade. I just don't think I will be able to figure it out by the time my show is. The reason I'm trying to do this is that the keyboard is going to be the interactive part of the patch. I'd just like the user to see the values they are getting when they turn a knob, but I might have to eliminate that part of the patch for now. Of course I want to learn the open GL and javascript, I just think it's a little over my head and my deadline is fast approaching. I appreciate all your feedback and will put these on the list things to learn in max.
      thanks, sean
    • Jun 17 2006 | 10:22 pm
      You can do something very very simple with sketch and text2d. This is super crude, so I'll leave it to you to make it look nice.
    • Jun 17 2006 | 10:52 pm
      thanks, I'll try this when I understand javascript. sean
    • Jun 17 2006 | 11:10 pm
      that's not javascript. copy it and paste it into a patch window.
    • Jun 17 2006 | 11:24 pm
      ahhh... thanks, shows what I know.
    • Jun 18 2006 | 6:23 pm
      seems like wesley's suggestion/patch is a way to go, but you might want to consider this ugly jit.pwindow hack:
    • Jun 19 2006 | 12:10 pm
      Nothing wrong with that! Why not put UI elements on top of jit.pwindows? Isn't that the whole point of a pwindow (in-patcher-window)? That's why there's a layering in max ("bring-to-front", "send-to-back"). Sometimes there's no need to reinvent the wheel and reprogram your life away writing custom button classes and objects in opengl.