Page 1 of 1
OSC and the text layer
Posted: Fri Jan 18, 2008 9:46 pm
by anomad
Hello!
Here's my situation: I work w/another VJ who uses max/msp to send text information via OSC to my system running modul8. I've download the OSC module and can see the information comming into modul8 but I'm stumped as to how I can get that text data automatically onto the TEXT module. (he's playing music videos and I want to project the artist and song title information)
Has anyone done something like this? Is it even possible ?
Thanks!
-james
(a nomad. )
Re: OSC and the text layer
Posted: Sun Jan 20, 2008 2:42 am
by boris
Hi,
You can use the theses keywords :
direct_layer_text_field
direct_layer_text_fontName
direct_layer_text_size
++
anomad wrote:Hello!
Here's my situation: I work w/another VJ who uses max/msp to send text information via OSC to my system running modul8. I've download the OSC module and can see the information comming into modul8 but I'm stumped as to how I can get that text data automatically onto the TEXT module. (he's playing music videos and I want to project the artist and song title information)
Has anyone done something like this? Is it even possible ?
Thanks!
-james
(a nomad. )
Posted: Mon Jan 21, 2008 6:10 am
by anomad
Thank you very much Boris! That was exactly what I was looking for!
I also get BPM information in the string I'm receiving. Is there an equivalent way that I could set the value of UIbpm in BPM (GLOBAL) ?
Thanks again for your help!
-james
(a nomad. )
Posted: Thu Mar 06, 2008 4:28 am
by anomad
Replying to myself here...
The BPM information is stored in a shared dictionary. Simple!
Posted: Sat Nov 29, 2008 2:03 pm
by elgael14
OK, this is exactly what I'm looking for too, except...
...I can't get it working
I use pd to control modul8, OSC communication is OK ( my patch does allready control a few things in m8).
So what is wrong with my message ?
In pd, here is what I'm doing :
[ send /md8key/direct_layer_text_field/TEST (
I am missing something ?
If anyone knows, thanx for your help !
Posted: Wed Dec 10, 2008 8:07 pm
by renaud
You have to specify the layer you want to use ::
It's for the text field, but it doesn't work for the size and the FontName. I'm sending that :
/md8key/direct_layer_text_field/10 mama
/md8key/direct_layer_text_fontName/10 Helvetica
Maybe I'm missing something, but what?
If someone have a clue...
here is the pd patch :
#N canvas 0 22 450 300 10;
#X obj 72 214 sendOSC;
#X msg 72 191 connect localhost 8002;
#X msg 72 163 send /md8key/direct_layer_text_field/0 test;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
And for MaxMsp
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 70 86 205 196617 /md8key/direct_layer_text_size/10 22.9;
#P message 48 63 250 196617 /md8key/direct_layer_text_fontName/10 Helvetica;
#P message 48 232 418 196617 /md8key/ctrl_layerStack_focusPosition/-1 3;
#P newex 48 199 62 196617 prepend set;
#P newex 48 168 86 196617 udpreceive 8000;
#P message 14 41 212 196617 /md8key/direct_layer_text_field/10 mama;
#P newex 48 117 115 196617 udpsend localhost 8002;
#P connect 5 0 0 0;
#P connect 6 0 0 0;
#P connect 3 0 4 0;
#P connect 2 0 3 0;
#P connect 1 0 0 0;
#P window clipboard copycount 7;
It works !
Posted: Wed Dec 10, 2008 8:41 pm
by elgael14
With this syntax, it works fine for the text field.
I have tried a few ideas for your text size / font problem, but haven't found any clue.
Posted: Tue Dec 16, 2008 6:37 pm
by renaud
Ok ... it works fine now for the text module in OSC...
Here is a sample patch for MaxMsp
max v2;
#N vpatcher 732 495 1246 762;
#P origin 2 0;
#P window setfont "Sans Serif" 9.;
#P newex 14 132 56 196617 route text;
#P user textedit 14 74 114 124 32896 3 9;
#P newex 14 158 228 196617 sprintf /md8key/direct_layer_text_field/0 %s;
#P window linecount 3;
#P newex 266 132 117 196617 sprintf /md8key/direct_layer_text_fontName/-1 %s;
#P window linecount 1;
#P hidden newex 161 35 45 196617 loadbang;
#P user ubumenu 161 100 220 196617 0 1 1 0;
#X add;
#X prefix_set 0 0 <none> 0;
#P hidden button 161 58 15 0;
#P hidden newex 161 78 41 196617 fontlist;
#B color 5;
#P flonum 385 101 76 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P message 385 137 109 196617 /md8key/direct_layer_text_size/1 \$1;
#P window linecount 1;
#P newex 43 210 115 196617 udpsend localhost 8002;
#P connect 9 0 10 0;
#P connect 10 0 8 0;
#P fasten 1 0 0 0 390 197 48 197;
#P fasten 7 0 0 0 271 193 48 193;
#P fasten 8 0 0 0 19 193 48 193;
#P hidden connect 6 0 4 0;
#P hidden connect 4 0 3 0;
#P hidden connect 3 0 5 0;
#P connect 5 1 7 0;
#P connect 2 0 1 0;
#P pop;