A (20*2 + 5.1) Speaker System

Overview

For the first project in the series of three, I linked a single video played on the projector with a single audio file played on all the other lab computers. The audio file had a preprocessed fade-in and began it's fade on the introduction of the 'T-1000 Theme.'

This was made possible through AJAX and a single 'data.txt' file which held the current 'refresh code.'

Below is the in-class documentation for the project.


Initial Idea

ActLab Studios Layout

I wanted to implement a sort of "reverse renderfarm" for next projects. I have always been a fan of render-farms, yet the opportunity for me to use them has only arisen twice. I wanted to share my fascination with render-farms with the class.

For this project I was going to have all the computers play a simple audio file in synchronicity. In doing so the room would theoretically have a 55.1 (25 *2 + 5.1) speaker setup (but due to the PC's not having speakers, that number dropped down just a bit). In a way, I was set on doing something like what Joey did by adding a subwoofer for the class usage. Except instead of adding just one speaker, I embarked on a proof-of-concept project to have the final project be a simple system for multi-speaker, multi-computer surround sound.

*Ever since finding out that Weta Digital had this MASSIVE server farm that only processed a handful of frames per second my mind was blown. It is unimaginable to begin to process what the computer had to process: the wind, the fire, the smoke, the actors, the AI moving the actors, the collisions, etc. Since then, I had begun trying to think of other ways that server farms could be used since they seem to have an infinite amount of possibilities tied to them.*

Initial Pseudocode

integer data = 0; while (true) ...check datafile on server ...data = datafile.content ...if (data == "play") ......send trigger to embedded quicktime ......timeout for "data * 1000" milli-seconds loop while

This code was the mock-up that I made as I "doodled" during some classes, meals, and other times throughout the week following the first day of Soundscapes.

1st java.net.URL Version

Code

Data

Error: Javascript was accessing an MS plugin on Macs. That is the most that I could really find about the error that Firefox and Safari were outputting to their consoles. It worked fine on both my PC's Internet Explorer and Firefox, but a quick fix to the pingTimeoutData() code was the only thing that was really needed.

The rest of the code was pretty simple. There was a quicktime movie that sat in the middle of the screen waiting for a play signal and there was the main script that onBodyLoad essentially, gets executed and checks for the number inside data.txt. It is based on this number that the movie clip plays or stops and rewinds.

Do excuse what may seem as messy code, I was still testing the features essentially in this actual developmental snapshot. This is why lines that should have been deleted are just commented out for comparison and lines that should still be there are commented out for bug-finding. There may also seem to be a random textbox that is being written to, but this is for debugging purposes to show me that the site is still responding to server data and that the machine is not hung up.

I did choose JavaScript for this project mainly since what I wanted was a simple piece of code that others could simply copy and paste for their own files. I did hear talk of IPs and PHP and timing checks and the such as possible paths for my project, but something like that would be asking for more than was needed, and again, would have complicated for other users. By using a few lines of simple Javascript, I was able to allow the clients request data in a way that was efficient and primarily client-based instead of server-streamed.

2nd XMLHttpRequest Version

Code

Timelags: cs.utexas.edu servers lag up to .5 seconds. I was running my initial website off of The University of Texas at Austin's Computer Science Departmental servers. The servers seemed to work well at times after a couple of refreshes to the site. But even then when I tested the site out on 16 computers in a smaller lab with video, time lags were incredibly noticeable.

At this point it was acceptable if the video lags since my 1st project was not intended for video. If anything, the audio desynchronization would have added to the overall effect as a pseudo-reverb/refraction that would be present in real environments.

I once heard that Crouching Tiger, Hidden Dragon was one of the first movies to add desynchronization to sound to give the film a lively in-room effect which would have been an unintended special feature of my project.

In the event however, that this code was lagging at more than a .5 second window on the CS servers, I chose to add an escape in the code that would redirect the page to my webspace.utexas.edu version of the same site in the event of a last minute scramble.

3rd and Final with Extra Switches

Code

Transfer: actlab.us and added visual cues and split webpages. After the transfer, the website was met with swift server responses for data. This may have to due with the fact that not an entire college was accessing the server, but also the fact that the server is right across the room from the ActLab and that the server may have had different settings. Either way, this still helped tremendously.

I did however need some sort of way to test before the presentation that all the computers were still with me and ensure that the presentation would go smoothly. I implemented a visual cue that would change the bgcolor (the websites background color) from black to blue. This would allow me to see what was happening, but not give away the fact that the computers would play solely audio. The overall plan was to have the projector run the sole video footage and other "slaves" run the audio backup "vocals."

The way I rendered out the files was to have the "master" website play the footage in it's entirety for the projector and the other website for the slaves would play the audio midway through on the T-1000 theme as the liquid-metal begins to reform.

Implementation

MasterPage / SlavePage *See appended note.

T-Shirt View

For my actual presentation I wore my Darth Predatamiator T-shirt that I knew I had purchased for one special purpose. That day was the day. The shirt was used to represent the Skynet-like qualities that the computer lab would soon turn itself into.

I knew that before I actually started the presentation it would be a good idea to run through the lab and make sure all the computers were refreshed to get the best results and make sure none of them had begun to timeout. For this delay I chose "Escape from the Hospital (And T1000)" from the Terminator 2 - Judgment Day: Original Motion Picture Soundtrack to play as a mood enhancer. Instead however, I played the previous track "Sarah on the Run" during this delay. The played track still had more or less the same tone, but with a bit of an ambient edgy, impatient feel.

Once all the computers were set, I dimmed the lights and ran back and forth from one side of the classroom to the other in an effort to show that all that was needed for the presentation was the setup of the projector, and that my laptop, which was running on wireless, was actually controlling the show.

This running also served the double purpose of clearing the mental palette of what my project was supposed to be. I originally did not want to disclose my idea during any of the class periods in order to keep the shock effect of this low rumbling that would slowly fill the ambiance of the room a secret. So the best way to do that was to get the audience confused by my presentation setup and start it off before they had a chance to refocus on what they were to be expecting.

I did learn from a slight slip-up midway through the setup. I had already seen, but never realized, that the website must be visited for a first time, then refreshed to get the machine to start pinging for server data. It was a small mishap, but I was glad it just further added to the confusion and mental cleaning. By the next project this should not have to be the case. (*Edit: This aspect has been cleaned for project 2!*)

Midway through the show however, as the speakers all came together, I wanted to raise the side lights a bit to "spotlight" the computers that were also participating in the event. This however did not happen since I noticed that the actual website was offset and I had forgotten to fix this after the second refresh. Even though I forgot to bring up the lights, I felt that it actually added a bit more to the overall presentation since the low, dark rumbling would have actually been opposing the planned light play.

Post-Presentation

One of my favorite responses was shortly after the presentation was complete when a classmate mentioned how the low rumbling coming from right besides him unnerved and frightened him a bit. That clearly tied in with my last statement that even though I am a Computer Science major as well, I will never be working in the Artificial Intelligence field. Terminator 2 - Judgment Day (DVD/Blue-ray) showed me exactly how dangerous true A.I. can become due to loose logic restrictions in the code. But in the meantime, running countless machines to do productive tasks that do not raise self-awareness are amazingly exciting!

I'm glad to be the first ActLab student to finally untap the multi-machine possibilities from my understanding. Hopefully the completed interface will be of benefit to others who will wish to untap the possibilities of multi-speaker systems.

NOTE: This was NOT a fast streaming video because I wanted to make sure the entire video was loaded to prevent server drop-offs during the actual presentation. The bitrate is also INCREDIBLE overkill but I wanted the video to present in the highest quality possible when displayed on a projector.

*The documentation is the website, the video was just part of the installation.