Forums > Javascript

How get arguments of objects ?

October 4, 2006 | 2:22 pm

JS is very incredible.
I can retrieve many informations of objects in a patcher and subpatchers : position, color, type, name… but how can I access to parameters of objects ???

Example:
I have many "send~" : "send~ toto1","send~ toto2","send~ toto3"…
How can I find the MaxObj of toto2 ?


October 4, 2006 | 4:01 pm

The arguments to send and receive objects are visible as "Global"
objects in Javascript.

g = new Global("toto1");
post(g);

I don’t know how well this works for send~ signals however. I don’t
think you can do dsp programming in javascript.

Steve

On 10/4/06, Thomas Goepfer

wrote:
>
> JS is very incredible.
> I can retrieve many informations of objects in a patcher and subpatchers : position, color, type, name… but how can I access to parameters of objects ???
>
> Example:
> I have many "send~" : "send~ toto1","send~ toto2","send~ toto3"…
> How can I find the MaxObj of toto2 ?
>


October 5, 2006 | 8:33 am

Thanks, but my precedent post was not clear.
I don’t just want retrieve/send value from send~.

A new example:
I have in a patcher many send~, receive~ and "message box":
"send~ toto1","send~ toto2","send~ toto3", "receive~ toto1","receive~ toto2","receive~ toto3", "hello my", "name is", "totoetlititi":

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 328 64 57 196617 totoetlititi;
#P message 198 68 44 196617 name is;
#P message 92 50 48 196617 hello my;
#P newex 218 196 77 196617 receive~ toto3;
#P newex 213 168 77 196617 receive~ toto2;
#P newex 208 140 77 196617 receive~ toto1;
#P newex 79 144 63 196617 send~ toto3;
#P newex 74 116 63 196617 send~ toto2;
#P newex 69 88 63 196617 send~ toto1;
#P window clipboard copycount 9;

With a JS I want find the position of all this objects, and create a coll with the name of the object (send~ or receive~), its arguments (toto1 or toto2 or…), and its position (X, Y):

send~ "toto1" 69 88;
receive~ "toto3" 218 196;
send~ "toto2" 74 116;
message "name is" 198 68;

With the method "apply", I can "scan" the objects. With "maxclass", I find the name of the objects, and with "rect", I can find the positon of all this objects. But how can I retrieve their arguments ("toto1", "toto2","my name", …) ?


October 5, 2006 | 4:30 pm

I don’t believe that this is currently possible. I thought that jasch
had an external that did something like this, but I couldn’t find it.

jb

Am 05.10.2006 um 10:33 schrieb Thomas Goepfer:

> I have in a patcher many send~, receive~ and "message box":
> "send~ toto1","send~ toto2","send~ toto3", "receive~
> toto1","receive~ toto2","receive~ toto3", "hello my", "name is",
> "totoetlititi":


October 5, 2006 | 5:10 pm

On 5 oct. 06, at 18:30, Jeremy Bernstein wrote:

> I don’t believe that this is currently possible. I thought that
> jasch had an external that did something like this, but I couldn’t
> find it.

Hey Jeremey,

You mean [posit] ? which works for listing the buffers~ and coll
names, but not the arguments.

Best,
ej


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