[PD] customizing the new Pd GUI, some examples
Hans-Christoph Steiner
hans at at.or.at
Tue Sep 1 17:44:02 CEST 2009
On Sep 1, 2009, at 10:48 AM, dmotd wrote:
> Hans-Christoph Steiner wrote:
>> Someone should try to write a segmented patch cord plugin, that
>> would be
>> a great test of the plugin idea for the new GUI. I'd be happy to
>> help
>> someone thru the code, and make any reasonable changes. I suspect
>> it'll
>> be hard to work around the fact that the .pd file format doesn't
>> include
>> a place to store the segmented patch cord data points, but I think it
>> could easily be handled in a separate, parallel file. It could be
>> like
>> the .pd is the HTML and this other file is the CSS.
>
> i have wondered on few occasions if segmented data
> could be stored after the 'connect' message, is
> there something hardcoded that only accept a
> connect selector with a list with 4 floats? would
> adding more floats break the file format?
You could try it for yourself pretty easily. Here's an easy way to
find here the "#X connect" message is implemented:
hans at palatschinken:src > grep '"connect"' *.c
g_editor.c: gensym("#X"), gensym("connect"),
g_editor.c: "connect");
g_editor.c: gensym("#X"), gensym("connect"),
g_editor.c: binbuf_addv(b, "ssiiii;", gensym("#X"),
gensym("connect"),
g_editor.c: gensym("connect"), A_FLOAT, A_FLOAT, A_FLOAT,
A_FLOAT, A_NULL);
g_readwrite.c: binbuf_addv(b, "ssiiii;", gensym("#X"),
gensym("connect"),
m_binbuf.c: else if (!strcmp(second, "connect")||
m_binbuf.c: gensym("#X"), gensym("connect"),
m_binbuf.c: else if (!strcmp(second, "connect"))
m_binbuf.c: gensym("#P"), gensym("connect"),
u_pdsend.c: sockerror("connect");
u_pdsend.c: sockerror("connect");
x_net.c: gensym("connect"), A_SYMBOL, A_FLOAT, 0);
Basically, these two lines are saying that the "connect" message is
expected to be in 'ssiiii' format. s = symbol, i = integer. So
basically, two symbols (#X connect) and four integers (0 1 0 0)
g_editor.c: binbuf_addv(b, "ssiiii;", gensym("#X"),
gensym("connect"),
g_readwrite.c: binbuf_addv(b, "ssiiii;", gensym("#X"),
gensym("connect"),
First try throwing extra ints in the #X connect messages in a .pd
file, and see if that works. Then try getting those ints in Pd.
.hc
----------------------------------------------------------------------------
I spent 33 years and four months in active military service and during
that period I spent most of my time as a high class muscle man for Big
Business, for Wall Street and the bankers. - General Smedley Butler
More information about the Pd-list
mailing list