Real-Time/Performance Systems
Real-time music and visual performance systems
We know what it's like to be on stage, with everyone watching. As performers and exhibitors ourselves, we've built our own systems to keep our shows interesting, organized and reliable. We're big believers in spectacle, and in its power to inspire others to do great things. We love to help others prep for their big moments, and make those moments spectacular, whether they be on a stage, on a busy expo floor, or in the middle of nowhere.
If you want to bring something new into a spectacle that you're planning to share, why not contact Lumieria? We've got experience, aesthetics and engineering skills to contribute, and love to make a splash.
//
// DAVES NOTE
// Despite what is said above, I plan to have multiple AJAX queries fired off from my page (one for each section)
// I'm going to use a function
function getAjaxRequest(url)
{
var request = false;
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = false;
}
}
}
if (!request)
alert("Error initializing XMLHttpRequest!");
return request;
}
// This section done with the help of...
// http://knol.google.com/k/gimme-some-closure-object-oriented-javascript-ajax-callbacks#
// I'm using OO JavaScript to create an object named PageDivObj... here is the notation
// NOTE: BAD things to watch out for...
//
// KEY POINT: The garbage collection mechanisms from the DOM, and from JavaScript are SEPARATE. Which means...
// Do not keep member variables of DOM objects in JavaScript objects. And vice-versa. This means, any JS callbacks
// on DOM objects should be cleared before the DOM object is deleted, by removeChild or the setting of innerHtml on
// any ancestor (see purgeDom fn below)
// from: http://javascript.crockford.com/memory/leak.html
// d is a dom obj
function purgeDom(d) {
if (!d)
return;
var a = d.attributes, i, l, n;
if (a) {
for (i = a.length - 1; i >= 0; i -= 1) {
n = a[i].name;
if (typeof d[n] === 'function') {
d[n] = null;
}
}
}
a = d.childNodes;
if (a) {
l = a.length;
for (i = 0; i < l; i += 1) {
purgeDom(d.childNodes[i]);
}
}
}
function onReadyStateChangeCb( r )
{
if (r) {
//console.log( "status = " + r.status + "response = " + r.responseText );
// server fullfilled the request => readystate 4
if (r.readyState == 4) {
// r status == 200 => requested data is ready
if (r.status == 200)
{
//alert("Server is done!");
//var xml = r.responseXml; // - get XHTML result
var txt = r.responseText; // - get result in text
//console.log("got good response" + txt);
}
}
}
}
//When using XMLHttpRequest to get the HTML of a remote webpage, it is often advantageous to turn that HTML string into DOM for easier manipulation. However, there are potential dangers involved in injecting remote content in a privileged context in your extension, so it can be desirable to parse the HTML safely.
//The function below will safely parse simple HTML and return a DOM object which can be manipulated like web page elements. This will remove tags like