Forums > MaxMSP

such a silly questions, but need your help!

September 7, 2006 | 10:54 pm

Hi,

I’m a newbie to max/jitter, hope someone can help me with this.
I am using jitter to play a quicktime video, and I’m planning to add some text to make them look like subtitles. At the moment I use a message box that says "clear, moveto 10 200, write "hello", bang" to display the word "hello" on screen. But if i want to make the text dynamic (let says I have a counter and I want to display the counting numbers on screen), how would I do that? How do I pass a variable/argument?

Thank you so much~


September 7, 2006 | 11:06 pm

Check out jitter recipes, there are examples you
can download. Lots of good stuff.
http://www.cycling74.com/story/2006/2/17/153427/406
In particular, Recipe 28: Subtitle.

Anthony

—– Original Message —–
From: Angelina Ho
Date: Thursday, September 7, 2006 5:56 pm
Subject: [maxmsp] such a silly questions, but need your help!

>
> Hi,
>
> I’m a newbie to max/jitter, hope someone can help me with this.
> I am using jitter to play a quicktime video, and I’m planning to
> add some text to make them look like subtitles. At the moment I
> use a message box that says "clear, moveto 10 200, write "hello",
> bang" to display the word "hello" on screen. But if i want to make
> the text dynamic (let says I have a counter and I want to display
> the counting numbers on screen), how would I do that? How do I
> pass a variable/argument?
>
>
> Thank you so much~
>


September 7, 2006 | 11:13 pm

Hi Angelina,

In the jit.lcd.help file it shows you how to get the fps as an overlay
on the video using tosymbol.

I actually did a quick and dirty something like this earlier today,
relevant bit is below.

~scott

#P window setfont "Sans Serif" 9.;
#P window linecount 5;
#P comment 367 207 100 196617 tosymbol converts the message box string
into something that can be written into the jit.lcd;
#P window linecount 2;
#P comment 363 61 100 196617 update the counter every second;
#P window linecount 1;
#P comment 77 30 100 196617 turn on the metro;
#P comment 143 90 100 196617 read in a movie;
#P user jit.pwindow 55 285 322 242 0 1 0 0 1 0;
#P message 107 89 30 196617 read;
#P toggle 56 21 15 0;
#P newex 357 184 51 196617 tosymbol;
#P newex 357 91 56 196617 qlim 1000;
#P message 357 162 115 196617 time remaining $1 secs;
#N counter 1 0 60;
#X flags 0 0;
#P newobj 357 120 77 196617 counter 1 0 60;
#P newex 75 206 168 196617 pack write "time remaining : secs";
#P message 174 168 79 196617 moveto 100 20;
#P newex 56 142 188 196617 t b b b l;
#P newex 56 249 111 196617 jit.lcd 4 char 320 240;
#P newex 56 116 105 196617 jit.qt.movie 320 240;
#P newex 56 69 52 196617 metro 33;
#P window linecount 3;
#P comment 480 141 100 196617 $1 accepts the argument coming from the counter;
#P connect 3 0 13 0;
#P connect 1 0 2 0;
#P fasten 1 0 9 0 61 88 362 88;
#P fasten 12 0 2 0 112 110 61 110;
#P connect 2 0 4 0;
#P connect 11 0 1 0;
#P fasten 4 0 3 0 61 204 61 204;
#P fasten 5 0 3 0 179 191 61 191;
#P fasten 4 3 3 0 238 191 61 191;
#P fasten 6 0 3 0 80 232 61 232;
#P fasten 4 1 6 0 120 191 80 191;
#P connect 4 2 5 0;
#P connect 8 0 10 0;
#P fasten 10 0 6 1 362 203 238 203;
#P connect 7 0 8 0;
#P connect 9 0 7 0;
#P window clipboard copycount 18;

On 9/7/06, Angelina Ho wrote:
>
> Hi,
>
> I’m a newbie to max/jitter, hope someone can help me with this.
> I am using jitter to play a quicktime video, and I’m planning to add some text to make them look like subtitles. At the moment I use a message box that says "clear, moveto 10 200, write "hello", bang" to display the word "hello" on screen. But if i want to make the text dynamic (let says I have a counter and I want to display the counting numbers on screen), how would I do that? How do I pass a variable/argument?
>
>
> Thank you so much~
>


September 7, 2006 | 11:15 pm

hi angelina,
if you use a message-box you can set a placeholder for a variable.
lets say i want to print out something like "countdown 1", countdown
2", etc you can connect a counter-object to a message-box reading
‘countdown $1′ and connect that to a print-object. you should see the
appropriate message in the max-window now.
$1 is the placeholder for another message you can send to the box and
will be substituted. your message-box should look something like this
then: "clear, moveto 10 200, write $1, bang"

take a look at the sprintf-help-patch as well!

hope that helps…

cheers!jens

Am 08.09.2006 um 00:54 schrieb Angelina Ho:

>
> Hi,
>
> I’m a newbie to max/jitter, hope someone can help me with this.
> I am using jitter to play a quicktime video, and I’m planning to
> add some text to make them look like subtitles. At the moment I use
> a message box that says "clear, moveto 10 200, write "hello", bang"
> to display the word "hello" on screen. But if i want to make the
> text dynamic (let says I have a counter and I want to display the
> counting numbers on screen), how would I do that? How do I pass a
> variable/argument?
>
>
> Thank you so much~


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