# HG changeset patch # User tzara # Date 1341568095 -3600 # Node ID 0e5543ccb8fbe871635dcf4f0298a62e25831697 # Parent cd847f789b53ffabd47595b724ee18868e795d2c fixed transport control of metro and countdown visualisation on control page diff -r cd847f789b53 -r 0e5543ccb8fb nodescore.js --- a/nodescore.js Thu Jul 05 23:53:30 2012 +0100 +++ b/nodescore.js Fri Jul 06 10:48:15 2012 +0100 @@ -141,7 +141,7 @@ var unit = seq.units[seq.counter]; var tempoms = 60000/seq.mm - tock = setInterval(function(){ + var tock = setInterval(function(){ if (ztime >= 0 ){ // basic unit is still the second/1000ms - change this to tempoms? no i dont think so @@ -150,6 +150,8 @@ var counter = ztime/1000 + socket.emit('counterText', seq.voice, seq.counter, counter); + if (counter > 0 && counter <= outcount ) { socket.broadcast.emit('countinFromServer', seq.voice, counter, "","", "white", "transparent"); } @@ -176,10 +178,12 @@ // flip the page if (ztime == 0){ + socket.emit('counterText', seq.voice, seq.counter, " "); seq.counter = (seq.counter + 1) % seq.durations.length socket.broadcast.emit("pageFlipfromserver", seq.voice, unit, time, seq.mm,seq.counter); socket.emit("pageFlipfromserver", seq.voice, unit, time, seq.mm,seq.counter); step(seq); + } if (ztime < 0){} @@ -187,6 +191,17 @@ ztime -= 1000 }, tempoms) + + + socket.on('stopSeq', function (seq) { + console.log("stop") + clearInterval(tock); + sequencerState=0; + stopChr(); + }); + + + }; step = function (seq) { @@ -205,11 +220,7 @@ }); - socket.on('stopSeq', function () { - clearInterval(tock); - sequencerState=0; - stopChr(); - }); + socket.on('resetSeq', function () { console.log("rrrrreset") diff -r cd847f789b53 -r 0e5543ccb8fb www/m/controls.html --- a/www/m/controls.html Thu Jul 05 23:53:30 2012 +0100 +++ b/www/m/controls.html Fri Jul 06 10:48:15 2012 +0100 @@ -15,9 +15,7 @@

Multicast Network Score Controls

-
00:00:00.0
-
@@ -25,17 +23,13 @@
-

Calculate Client Latencies


0ms

- - - -

Magic Sequencer Monitor


- + +

Magic Sequencer Monitor


diff -r cd847f789b53 -r 0e5543ccb8fb www/m/js/controlseq.js --- a/www/m/js/controlseq.js Thu Jul 05 23:53:30 2012 +0100 +++ b/www/m/js/controlseq.js Fri Jul 06 10:48:15 2012 +0100 @@ -46,7 +46,7 @@ ////////////////////////////////////////////// // SEQUENCER MONITOR -socket.on("magicCtlfromserver", sequenceMonitor); +socket.on("pageFlipfromserver", sequenceMonitor); function sequenceMonitor(group, unit,time,mm,seq){ var n=6; var x=seq-1; var off=((x%n)+n)%n // thanks claudiusmaximus seqnow = "#"+group+"magicsquare"+seq @@ -54,7 +54,14 @@ $(seqnow).css('background-color', 'white'); $(turnmeoff).css('background-color', 'blue') console.log("#"+group+"magicsquare"+seq +" time: " +time + " %:" + off) + } +socket.on("counterText", function(group,unit,counter){ + $("#"+group+"magicsquare"+unit).text(counter); + console.log(group+"magicsqjare"+unit+"count:"+counter) + }); + + ////////////////////////////////////////////// // CLient Popup window code