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