Hi,
I've just been messing around with netreceive, and it seems fairly easy:
Just insert a netreceive object in your patch [netreceive portnum]
Connect it however you want
On the web server, install a script that opens a tcp connection to your PD server
Print regular PD messages (bang, float, etc) to the tcp connection.
I used Perl to send a numerical value to PD, which PD would then display in a numbox. The PD patch was simply:
[netreceive 3000] | NUMBOX
And the Perl script read:
#!/usr/bin/perl
use IO::Socket;
$socket = new IO::Socket::INET (PeerAddr => "192.168.123.76", PeerPort => 3000, Proto => "tcp", Type => SOCK_STREAM) or die "Can't connect $!\n"; print $socket $ARGV[0] # this sends whatever command line argument you # pass to the script to PD. Spiffy print $socket ";"; # ; is PD's newline character. Don't forget # to send this, or it won't work
On Tue, Jul 22, 2003 at 03:51:59PM +0100, Martin Dupras wrote:
Hi,
I have done this in the past, using PHP and the netreceive object in PD. If your server has php installed, it's a very easy solution. Basically in the php code you open a socket, send the data through it and close the socket. All you need to do is make sure that PD is listening on that socket with netreceive.
- martin
On Tue, 2003-07-22 at 15:08, lists@martinmalm.com wrote:
Hi everyone !
I need to control a simple PD patch via a webinterface. Since I know a little bit of Java I would like to use some kind of applet, but I don't know If this is possible ? What other methods / frameworks would work ?
For this installation I only need oneway WEB -> PD, but it would be fun to know how to implement two way comunication also.
I would be really happy if someone who has done stuff like this before could point me in the right direction or maybe provide a simple example.
All the best /
Martin Malm
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list