- http://rob.kiben.net rob@kiben.net -
Rob Canning
Department of Music
Goldsmiths, University of London
NodeScore is a web based framework to facilitate networked ensemble performance.
projected, directed and distributed
Open Source - No Plugins
(Flash, Flex, Shockwave, Java)
Socket.IO simplifies the WebSocket API and unifies the APIs of its fallback transports.
var sio = require('socket.io')
, http = require('http'), fs = require('fs'), static = require('node-static');
var clientFiles = new static.Server('./www');
var httpServer = http.createServer(
function(request, response) {
request.addListener('end', function () {
clientFiles.serve(request, response);
process.setMaxListeners(0);
});
}); httpServer.listen(8889);
var io = sio.listen(httpServer);
io.set('log level', 1); // reduce logging
io.sockets.on('connection', function (socket) {
<script src="/socket.io/socket.io.js"> </script>
// connect to socket
var socket = io.connect();
//send something down the pipe
function startChr() { socket.emit("startChr") }
// instruction from "director" client executed on server
socket.on('startChr', function () { startChr();});
function startChr() { if (chronstate !== 1) {
chronstate = 1; chronometer();} }
---snip---
setTimeout(function(){chronometer()}, 100);
socket.broadcast.emit('chronFromServer', chron)
socket.emit('chronFromServer', chron)
---snip---
// update chron value on the clients in line with server
socket.on("chronFromServer", function(chron) {
$("div#client_chronometer").text(chron);
});
GNU/Lilypond - Phantom.js
the TODO list...
<audio>,<video>
work with an ensemble over extended period - eg. residency
touch screen "director" interface
clean up the code :)