Re: [PD] pd to webpage

2007-10-18 Thread Frank Barknecht
Hallo,
Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:

 This is very cool, keep us posted on your progress!  I am thinking of  
 trying to write an IRC client in Pd.  Then there could be an embedded  
 IRC client in Pd-extended that is tied into the help system.  You  
 click a link on a help patch, it opens a chatroom and posts the  
 context of the patch to the chatroom.  That would help out the  
 newbies, who often have trouble knowing what to ask.

Like netpd?

Ciao
-- 
 Frank Barknecht _ __footils.org__

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-18 Thread Thomas O Fredericks
What is the difference between [str] and [any2string]?
If I understand correctly str is a wrapper for standard string functions and
it's output is a pointer to a string.
I believe this approach is more limited that using any2string because all
basic string functions can be recreated once a symbol is converted to a
series of bytes. For example, to split a string along a space character you
can use [list split 32], but with the [str] architecture, you need to use
[str csplit 32].

Just my 2cents. Also, [any2string] does not break compatibility with Pd
Vanilla.

Tom

On 10/18/07, Hans-Christoph Steiner [EMAIL PROTECTED] wrote:


 [str] is only included in 0.40.3 because it needs the string patch to
 pd to work.

 .hc

 On Oct 17, 2007, at 3:27 PM, marius schebella wrote:

  seems like mrpeach is not fully included in pd-extended or at least
  [str] is missing. is this an abstraction or a library?
  marius.
 
  Martin Peach wrote:
  Here's my unfinished attempt at a web server. It will send a file
  index.html to a browser. It uses the string patch to pd and the str
  object, which can handle ascii without pd interpreting it along
  the way.
  It may be possible to do it using other objects. The main problem
  is the
  detection of  special characters like CRLF in the request. The
  content-length field is not necessary if you close the connection
  after
  sending the data, so you don't need to know how long the data is
  going
  to be before you start. I think I have done that in a later
  version that
  I can't find right now...Obviously the index.html file could also be
  generated by pd, and then it would all be more interesting.
 
  Martin
 
  #N canvas 539 0 727 919 10;
  #X obj 104 61 mrpeach/tcpserver 80;
  #X floatatom 171 237 5 0 0 0 - - -;
  #X floatatom 286 191 5 0 0 0 - - -;
  #X obj 324 138 unpack 0 0 0 0;
  #X floatatom 324 161 3 0 0 0 - - -;
  #X floatatom 359 161 3 0 0 0 - - -;
  #X floatatom 395 161 3 0 0 0 - - -;
  #X floatatom 431 161 3 0 0 0 - - -;
  #X text 281 160 from;
  #X text 224 236 connections;
  #X text 199 191 on socket;
  #X obj 15 240 mrpeach/str to_symbol;
  #X obj 15 218 mrpeach/str csplit 32;
  #X obj 15 265 mrpeach/str compare GET;
  #X obj 22 282 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
  1;
  #X obj 168 260 mrpeach/str csplit 32;
  #X obj 168 294 mrpeach/str compare /;
  #X obj 175 311 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
  1;
  #X obj 153 339 ;
  #X obj 160 356 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
  1;
  #X obj 153 371 sel 1;
  #X obj 219 343 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
  -1 -1;
  #X msg 115 20 client 1 c:/martin/pd_patches/index.html;
  #X obj 201 399 mrpeach/str to_list Content-Length: 32 53 48 13 10 13
  10;
  #X obj 153 439 prepend 464;
  #X obj 28 705 mrpeach/str to_symbol;
  #X obj 161 705 mrpeach/str to_symbol;
  #X obj 293 705 mrpeach/str to_symbol;
  #X obj 426 705 mrpeach/str to_symbol;
  #X obj 28 726 print a;
  #X obj 161 725 print b;
  #X obj 28 682 mrpeach/str csplit 10;
  #X obj 161 683 mrpeach/str csplit 10;
  #X obj 293 683 mrpeach/str csplit 10;
  #X obj 426 683 mrpeach/str csplit 10;
  #X obj 293 726 print c;
  #X obj 426 726 print d;
  #X obj 27 776 mrpeach/str to_symbol;
  #X obj 160 776 mrpeach/str to_symbol;
  #X obj 292 776 mrpeach/str to_symbol;
  #X obj 425 776 mrpeach/str to_symbol;
  #X obj 27 753 mrpeach/str csplit 10;
  #X obj 160 754 mrpeach/str csplit 10;
  #X obj 292 754 mrpeach/str csplit 10;
  #X obj 425 754 mrpeach/str csplit 10;
  #X obj 27 797 print e;
  #X obj 160 796 print f;
  #X obj 292 797 print g;
  #X obj 425 797 print h;
  #X obj 26 843 mrpeach/str to_symbol;
  #X obj 159 843 mrpeach/str to_symbol;
  #X obj 291 843 mrpeach/str to_symbol;
  #X obj 424 843 mrpeach/str to_symbol;
  #X obj 26 820 mrpeach/str csplit 10;
  #X obj 159 821 mrpeach/str csplit 10;
  #X obj 291 821 mrpeach/str csplit 10;
  #X obj 424 821 mrpeach/str csplit 10;
  #X obj 26 864 print i;
  #X obj 159 863 print j;
  #X obj 291 864 print k;
  #X obj 424 864 print l;
  #X obj 366 373 prepend 388;
  #X obj 378 312 mrpeach/str to_list HTTP/1.1 32 50 48 48 32 OK 13 10
  Content-Length: 32 50 49 56 13 10 13 10;
  #X obj 400 254 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
  -1 -1;
  #X msg 510 33 disconnectsocket \$1;
  #X msg 407 60 disconnectclient \$1;
  #X floatatom 429 -8 5 0 0 0 - - -;
  #X obj 407 11 f;
  #X obj 407 -8 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699
  -241291
  -1;
  #X floatatom 532 -8 5 0 0 0 - - -;
  #X obj 510 11 f;
  #X obj 510 -8 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699
  -241291
  -1;
  #X text 378 -27 disconnect by socket or client number;
  #X msg 352 212 set \$1;
  #X obj 321 446 t b b b;
  #X obj 360 468 f;
  #X obj 393 468 + 1;
  #X obj 360 488 i;
  #X obj 360 508 mrpeach/str to_list;
  #X obj 360 530 print count;
  #X floatatom 308 529 5 0 0 0 - - -;
  #X connect 0 0 12 0;
  #X connect 0 0 31 0;
  #X connect 0 1 1 0;
  #X connect 0 2 2 

Re: [PD] pd to webpage

2007-10-18 Thread Thomas O Fredericks
The help is in moocow/pdstring-help.pd

Tom


On 10/18/07, Martin Peach [EMAIL PROTECTED] wrote:

 Thomas O Fredericks wrote:

 What is the difference between [str] and [any2string]?

 I don't know. I can't find the help file for [any2string] so I don't know
 how to use it. Maybe I have to look at the source code?

 If I understand correctly str is a wrapper for standard string functions
 and
 it's output is a pointer to a string.

 More or less true. There are also functions to output the string as bytes
 or
 symbols.

 I believe this approach is more limited that using any2string because all
 basic string functions can be recreated once a symbol is converted to a
 series of bytes. For example, to split a string along a space character
 you
 can use [list split 32], but with the [str] architecture, you need to use
 [str csplit 32].

 That's one more character to type ;)
 If the web page patch could be done with [any2string] and [list] then
 sure.
 When I did the string stuff I was not aware of any other way of
 manipulating
 arbitrary lists of bytes. Pd tries to interpret anything you type and some
 characters don't get through unmangled. Even with the [str] object you
 have
 to specify them by ascii code.

 Martin



 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-18 Thread Thomas O Fredericks
The main difference is that moocow's conversion of a message into a string
appends a 0 at the end of the created list.


Tom

On 10/18/07, Thomas O Fredericks [EMAIL PROTECTED] wrote:

 The help is in moocow/pdstring-help.pd

 Tom


 On 10/18/07, Martin Peach [EMAIL PROTECTED]  wrote:
 
  Thomas O Fredericks wrote:
 
  What is the difference between [str] and [any2string]?
 
  I don't know. I can't find the help file for [any2string] so I don't
  know
  how to use it. Maybe I have to look at the source code?
 
  If I understand correctly str is a wrapper for standard string
  functions
  and
  it's output is a pointer to a string.
 
  More or less true. There are also functions to output the string as
  bytes or
  symbols.
 
  I believe this approach is more limited that using any2string because
  all
  basic string functions can be recreated once a symbol is converted to a
  series of bytes. For example, to split a string along a space character
  you
  can use [list split 32], but with the [str] architecture, you need to
  use
  [str csplit 32].
 
  That's one more character to type ;)
  If the web page patch could be done with [any2string] and [list] then
  sure.
  When I did the string stuff I was not aware of any other way of
  manipulating
  arbitrary lists of bytes. Pd tries to interpret anything you type and
  some
  characters don't get through unmangled. Even with the [str] object you
  have
  to specify them by ascii code.
 
  Martin
 
 
 
  ___
  PD-list@iem.at mailing list
  UNSUBSCRIBE and account-management - 
  http://lists.puredata.info/listinfo/pd-list
 
 


___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-18 Thread IOhannes m zmoelnig
Thomas O Fredericks wrote:
 The main difference is that moocow's conversion of a message into a
 string appends a 0 at the end of the created list.

which is not true any more with recent versions of pdstring.

the main difference still is, that str requires a patched version of Pd.


fmard
IOhannes

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-18 Thread Martin Peach
Thomas O Fredericks wrote:

The help is in moocow/pdstring-help.pd

It's not there in the autobuilt Pd version 0.40.3-extended-20070905 even 
though any2string is there in extra/flatspace, but I found it in cvs. I'll 
see if I can do the webserver with it.

Martin



Tom


On 10/18/07, Martin Peach [EMAIL PROTECTED] wrote:
 
  Thomas O Fredericks wrote:
 
  What is the difference between [str] and [any2string]?
 
  I don't know. I can't find the help file for [any2string] so I don't 
know
  how to use it. Maybe I have to look at the source code?
 
  If I understand correctly str is a wrapper for standard string 
functions
  and
  it's output is a pointer to a string.
 
  More or less true. There are also functions to output the string as 
bytes
  or
  symbols.
 
  I believe this approach is more limited that using any2string because 
all
  basic string functions can be recreated once a symbol is converted to a
  series of bytes. For example, to split a string along a space character
  you
  can use [list split 32], but with the [str] architecture, you need to 
use
  [str csplit 32].
 
  That's one more character to type ;)
  If the web page patch could be done with [any2string] and [list] then
  sure.
  When I did the string stuff I was not aware of any other way of
  manipulating
  arbitrary lists of bytes. Pd tries to interpret anything you type and 
some
  characters don't get through unmangled. Even with the [str] object you
  have
  to specify them by ascii code.
 
  Martin
 
 
 
  ___
  PD-list@iem.at mailing list
  UNSUBSCRIBE and account-management -
  http://lists.puredata.info/listinfo/pd-list
 



___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-18 Thread IOhannes m zmoelnig
Bryan Jurish wrote:
 run.  Hopefully, at some point I'll be able to implement [any2string]
 and [string2any] as simple wrappers around [str], but I haven't gotten
 around to trying it yet ;-)

in the meantime, could you have a look at my last bugreport on pdstrings?

fmg.asdr
IOhannes

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-18 Thread Mathieu Bouchard

On Thu, 18 Oct 2007, Thomas O Fredericks wrote:


The main difference is that moocow's conversion of a message into a string
appends a 0 at the end of the created list.


Most likely it shouldn't, unless it uses the 0 as separator or terminator 
in what could be any number of strings in the same message.


If the intent is that there can only be one string per list, then the 0 is 
superfluous, as in pd, a list knows its own length, which is usually not 
the case in C/C++, and which is the reason for the terminator. This reason 
does not exist in Pd nor most other programming languages.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-18 Thread Thomas O Fredericks
Attached, two abstractions that can help. Feel free to modify.

Tom

On 10/18/07, Martin Peach [EMAIL PROTECTED] wrote:

 Thomas O Fredericks wrote:

 The help is in moocow/pdstring-help.pd

 It's not there in the autobuilt Pd version 0.40.3-extended-20070905 even
 though any2string is there in extra/flatspace, but I found it in cvs. I'll
 see if I can do the webserver with it.

 Martin


 
 Tom
 
 
 On 10/18/07, Martin Peach [EMAIL PROTECTED] wrote:
  
   Thomas O Fredericks wrote:
  
   What is the difference between [str] and [any2string]?
  
   I don't know. I can't find the help file for [any2string] so I don't
 know
   how to use it. Maybe I have to look at the source code?
  
   If I understand correctly str is a wrapper for standard string
 functions
   and
   it's output is a pointer to a string.
  
   More or less true. There are also functions to output the string as
 bytes
   or
   symbols.
  
   I believe this approach is more limited that using any2string because
 all
   basic string functions can be recreated once a symbol is converted to
 a
   series of bytes. For example, to split a string along a space
 character
   you
   can use [list split 32], but with the [str] architecture, you need to
 use
   [str csplit 32].
  
   That's one more character to type ;)
   If the web page patch could be done with [any2string] and [list] then
   sure.
   When I did the string stuff I was not aware of any other way of
   manipulating
   arbitrary lists of bytes. Pd tries to interpret anything you type and
 some
   characters don't get through unmangled. Even with the [str] object you
   have
   to specify them by ascii code.
  
   Martin
  
  
  
   ___
   PD-list@iem.at mailing list
   UNSUBSCRIBE and account-management -
   http://lists.puredata.info/listinfo/pd-list
  



 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list



list.compare.pd
Description: Binary data


list.compare-help.pd
Description: Binary data


list.split.on
Description: Binary data


list.split.on-help.pd
Description: Binary data
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Patrice Colet
mami music a écrit :
 hi
 i wanna show some data of a pd patch on a webpage, for monitoring 
 remotely what is going on on the patch. It can have a latency when 
 showing on the webpage. and data would be integrer numbers, that can be 
 refreshed every 500 msec.
  
 Im wondering how to create a webpage that receives a remote connection 
 from PD (i have no clue of what sort  [netsend]? or  [osc]?) and using 
 it´s content to update the data on the page. Which is the direction to 
 look for: programming in javascript the code of the webpage? or using 
 some sort of XML or PHP? (which i have no experience at all) is there 
 any starndar way to do this?
  
 thanks for your help
  
  
 daniel

hello, I've looked into it once, and the PHP function fsockopen() should 
be in help for your project, just use netsend netreceive in pd for 
communication.

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Patrice Colet
Patrice Colet a écrit :
 mami music a écrit :
 hi
 i wanna show some data of a pd patch on a webpage, for monitoring 
 remotely what is going on on the patch. It can have a latency when 
 showing on the webpage. and data would be integrer numbers, that can 
 be refreshed every 500 msec.
  
 Im wondering how to create a webpage that receives a remote connection 
 from PD (i have no clue of what sort  [netsend]? or  [osc]?) and using 
 it´s content to update the data on the page. Which is the direction to 
 look for: programming in javascript the code of the webpage? or using 
 some sort of XML or PHP? (which i have no experience at all) is there 
 any starndar way to do this?
  
 thanks for your help
  
  
 daniel
 
 hello, I've looked into it once, and the PHP function fsockopen() should 
 be in help for your project, just use netsend netreceive in pd for 
 communication.
 
you might be interested by this:

http://lists.artengine.ca/pipermail/pdmtl/2004-December/000126.html

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Patrice Colet
mami music a écrit :

 Did you manage to make this system PD-PHP or not yet?
  

  I manage to use PHP for communicating between two computers that use pd.
  One computer is a video server, the other one is an interface client.
  Both allready communicates with OSCs protocol.
I want the server to display on a web page available projects, video 
files, texture images etc..., (also some PHP scripting will certainly be 
a lot easier than using python for doing weird stuff like downloading 
images from google image, or using regex for text to phoneme translation 
...).
  Then instead of using one of the complicated scripting language for 
displaying an interface (tkinter, tcl-tk, PHP-gtk, etc..., I'd just use 
html, php, javascript, and css, which are fairly well documented, and 
less exposed to weird bugs, and safer for a long term project.
  Also it's not complete yet because I'm a noob in all (and maybe at all 
in short) scripting languages, but I always give some tries.
  If you want I'll let you informed by this project. We could share PHP 
scripts etc... through the mailing list, or create a mailing list for that?

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread tim

Hello,

I did something similar with the ncftpput command to [shell].
It may be very un-standard indeed but it worked for me and is quite simple.
The example patch generates a textfile  in your home directory with some 
random data and sends it over ftp.

Then refresh the page in your browser to see the updates...
see http://www.timvets.net/software/pd_ncftpput_example.pd

Tim

mami music wrote:

hi
i wanna show some data of a pd patch on a webpage, for monitoring 
remotely what is going on on the patch. It can have a latency when 
showing on the webpage. and data would be integrer numbers, that can 
be refreshed every 500 msec.
 
Im wondering how to create a webpage that receives a remote connection 
from PD (i have no clue of what sort  [netsend]? or  [osc]?) and using 
it´s content to update the data on the page. Which is the direction to 
look for: programming in javascript the code of the webpage? or using 
some sort of XML or PHP? (which i have no experience at all) is there 
any starndar way to do this?
 
thanks for your help
 
 
daniel



___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list
  


#N canvas 28 31 710 571 10;
#X obj 192 297 shell;
#X obj 192 329 print;
#X obj 106 65 until;
#X msg 106 41 500;
#X msg 106 205 add2 \$1;
#X obj 106 412 textfile;
#X obj 103 -15 t b b b b;
#X obj 103 -45 metro 2;
#X msg 170 17 set;
#X obj 103 -66 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X text 138 -112 this uploads a new version of a test file to;
#X text 256 197 the program ncftp must be installed;
#X text 250 216 (on ubuntu: sudo apt-get install ncftp);
#X obj 106 115 sel 0 1 2 3 4 5 6 7;
#X obj 106 91 random 8;
#X obj 106 179 symbol;
#X msg 144 147 u;
#X msg 178 147 u;
#X msg 214 147 u;
#X msg 249 148 n;
#X msg 286 149 n;
#X msg 323 149 h;
#X msg 357 149 u;
#X msg 106 148 h;
#X text 138 -72 every 20 seconds \, using ncftpput;
#X text 140 -93 the specified location;
#X msg 192 243 ncftpput -u username -p password remote_site 
remote_folder
local_file;
#X msg 125 373 write /home/testpdftp.txt;
#X text 604 248  adapt !;
#X text 308 413 example at www.timvets.net/testpdftp.txt;
#X connect 0 0 1 0;
#X connect 2 0 14 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 6 0 26 0;
#X connect 6 1 27 0;
#X connect 6 2 3 0;
#X connect 6 3 8 0;
#X connect 7 0 6 0;
#X connect 8 0 5 0;
#X connect 9 0 7 0;
#X connect 13 0 23 0;
#X connect 13 1 16 0;
#X connect 13 2 17 0;
#X connect 13 3 18 0;
#X connect 13 4 19 0;
#X connect 13 5 20 0;
#X connect 13 6 21 0;
#X connect 13 7 22 0;
#X connect 14 0 13 0;
#X connect 15 0 4 0;
#X connect 16 0 15 0;
#X connect 17 0 15 0;
#X connect 18 0 15 0;
#X connect 19 0 15 0;
#X connect 20 0 15 0;
#X connect 21 0 15 0;
#X connect 22 0 15 0;
#X connect 23 0 15 0;
#X connect 26 0 0 0;
#X connect 27 0 5 0;
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Martin Peach

mami music wrote:

hi
i wanna show some data of a pd patch on a webpage, for monitoring remotely
what is going on on the patch. It can have a latency when showing on the
webpage. and data would be integrer numbers, that can be refreshed every 
500

msec.

Im wondering how to create a webpage that receives a remote connection from
PD (i have no clue of what sort  [netsend]? or  [osc]?) and using it´s
content to update the data on the page. Which is the direction to look for:
programming in javascript the code of the webpage? or using some sort of 
XML

or PHP? (which i have no experience at all) is there any starndar way to do
this?


It's also possible to have pd generate the webpage directly, using 
[tcpserver].


Martin



___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread mami music
2007/10/17, Martin Peach [EMAIL PROTECTED]:

 mami music wrote:
 hi
 i wanna show some data of a pd patch on a webpage, for monitoring
 remotely
 what is going on on the patch. It can have a latency when showing on the
 webpage. and data would be integrer numbers, that can be refreshed every
 500
 msec.
 
 Im wondering how to create a webpage that receives a remote connection
 from
 PD (i have no clue of what sort  [netsend]? or  [osc]?) and using it´s
 content to update the data on the page. Which is the direction to look
 for:
 programming in javascript the code of the webpage? or using some sort of
 XML
 or PHP? (which i have no experience at all) is there any starndar way to
 do
 this?

 It's also possible to have pd generate the webpage directly, using
 [tcpserver].

 Martin




 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Hans-Christoph Steiner

On Oct 17, 2007, at 1:30 PM, Martin Peach wrote:

 mami music wrote:
 hi
 i wanna show some data of a pd patch on a webpage, for monitoring  
 remotely
 what is going on on the patch. It can have a latency when showing  
 on the
 webpage. and data would be integrer numbers, that can be refreshed  
 every 500
 msec.

 Im wondering how to create a webpage that receives a remote  
 connection from
 PD (i have no clue of what sort  [netsend]? or  [osc]?) and using  
 it´s
 content to update the data on the page. Which is the direction to  
 look for:
 programming in javascript the code of the webpage? or using some  
 sort of XML
 or PHP? (which i have no experience at all) is there any starndar  
 way to do
 this?

 It's also possible to have pd generate the webpage directly, using  
 [tcpserver].

That would be awesome, are there any working examples of htis?

.hc


 Martin



 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
 listinfo/pd-list


 


Access to computers should be unlimited and total.  - the hacker ethic



___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Martin Peach

Hans-Christoph Steiner wrote:

On Oct 17, 2007, at 1:30 PM, Martin Peach wrote:

 mami music wrote:
 hi
 i wanna show some data of a pd patch on a webpage, for monitoring
 remotely
 what is going on on the patch. It can have a latency when showing
 on the
 webpage. and data would be integrer numbers, that can be refreshed
 every 500
 msec.

 Im wondering how to create a webpage that receives a remote
 connection from
 PD (i have no clue of what sort  [netsend]? or  [osc]?) and using
 it´s
 content to update the data on the page. Which is the direction to
 look for:
 programming in javascript the code of the webpage? or using some
 sort of XML
 or PHP? (which i have no experience at all) is there any starndar
 way to do
 this?

 It's also possible to have pd generate the webpage directly, using
 [tcpserver].

That would be awesome, are there any working examples of htis?



I have a minimal hello world from pd example, on another machine of 
course. I'll post the patch as soon as I find it...


Martin



___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Martin Peach
Here's my unfinished attempt at a web server. It will send a file 
index.html to a browser. It uses the string patch to pd and the str 
object, which can handle ascii without pd interpreting it along the way. It 
may be possible to do it using other objects. The main problem is the 
detection of  special characters like CRLF in the request. The 
content-length field is not necessary if you close the connection after 
sending the data, so you don't need to know how long the data is going to be 
before you start. I think I have done that in a later version that I can't 
find right now...Obviously the index.html file could also be generated by 
pd, and then it would all be more interesting.


Martin


#N canvas 539 0 727 919 10;
#X obj 104 61 mrpeach/tcpserver 80;
#X floatatom 171 237 5 0 0 0 - - -;
#X floatatom 286 191 5 0 0 0 - - -;
#X obj 324 138 unpack 0 0 0 0;
#X floatatom 324 161 3 0 0 0 - - -;
#X floatatom 359 161 3 0 0 0 - - -;
#X floatatom 395 161 3 0 0 0 - - -;
#X floatatom 431 161 3 0 0 0 - - -;
#X text 281 160 from;
#X text 224 236 connections;
#X text 199 191 on socket;
#X obj 15 240 mrpeach/str to_symbol;
#X obj 15 218 mrpeach/str csplit 32;
#X obj 15 265 mrpeach/str compare GET;
#X obj 22 282 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 168 260 mrpeach/str csplit 32;
#X obj 168 294 mrpeach/str compare /;
#X obj 175 311 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 153 339 ;
#X obj 160 356 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 153 371 sel 1;
#X obj 219 343 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X msg 115 20 client 1 c:/martin/pd_patches/index.html;
#X obj 201 399 mrpeach/str to_list Content-Length: 32 53 48 13 10 13
10;
#X obj 153 439 prepend 464;
#X obj 28 705 mrpeach/str to_symbol;
#X obj 161 705 mrpeach/str to_symbol;
#X obj 293 705 mrpeach/str to_symbol;
#X obj 426 705 mrpeach/str to_symbol;
#X obj 28 726 print a;
#X obj 161 725 print b;
#X obj 28 682 mrpeach/str csplit 10;
#X obj 161 683 mrpeach/str csplit 10;
#X obj 293 683 mrpeach/str csplit 10;
#X obj 426 683 mrpeach/str csplit 10;
#X obj 293 726 print c;
#X obj 426 726 print d;
#X obj 27 776 mrpeach/str to_symbol;
#X obj 160 776 mrpeach/str to_symbol;
#X obj 292 776 mrpeach/str to_symbol;
#X obj 425 776 mrpeach/str to_symbol;
#X obj 27 753 mrpeach/str csplit 10;
#X obj 160 754 mrpeach/str csplit 10;
#X obj 292 754 mrpeach/str csplit 10;
#X obj 425 754 mrpeach/str csplit 10;
#X obj 27 797 print e;
#X obj 160 796 print f;
#X obj 292 797 print g;
#X obj 425 797 print h;
#X obj 26 843 mrpeach/str to_symbol;
#X obj 159 843 mrpeach/str to_symbol;
#X obj 291 843 mrpeach/str to_symbol;
#X obj 424 843 mrpeach/str to_symbol;
#X obj 26 820 mrpeach/str csplit 10;
#X obj 159 821 mrpeach/str csplit 10;
#X obj 291 821 mrpeach/str csplit 10;
#X obj 424 821 mrpeach/str csplit 10;
#X obj 26 864 print i;
#X obj 159 863 print j;
#X obj 291 864 print k;
#X obj 424 864 print l;
#X obj 366 373 prepend 388;
#X obj 378 312 mrpeach/str to_list HTTP/1.1 32 50 48 48 32 OK 13 10
Content-Length: 32 50 49 56 13 10 13 10;
#X obj 400 254 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X msg 510 33 disconnectsocket \$1;
#X msg 407 60 disconnectclient \$1;
#X floatatom 429 -8 5 0 0 0 - - -;
#X obj 407 11 f;
#X obj 407 -8 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699 -241291
-1;
#X floatatom 532 -8 5 0 0 0 - - -;
#X obj 510 11 f;
#X obj 510 -8 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699 -241291
-1;
#X text 378 -27 disconnect by socket or client number;
#X msg 352 212 set \$1;
#X obj 321 446 t b b b;
#X obj 360 468 f;
#X obj 393 468 + 1;
#X obj 360 488 i;
#X obj 360 508 mrpeach/str to_list;
#X obj 360 530 print count;
#X floatatom 308 529 5 0 0 0 - - -;
#X connect 0 0 12 0;
#X connect 0 0 31 0;
#X connect 0 1 1 0;
#X connect 0 2 2 0;
#X connect 0 2 73 0;
#X connect 0 2 69 0;
#X connect 0 3 3 0;
#X connect 3 0 4 0;
#X connect 3 1 5 0;
#X connect 3 2 6 0;
#X connect 3 3 7 0;
#X connect 11 0 13 0;
#X connect 12 0 11 0;
#X connect 12 1 15 0;
#X connect 13 0 14 0;
#X connect 13 0 18 0;
#X connect 15 0 16 0;
#X connect 16 0 18 1;
#X connect 16 0 17 0;
#X connect 18 0 19 0;
#X connect 18 0 20 0;
#X connect 20 0 74 0;
#X connect 21 0 23 0;
#X connect 22 0 0 0;
#X connect 23 0 24 0;
#X connect 24 0 0 0;
#X connect 25 0 29 0;
#X connect 26 0 30 0;
#X connect 27 0 35 0;
#X connect 28 0 36 0;
#X connect 31 0 25 0;
#X connect 31 1 32 0;
#X connect 32 0 26 0;
#X connect 32 1 33 0;
#X connect 33 0 27 0;
#X connect 33 1 34 0;
#X connect 34 0 28 0;
#X connect 34 1 41 0;
#X connect 37 0 45 0;
#X connect 38 0 46 0;
#X connect 39 0 47 0;
#X connect 40 0 48 0;
#X connect 41 0 37 0;
#X connect 41 1 42 0;
#X connect 42 0 38 0;
#X connect 42 1 43 0;
#X connect 43 0 39 0;
#X connect 43 1 44 0;
#X connect 44 0 40 0;
#X connect 44 1 53 0;
#X connect 49 0 57 0;
#X connect 50 0 58 0;
#X connect 51 0 59 0;
#X connect 52 0 60 0;
#X connect 53 0 49 0;
#X connect 53 1 54 0;
#X connect 54 0 50 0;
#X 

Re: [PD] pd to webpage

2007-10-17 Thread marius schebella
seems like mrpeach is not fully included in pd-extended or at least 
[str] is missing. is this an abstraction or a library?
marius.

Martin Peach wrote:
 Here's my unfinished attempt at a web server. It will send a file 
 index.html to a browser. It uses the string patch to pd and the str 
 object, which can handle ascii without pd interpreting it along the way. 
 It may be possible to do it using other objects. The main problem is the 
 detection of  special characters like CRLF in the request. The 
 content-length field is not necessary if you close the connection after 
 sending the data, so you don't need to know how long the data is going 
 to be before you start. I think I have done that in a later version that 
 I can't find right now...Obviously the index.html file could also be 
 generated by pd, and then it would all be more interesting.
 
 Martin
 
 #N canvas 539 0 727 919 10;
 #X obj 104 61 mrpeach/tcpserver 80;
 #X floatatom 171 237 5 0 0 0 - - -;
 #X floatatom 286 191 5 0 0 0 - - -;
 #X obj 324 138 unpack 0 0 0 0;
 #X floatatom 324 161 3 0 0 0 - - -;
 #X floatatom 359 161 3 0 0 0 - - -;
 #X floatatom 395 161 3 0 0 0 - - -;
 #X floatatom 431 161 3 0 0 0 - - -;
 #X text 281 160 from;
 #X text 224 236 connections;
 #X text 199 191 on socket;
 #X obj 15 240 mrpeach/str to_symbol;
 #X obj 15 218 mrpeach/str csplit 32;
 #X obj 15 265 mrpeach/str compare GET;
 #X obj 22 282 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
 #X obj 168 260 mrpeach/str csplit 32;
 #X obj 168 294 mrpeach/str compare /;
 #X obj 175 311 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
 #X obj 153 339 ;
 #X obj 160 356 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
 #X obj 153 371 sel 1;
 #X obj 219 343 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
 -1 -1;
 #X msg 115 20 client 1 c:/martin/pd_patches/index.html;
 #X obj 201 399 mrpeach/str to_list Content-Length: 32 53 48 13 10 13
 10;
 #X obj 153 439 prepend 464;
 #X obj 28 705 mrpeach/str to_symbol;
 #X obj 161 705 mrpeach/str to_symbol;
 #X obj 293 705 mrpeach/str to_symbol;
 #X obj 426 705 mrpeach/str to_symbol;
 #X obj 28 726 print a;
 #X obj 161 725 print b;
 #X obj 28 682 mrpeach/str csplit 10;
 #X obj 161 683 mrpeach/str csplit 10;
 #X obj 293 683 mrpeach/str csplit 10;
 #X obj 426 683 mrpeach/str csplit 10;
 #X obj 293 726 print c;
 #X obj 426 726 print d;
 #X obj 27 776 mrpeach/str to_symbol;
 #X obj 160 776 mrpeach/str to_symbol;
 #X obj 292 776 mrpeach/str to_symbol;
 #X obj 425 776 mrpeach/str to_symbol;
 #X obj 27 753 mrpeach/str csplit 10;
 #X obj 160 754 mrpeach/str csplit 10;
 #X obj 292 754 mrpeach/str csplit 10;
 #X obj 425 754 mrpeach/str csplit 10;
 #X obj 27 797 print e;
 #X obj 160 796 print f;
 #X obj 292 797 print g;
 #X obj 425 797 print h;
 #X obj 26 843 mrpeach/str to_symbol;
 #X obj 159 843 mrpeach/str to_symbol;
 #X obj 291 843 mrpeach/str to_symbol;
 #X obj 424 843 mrpeach/str to_symbol;
 #X obj 26 820 mrpeach/str csplit 10;
 #X obj 159 821 mrpeach/str csplit 10;
 #X obj 291 821 mrpeach/str csplit 10;
 #X obj 424 821 mrpeach/str csplit 10;
 #X obj 26 864 print i;
 #X obj 159 863 print j;
 #X obj 291 864 print k;
 #X obj 424 864 print l;
 #X obj 366 373 prepend 388;
 #X obj 378 312 mrpeach/str to_list HTTP/1.1 32 50 48 48 32 OK 13 10
 Content-Length: 32 50 49 56 13 10 13 10;
 #X obj 400 254 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
 -1 -1;
 #X msg 510 33 disconnectsocket \$1;
 #X msg 407 60 disconnectclient \$1;
 #X floatatom 429 -8 5 0 0 0 - - -;
 #X obj 407 11 f;
 #X obj 407 -8 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699 -241291
 -1;
 #X floatatom 532 -8 5 0 0 0 - - -;
 #X obj 510 11 f;
 #X obj 510 -8 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699 -241291
 -1;
 #X text 378 -27 disconnect by socket or client number;
 #X msg 352 212 set \$1;
 #X obj 321 446 t b b b;
 #X obj 360 468 f;
 #X obj 393 468 + 1;
 #X obj 360 488 i;
 #X obj 360 508 mrpeach/str to_list;
 #X obj 360 530 print count;
 #X floatatom 308 529 5 0 0 0 - - -;
 #X connect 0 0 12 0;
 #X connect 0 0 31 0;
 #X connect 0 1 1 0;
 #X connect 0 2 2 0;
 #X connect 0 2 73 0;
 #X connect 0 2 69 0;
 #X connect 0 3 3 0;
 #X connect 3 0 4 0;
 #X connect 3 1 5 0;
 #X connect 3 2 6 0;
 #X connect 3 3 7 0;
 #X connect 11 0 13 0;
 #X connect 12 0 11 0;
 #X connect 12 1 15 0;
 #X connect 13 0 14 0;
 #X connect 13 0 18 0;
 #X connect 15 0 16 0;
 #X connect 16 0 18 1;
 #X connect 16 0 17 0;
 #X connect 18 0 19 0;
 #X connect 18 0 20 0;
 #X connect 20 0 74 0;
 #X connect 21 0 23 0;
 #X connect 22 0 0 0;
 #X connect 23 0 24 0;
 #X connect 24 0 0 0;
 #X connect 25 0 29 0;
 #X connect 26 0 30 0;
 #X connect 27 0 35 0;
 #X connect 28 0 36 0;
 #X connect 31 0 25 0;
 #X connect 31 1 32 0;
 #X connect 32 0 26 0;
 #X connect 32 1 33 0;
 #X connect 33 0 27 0;
 #X connect 33 1 34 0;
 #X connect 34 0 28 0;
 #X connect 34 1 41 0;
 #X connect 37 0 45 0;
 #X connect 38 0 46 0;
 #X connect 39 0 47 0;
 #X connect 40 0 48 0;
 #X connect 41 0 37 0;
 #X connect 

Re: [PD] pd to webpage

2007-10-17 Thread Patrice Colet
hi!

marius schebella a écrit :
 seems like mrpeach is not fully included in pd-extended or at least 
 [str] is missing. is this an abstraction or a library?
 marius.

this is a library available in cvs and compilation is working greatly, :)


___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Hans-Christoph Steiner

This is very cool, keep us posted on your progress!  I am thinking of  
trying to write an IRC client in Pd.  Then there could be an embedded  
IRC client in Pd-extended that is tied into the help system.  You  
click a link on a help patch, it opens a chatroom and posts the  
context of the patch to the chatroom.  That would help out the  
newbies, who often have trouble knowing what to ask.

.hc

On Oct 17, 2007, at 2:53 PM, Martin Peach wrote:

 Here's my unfinished attempt at a web server. It will send a file  
 index.html to a browser. It uses the string patch to pd and the  
 str object, which can handle ascii without pd interpreting it along  
 the way. It may be possible to do it using other objects. The main  
 problem is the detection of  special characters like CRLF in the  
 request. The content-length field is not necessary if you close the  
 connection after sending the data, so you don't need to know how  
 long the data is going to be before you start. I think I have done  
 that in a later version that I can't find right now...Obviously the  
 index.html file could also be generated by pd, and then it would  
 all be more interesting.

 Martin

 web_server.pd
 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
 listinfo/pd-list



 


[W]e have invented the technology to eliminate scarcity, but we are  
deliberately throwing it away to benefit those who profit from  
scarcity.-John Gilmore



___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd to webpage

2007-10-17 Thread Hans-Christoph Steiner

[str] is only included in 0.40.3 because it needs the string patch to  
pd to work.

.hc

On Oct 17, 2007, at 3:27 PM, marius schebella wrote:

 seems like mrpeach is not fully included in pd-extended or at least
 [str] is missing. is this an abstraction or a library?
 marius.

 Martin Peach wrote:
 Here's my unfinished attempt at a web server. It will send a file
 index.html to a browser. It uses the string patch to pd and the str
 object, which can handle ascii without pd interpreting it along  
 the way.
 It may be possible to do it using other objects. The main problem  
 is the
 detection of  special characters like CRLF in the request. The
 content-length field is not necessary if you close the connection  
 after
 sending the data, so you don't need to know how long the data is  
 going
 to be before you start. I think I have done that in a later  
 version that
 I can't find right now...Obviously the index.html file could also be
 generated by pd, and then it would all be more interesting.

 Martin

 #N canvas 539 0 727 919 10;
 #X obj 104 61 mrpeach/tcpserver 80;
 #X floatatom 171 237 5 0 0 0 - - -;
 #X floatatom 286 191 5 0 0 0 - - -;
 #X obj 324 138 unpack 0 0 0 0;
 #X floatatom 324 161 3 0 0 0 - - -;
 #X floatatom 359 161 3 0 0 0 - - -;
 #X floatatom 395 161 3 0 0 0 - - -;
 #X floatatom 431 161 3 0 0 0 - - -;
 #X text 281 160 from;
 #X text 224 236 connections;
 #X text 199 191 on socket;
 #X obj 15 240 mrpeach/str to_symbol;
 #X obj 15 218 mrpeach/str csplit 32;
 #X obj 15 265 mrpeach/str compare GET;
 #X obj 22 282 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
 #X obj 168 260 mrpeach/str csplit 32;
 #X obj 168 294 mrpeach/str compare /;
 #X obj 175 311 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
 #X obj 153 339 ;
 #X obj 160 356 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
 #X obj 153 371 sel 1;
 #X obj 219 343 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
 -1 -1;
 #X msg 115 20 client 1 c:/martin/pd_patches/index.html;
 #X obj 201 399 mrpeach/str to_list Content-Length: 32 53 48 13 10 13
 10;
 #X obj 153 439 prepend 464;
 #X obj 28 705 mrpeach/str to_symbol;
 #X obj 161 705 mrpeach/str to_symbol;
 #X obj 293 705 mrpeach/str to_symbol;
 #X obj 426 705 mrpeach/str to_symbol;
 #X obj 28 726 print a;
 #X obj 161 725 print b;
 #X obj 28 682 mrpeach/str csplit 10;
 #X obj 161 683 mrpeach/str csplit 10;
 #X obj 293 683 mrpeach/str csplit 10;
 #X obj 426 683 mrpeach/str csplit 10;
 #X obj 293 726 print c;
 #X obj 426 726 print d;
 #X obj 27 776 mrpeach/str to_symbol;
 #X obj 160 776 mrpeach/str to_symbol;
 #X obj 292 776 mrpeach/str to_symbol;
 #X obj 425 776 mrpeach/str to_symbol;
 #X obj 27 753 mrpeach/str csplit 10;
 #X obj 160 754 mrpeach/str csplit 10;
 #X obj 292 754 mrpeach/str csplit 10;
 #X obj 425 754 mrpeach/str csplit 10;
 #X obj 27 797 print e;
 #X obj 160 796 print f;
 #X obj 292 797 print g;
 #X obj 425 797 print h;
 #X obj 26 843 mrpeach/str to_symbol;
 #X obj 159 843 mrpeach/str to_symbol;
 #X obj 291 843 mrpeach/str to_symbol;
 #X obj 424 843 mrpeach/str to_symbol;
 #X obj 26 820 mrpeach/str csplit 10;
 #X obj 159 821 mrpeach/str csplit 10;
 #X obj 291 821 mrpeach/str csplit 10;
 #X obj 424 821 mrpeach/str csplit 10;
 #X obj 26 864 print i;
 #X obj 159 863 print j;
 #X obj 291 864 print k;
 #X obj 424 864 print l;
 #X obj 366 373 prepend 388;
 #X obj 378 312 mrpeach/str to_list HTTP/1.1 32 50 48 48 32 OK 13 10
 Content-Length: 32 50 49 56 13 10 13 10;
 #X obj 400 254 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
 -1 -1;
 #X msg 510 33 disconnectsocket \$1;
 #X msg 407 60 disconnectclient \$1;
 #X floatatom 429 -8 5 0 0 0 - - -;
 #X obj 407 11 f;
 #X obj 407 -8 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699  
 -241291
 -1;
 #X floatatom 532 -8 5 0 0 0 - - -;
 #X obj 510 11 f;
 #X obj 510 -8 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699  
 -241291
 -1;
 #X text 378 -27 disconnect by socket or client number;
 #X msg 352 212 set \$1;
 #X obj 321 446 t b b b;
 #X obj 360 468 f;
 #X obj 393 468 + 1;
 #X obj 360 488 i;
 #X obj 360 508 mrpeach/str to_list;
 #X obj 360 530 print count;
 #X floatatom 308 529 5 0 0 0 - - -;
 #X connect 0 0 12 0;
 #X connect 0 0 31 0;
 #X connect 0 1 1 0;
 #X connect 0 2 2 0;
 #X connect 0 2 73 0;
 #X connect 0 2 69 0;
 #X connect 0 3 3 0;
 #X connect 3 0 4 0;
 #X connect 3 1 5 0;
 #X connect 3 2 6 0;
 #X connect 3 3 7 0;
 #X connect 11 0 13 0;
 #X connect 12 0 11 0;
 #X connect 12 1 15 0;
 #X connect 13 0 14 0;
 #X connect 13 0 18 0;
 #X connect 15 0 16 0;
 #X connect 16 0 18 1;
 #X connect 16 0 17 0;
 #X connect 18 0 19 0;
 #X connect 18 0 20 0;
 #X connect 20 0 74 0;
 #X connect 21 0 23 0;
 #X connect 22 0 0 0;
 #X connect 23 0 24 0;
 #X connect 24 0 0 0;
 #X connect 25 0 29 0;
 #X connect 26 0 30 0;
 #X connect 27 0 35 0;
 #X connect 28 0 36 0;
 #X connect 31 0 25 0;
 #X connect 31 1 32 0;
 #X connect 32 0 26 0;
 #X connect 32 1 33 0;
 #X connect 33 0 27 0;
 #X connect 33 1 34 0;
 #X connect 34 0