CODE IS HERE: https://gitorious.org/nodescore control interface is: http://nodescore.kiben.net:8889/m/c.html score interface is: http://nodescore.kiben.net:8889/m/score.html // NEEDS MODULARISATION most stuff is in nodescore.js its a mess - everything is sending socket.broadcast.emit and socket.emit everything should be modular and return values which are sent from one of these socket.broadcast.* things - its just all too tangled up with this socket.on and socket broadcast stuff this is the main thing that needs tidying the scoreB.js file contains the sequncer/score duration/unit lists but that is about the only thing that is modularised. i would like to have: the magicsquare sequencer section in one file the stopwatch / date time stuff in a file the webserver stuff in a serperate file the chat stuff in a seperate file the sockets stuff in a seperate file all this called up in a minimal nodescore.js file using requirejs ? is this the best way /// OLD SEQUENCERS WONT DIE ON RESET BUG: on stop reset start the old instances of the sequencer remain so eventually they consume all the memory they should be cleaned up/deleted when the resetSeq function is called so there are never more than one set of seqA seqB seqC seqD instances called by: step(seqA);step(seqB); step(seqC); step(seqD); socket.on('resetSeq', function () { console.log("reset") resetChr(); }); //========================== SOCKET - CLIENT IDENTIFICATION IS DUMB the way the sockets work is really dumb at the moment each client should only recieve stuff targeted at it specically using its socket id at the moment this is not done - all clients recieve all messages and filter them based on a which is set by the dropdown box [Stream 01-04] in the browser the clients only listen to their own group ID this is stupid but it works - not sure if causes congestion with all the extra messages flying around unnecessarily // CLOCKS and METRO DRIFT at 60bpm ie a pulse every 1000ms then the chonometer and the metro/countdown timers should beat together - but they dont they drift apart - maybe there should be some common clock driving all the timing stuff rather than different setIntervals starting together //////////////////////////////////////////////// // LATENCY COMPENSATION ISNT IMPLENTED YET // MORE MAGIC SQUARE ROUTES // MAGIC SQUARE ROUTE CHOOSING INTERFACE