work with mark: istreet - online

taking the intelligent street project further, mark d'inverno wanted me to try to get it online. the idea was to let people surf to a webpage, send commands to a running istreet system and hopefully collaborate with other online users to compose music. just like in the original sms-version of the piece, everybody could make changes to the same music and the result would be streamed back to all the online users.

the first prototype was easy to get up and running. we decided to use processing and write a java applet for the web user-interface and then stream the audio back with shoutcast. the users would listen to the music through itunes, winamp or some similar program. this of course introduced quite a delay before they could actually hear their changes to the music. but that was not all too bad as we had designed the original istreet in a way that latency was part of the user experience :-)
(the commands sent there via sms took approx 30 sec to reach us from the vodafone server and that could not be sped up. the users were given no instant control over the music - rather they could nudge it in some direction with their commands.)
so our internet radio/shoutcast solution worked just fine and we had it up and running for a short while from mark's house in london.

that was a total homebrewn solution of course. we wanted it to handle a lot of visitors, deal with some hopefully high traffic, be more stable, permanent and not run on an adsl connection.
so at UoW we got access to a os x server cluster and i started to plan how to install supercollider, a webserver and istreet on that. little did i know about servers, network and security and i had to learn ssh and emacs to get somewhere. rob saunders helped me a lot here.

then there were some major obstacles. first of all the cluster didn't have any window manager installed - not even x11. i spent many days getting supercollider and stefan kersten's emacs interface for sclang called scel to compile.
we also had some minor issues with starting the webserver and punching hole in the university firewall etc. but the major problem turned out to be to get the audio streaming going. i didn't have root access and wasn't allowed to install jack on the cluster. to stream i needed a shoutcast client and some way to get audio to that from supercollider. i did find os x programs that could have worked but none would run windowless on the console. so stuck.

the only solution was to write my own streaming mechanism. the resulting supercollider class for segmenting audio into mp3s is here. a java gateway handled the communication between sc and the java applet that would stitch these files back together. (the java gateway program also distributed all the other network data like the chat, checking online users, pending/playing commands etc. it used NetUtil by sciss).

unfortunately i never got the streaming thing to run smoothly. nasty hickups in the sound made it impossible to listen to. the hickups were probably partly due to my crappy coding but i think the main error was in the ESS library for processing. either ESS (releases 1 and 2) can't do asynchronous loading or java is just too slow to load mp3s without dropping audio playback. very annoying.
after that defeat i also spent time with flash and did a little player there that could load and play back mp3s smoothly. with the help from my flash expert friend abe we also could talk to the flash thing from my java applet via javascript. but time ran out and this would have been a too complicated system anyway.

so the istreet never made it online. but again i learned a lot about networks, unix, java and some tools got developed in the process. RedGUI - a set of user-interface classes for processing, ISRecord and ISGateway for sc, and the ISgateway.java.

screenshot of the java applet running istreet online...