02 Aug 2011 by Forrest Oliphant
I like the immediacy of wiring-metaphor multimedia frameworks like Quartz Composer and Pure Data. On the other hand, logic controls that would be simple to code can get quite complicated to wire, and messy tangles of wires can quickly cover the screen.
I have decided to abstract out the components of Meemoo (metronome, pattern sequencer, video players) into reusable JavaScript instruments that can communicate with each other using OSC-like messages. I have made a proof-of-concept (server 1, server 2) that shows how this can work with very little latency:
iframes communicating with OSC-like strings through window.postMessage()
To go these 10 hops, Firefox 5.0.1 takes ~42ms, Chrome 12 takes ~12ms, and Safari 5.1 takes ~4ms. I'm not sure why my test is showing Safari as the winner of window.postMessage() speed, but they all seem fast enough.
The JS of each frame runs in a separate thread, so if something slows down in one (fancy prosessing.js or WebGL visuals?), it shouldn't affect the others (master metronome). A simple web application will save the state of all of the frames, and the graph data of which iframe is sending messages where. Forking compositions and modules will be simple and encouraged by the design of the project. Stay tuned...