rc-web@56
|
1 CODE IS HERE:
|
rc-web@56
|
2 https://gitorious.org/nodescore
|
rc-web@56
|
3
|
rc-web@56
|
4 control interface is:
|
rc-web@56
|
5 http://nodescore.kiben.net:8889/m/c.html
|
rc-web@56
|
6
|
rc-web@56
|
7 score interface is:
|
rc-web@56
|
8 http://nodescore.kiben.net:8889/m/score.html
|
rc-web@56
|
9
|
rc-web@56
|
10 // NEEDS MODULARISATION
|
rc-web@56
|
11
|
rc-web@56
|
12 most stuff is in nodescore.js its a mess - everything is sending
|
rc-web@56
|
13 socket.broadcast.emit and socket.emit everything should be modular and
|
rc-web@56
|
14 return values which are sent from one of these socket.broadcast.*
|
rc-web@56
|
15 things - its just all too tangled up with this socket.on and socket broadcast stuff
|
rc-web@56
|
16 this is the main thing that needs tidying
|
rc-web@56
|
17
|
rc-web@56
|
18
|
rc-web@56
|
19 the scoreB.js file contains the sequncer/score duration/unit lists but
|
rc-web@56
|
20 that is about the only thing that is modularised.
|
rc-web@56
|
21
|
rc-web@56
|
22 i would like to have:
|
rc-web@56
|
23 the magicsquare sequencer section in one file
|
rc-web@56
|
24 the stopwatch / date time stuff in a file
|
rc-web@56
|
25 the webserver stuff in a serperate file
|
rc-web@56
|
26 the chat stuff in a seperate file
|
rc-web@56
|
27 the sockets stuff in a seperate file
|
rc-web@56
|
28
|
rc-web@56
|
29 all this called up in a minimal nodescore.js file using requirejs ? is this the best way
|
rc-web@56
|
30
|
rc-web@56
|
31 /// OLD SEQUENCERS WONT DIE ON RESET
|
rc-web@56
|
32
|
rc-web@56
|
33 BUG: on stop reset start the old instances of the sequencer remain so
|
rc-web@56
|
34 eventually they consume all the memory they should be cleaned
|
rc-web@56
|
35 up/deleted when the resetSeq function is called so there are never
|
rc-web@56
|
36 more than one set of
|
rc-web@56
|
37 seqA seqB seqC seqD instances called by:
|
rc-web@56
|
38 step(seqA);step(seqB); step(seqC); step(seqD);
|
rc-web@56
|
39
|
rc-web@56
|
40
|
rc-web@56
|
41 socket.on('resetSeq', function () {
|
rc-web@56
|
42 console.log("reset")
|
rc-web@56
|
43 resetChr();
|
rc-web@56
|
44 });
|
rc-web@56
|
45
|
rc-web@56
|
46
|
rc-web@56
|
47 //==========================
|
rc-web@56
|
48 SOCKET - CLIENT IDENTIFICATION IS DUMB
|
rc-web@56
|
49 the way the sockets work is really dumb at the moment
|
rc-web@56
|
50
|
rc-web@56
|
51 each client should only recieve stuff targeted at it specically using its socket id
|
rc-web@56
|
52 at the moment this is not done - all clients recieve all messages and filter them based on a
|
rc-web@56
|
53
|
rc-web@56
|
54 <input type="hidden" id="group" value='1'> which is set by the
|
rc-web@56
|
55 dropdown box [Stream 01-04] in the browser the clients only listen to
|
rc-web@56
|
56 their own group ID this is stupid but it works - not sure if causes
|
rc-web@56
|
57 congestion with all the extra messages flying around unnecessarily
|
rc-web@56
|
58
|
rc-web@56
|
59 // CLOCKS and METRO DRIFT
|
rc-web@56
|
60 at 60bpm ie a pulse every 1000ms then the chonometer and the
|
rc-web@56
|
61 metro/countdown timers should beat together - but they dont they drift
|
rc-web@56
|
62 apart - maybe there should be some common clock driving all the timing
|
rc-web@56
|
63 stuff rather than different setIntervals starting together
|
rc-web@56
|
64
|
rc-web@56
|
65
|
rc-web@56
|
66
|
rc-web@56
|
67
|
rc-web@56
|
68
|
rc-web@56
|
69
|
rc-web@56
|
70
|
rc-web@56
|
71 ////////////////////////////////////////////////
|
rc-web@56
|
72 // LATENCY COMPENSATION ISNT IMPLENTED YET
|
rc-web@56
|
73 // MORE MAGIC SQUARE ROUTES
|
rc-web@56
|
74 // MAGIC SQUARE ROUTE CHOOSING INTERFACE
|