how to get patcher's name

Sep 4, 2006 at 10:36am

how to get patcher's name

How do i get a patcher’s name (‘something’ in [p something] when i
already got its box ?

short listobjects(t_patcher *p, t_pexport *x)
{
t_box *b;
t_symbol *u;

for (b = p->p_box; b; b = b->b_next) {

if(b->b_firstin)
{
u = ob_sym(b->b_firstin); // class name
if (!strcmp(u->s_name, “patcher”)) post(“patcher found, need
to retrieve its name”); // how do i get it ?
post(“include : %s”, u->s_name);
}
}
return 0;
}

best regards

f.e


f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

#27465
Sep 4, 2006 at 10:44am

There’s no public (or easy) way to do this at this time.

jb

Am 04.09.2006 um 12:36 schrieb f.e:

> How do i get a patcher’s name (‘something’ in [p something] when i
> already got its box ?

#83103
Sep 4, 2006 at 10:48am

Ok.

But searching the archives (back to 2004), i found [argv] written by Mr
Jester. It seems it can retrieve patchers’name + arguments. I’ll ask for
his sources, maybe it could help.

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

Jeremy Bernstein wrote:
> There’s no public (or easy) way to do this at this time.
>
> jb
>
> Am 04.09.2006 um 12:36 schrieb f.e:
>
>> How do i get a patcher’s name (‘something’ in [p something] when i
>> already got its box ?
>
>

#83104
Sep 4, 2006 at 11:54am

Ah yes. You could try using the t_box’s b_binbuf member for this. It
won’t work for bpatchers, I don’t think.

Something like

t_box *b = fe_has_a_box(); // the box you are using
void *bb = b->b_binbuf;
long typeoff = 0;
long stuffoff = 0;
t_atom a;

while (!binbuf_getatom(bb, &typeoff, &stuffoff, &a)) {
// do something with the data – I guess the 2nd t_atom contains the
name?
}

jb

Am 04.09.2006 um 12:48 schrieb f.e:

> Ok.
>
> But searching the archives (back to 2004), i found [argv] written
> by Mr Jester. It seems it can retrieve patchers’name + arguments.
> I’ll ask for his sources, maybe it could help.
>
> f.e

#83105

You must be logged in to reply to this topic.