[PD] Sending OSC packets with a php script

patco megalegoland at yahoo.fr
Sat Jul 1 11:27:27 CEST 2006


Hello, I've found this php script for sending OSC packets:
  
  http://www.a2hd.com/software/OSC.phps
  
  i've modified the test (at the end of the script) for avoiding errors:
  _____________________________________________________
  
  /** Run some tests to make sure the library behaves in a sane way.
    */
  function test_osc_lib() {
  
      $c = new OSCClient();
      $c->set_destination("localhost", 3333);
      /**
      $m1 = new OSCMessage("/test", array(new Timetag(3294967295, 5), new Infinitum(), new Blob("aoeuaoeu!")));
      $m1->add_arg(28658.93, "d");
      */
      $m2 = new OSCMessage("/bar", array(test, one, two));
  
      $b = new OSCBundle();
      $b->add_datagram($m1);
      $b->add_datagram($m2);
  
      $b2 = new OSCBundle(array($m1, $b));
  
      //echo $b2->get_human_readable();
  
      //echo $m1->get_human_readable();
  
      $c->send($m2);
  
  }
  
  // Uncomment to run the test
   test_osc_lib();
  
  ?>
  ___________________________________________________
  
  
  For testing it, just load attached patch and
  
  run the PHP script with a server that allows socket_create()
  
  Patco.
  
  
  

 		
---------------------------------
 Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060701/1d8f1cab/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: OSC-php.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060701/1d8f1cab/attachment.txt>


More information about the Pd-list mailing list