[home]

[sounds]

[code]

[words]

[me]


Web2OSC
Download now
(zipped archive)

Release 0.5 Alpha (August 31, 2001) under the GNU Public License:

This is the first public release of Web2OSC. It's pretty ugly, but it works for what it was designed to do, namely sending data from a Web page to MAX. Eventually it should work with any OSC (OpenSoundControl) addressable client (i.e. SuperCollider, jMax, Pd), but it has only been tested with MAX thus far.

Web2OSC comes in a number of pieces. There is an HTML / JavaScript component (Web2OSC.html), a Java Applet (Web2OSClet.java), and a Java Application (Web2OSC.java). I have also provided a sample Flash object (TestButton) that interfaces with JavaScript for enhanced interactivity, and a sample MAX object (TestRead) that shows how to receive data using OSC and otudp.


Documentation

Web2OSC.html demonstrates how to add support for Web2OSC into your own Web pages. It is reasonably concise and self-explanatory, but requires some understanding of JavaScript functions and the DOM (Document Object Model).

Web2OSClet.java relays data from the browser to the server. You must change the default destination IP and recompile or it will not work (unless your browser and Web server are running on the same machine). You'll need the appropriate JDK (Java Development Kit) for your platform to accomplish this.

Web2OSC.java must run as a Java console application on the Web server delivering the interactive pages. At a minimum you'll need the appropriate JRE (Java Runtime Environment), but you'll probably want to recompile with the JDK anyway. Arguments are passed on the command line in the form

java Web2OSC 127.0.0.1 7777 128

where "127.0.0.1" is the IP address of your machine running MAX, "7777" is the port number that machine is listening on (e.g. the object [otudp read 7777]), and "128" is the UDP buffer size. These are the defaults if not specified otherwise.

rtIPTime.java is a parallel Java console application needed for the routing of IP and time information if that is desired. Its default command line would be

java rtIPTime 127.0.0.1 7778 128


System Requirements

The system requirements are basically outlined above: a Web server (any Java-compatible platform will do), a Macintosh running MAX from Cycling '74, and a Web browser that supports LiveConnect (tested with Netscape 3.x/4.x/6.x, IE/Win 4.x/5.x -- IE/Mac is sadly broken). The OSC/otudp MAX objects from UC Berkeley CNMAT are also necessary.


Work in Progress

I consider this current version nominally functional, and at least stable in fairly rigorous testing and use. I am working towards a more usable release, but right now it's lying around in a million tiny pieces. My objectives prior to going Beta:

1. Clean up and document code.
2. Generalize data-handling to minimize hard-coded parameters
3. Consolidate rtIPTime and Web2OSC into one application.
4. Write a thoroughly compliant interface to OSC.
5. Provide a GUI for the server application.
6. Enable multiple incoming ports and destinations.

I have some longer-range goals that might be 1.0 or maybe 2.0 features, depending on how much interest, feedback, and assistance I get:

7. Implement interference compensation (error-correction/handshaking).
8. Work with CNMAT to develop an OTTCP alternative.
9. Preserve message-ordering and facilitate time-sensitive interaction.
10. Enable bi-directional communication between MAX<-->Browser.
11. Interoperate with Pd, jMax, SuperCollider, etc.


If you have any questions, comments, or concerns, please don't hesitate to e-mail me. Thanks for your interest. Have fun!