# HG changeset patch # User tzara # Date 1366587673 0 # Node ID e868cdd4b3e99984d80984e5d9cdf7f1f5df26b1 # Parent 5ba25083273909bc62806b5ee33436cd68435a13 . diff -r 5ba250832739 -r e868cdd4b3e9 nodescore.js --- a/nodescore.js Tue Apr 02 15:14:25 2013 +0000 +++ b/nodescore.js Sun Apr 21 23:41:13 2013 +0000 @@ -184,46 +184,41 @@ socket.emit('chronFromServer', chron) } - //////////////////////////////////////////// // magic square sequencer (this should be modularised) //////////////////////////////////////////// - // all the variables this sequencer needs are in scoreB.js - requirejs(['scoreB'],function(scoreB) {}); - var sequencerState = 0; var countdowntick = function(seq){ - // var tempoms = Math.floor(60000/seq.mm) var tempoms = Math.floor(60000/seq.mm) var timemultiplier=1000 var outcount = 8; var incount=8; - var time = ((seq.durations[seq.counter]+1) *timemultiplier) + 30000 + (outcount*tempoms); + var time = (( seq.durations[seq.counter]+1 ) + * timemultiplier ) + + 30000 + (outcount*tempoms); var time = Math.floor(time) var ztime = time; var totaltime = Math.floor(time/tempoms) var unit = seq.units[seq.counter]; var unitlast = seq.units[seq.counter-1]; var voice = seq.voice; - // initiate first page here socket.broadcast.emit("pageFlipfromserver", - voice, unit, time, seq.mm,seq.counter,unitlast); + voice, unit, time, + seq.mm,seq.counter,unitlast); socket.emit("pageFlipfromserver", - voice, unit, time, seq.mm,seq.counter,unitlast); + voice, unit, time, + seq.mm,seq.counter,unitlast); function sequenCer() { - if (ztime >= 0 ){ - // basic unit is still the second/1000ms - change this to tempoms? no i dont think so // count in and count out //////////////////////////////////////////// - var counter = Math.floor(ztime/tempoms) - + if (counter >= 0 ){ socket.broadcast.emit('counterText', voice, unit, counter,seq.counter,unitlast); @@ -232,35 +227,33 @@ if (counter <= outcount ) { socket.broadcast.emit('countinFromServer', - voice, counter, "","stop in: ", "red", "transparent",unit); + voice, counter, + "","stop in: ", "red", "transparent",unit); socket.emit('countinFromServer', - voice, counter, "","stop in: ", "red", "transparent",unit); + voice, counter, + "","stop in: ", "red", "transparent",unit); } if (counter > (totaltime)-incount && counter <= totaltime ) { socket.broadcast.emit('countinFromServer', - voice, counter-(totaltime-incount), "","play in: ", "green","transparent",unit); + voice, counter-(totaltime-incount), + "","play in: ", "green","transparent",unit); socket.emit('countinFromServer', - voice,counter-(totaltime-incount), "","play in: ", "green","transparent",unit); + voice,counter-(totaltime-incount), + "","play in: ", "green","transparent",unit); } if (counter == (totaltime)-incount ) { socket.broadcast.emit('countinFromServer', - voice, "+", "","playing.. ", "green","transparent",unit); + voice, "+", + "","playing.. ", "green","transparent",unit); socket.emit('countinFromServer', - voice, "+", "","playing.. ", "green","transparent",unit); + voice, "+", + "","playing.. ", "green","transparent",unit); } - - // remove displayed number with " " at end of both countin/out - - if (counter == 0 ) { - socket.broadcast.emit('countinFromServer', - voice, "", "","", "green","transparent",unit); - socket.broadcast.emit('counterText', voice, seq.counter, "", unit); - socket.emit('counterText', voice, seq.counter, "",unit); - } + } - + // on each beat do: @@ -297,18 +290,13 @@ }; step = function (seq) { - //clearInterval(seq.boo); clearInterval(countdowntick); countdowntick(seq) sequencerState=1; }; - socket.on('resetSeq', function () { - console.log("reset") - resetChr(); - }); + socket.on('resetSeq', function () { resetChr(); }); - //////////////////////////////////////////// // some latency calculations /////////////////////////////////////////// diff -r 5ba250832739 -r e868cdd4b3e9 www/m/c.html --- a/www/m/c.html Tue Apr 02 15:14:25 2013 +0000 +++ b/www/m/c.html Sun Apr 21 23:41:13 2013 +0000 @@ -20,7 +20,8 @@
- + +
+
@@ -130,36 +132,39 @@
00:00:00.0
- +
+
+
+ +



- + diff -r 5ba250832739 -r e868cdd4b3e9 www/m/css/chat-tablet.css --- a/www/m/css/chat-tablet.css Tue Apr 02 15:14:25 2013 +0000 +++ b/www/m/css/chat-tablet.css Sun Apr 21 23:41:13 2013 +0000 @@ -24,42 +24,18 @@ display: block; } #nickname .wrap, -#connecting .wrap { - padding-top: 30px; -} -#nickname input { - border: 1px solid #ccc; - padding: 10px; -} -#nickname input:focus { - border-color: #999; - outline: 0; -} -#nickname #nickname-err { - color: #8b0000; - font-size: 12px; - visibility: hidden; -} -.connected #connecting { - display: none; -} -.nickname-set #nickname { - display: none; -} -#messages { - height: 100px; - !background: #eee; - background: black; -} -#messages em { - !text-shadow: 0 1px 0 #fff; - !color: #999; - color: white; -} +#connecting .wrap {padding-top: 30px; } +#nickname input { border: 1px solid #ccc; padding: 10px; } +#nickname input:focus { border-color: #999; outline: 0; } +#nickname #nickname-err { color: #8b0000; font-size: 12px; visibility: hidden; } +.connected #connecting { display: none; } +.nickname-set #nickname { display: none; } +#messages { height: 100px; background: black; } +#messages em { color: white; } #messages p { padding: 0; margin: 0; - font: 11px Helvetica, Arial; + font: 14px Helvetica, Arial; padding: 0px 10px; color: white; } @@ -68,8 +44,8 @@ padding-right: 10px; color: white; } + #messages p:nth-child(even) { - !background: #fafafa; background: black; color: white; } @@ -154,10 +130,6 @@ display: inline-block; text-decoration: none; background: white; - !background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #43a1f7), color-stop(1, #377ad0)); - !background: -webkit-linear-gradient(top, #43a1f7 0%, #377ad0 100%); - !background: -moz-linear-gradient(top, #43a1f7 0%, #377ad0 100%); - !background: linear-gradient(top, #43a1f7 0%, #377ad0 100%); border: 1px solid #2e70c4; -webkit-border-radius: 16px; -moz-border-radius: 16px; @@ -167,17 +139,12 @@ font-size: 11px; font-weight: normal; line-height: 1; - !padding: 3px 10px 5px 10px; text-align: center; text-shadow: 0 -1px 1px #2d6dc0; } button:hover, button.hover { background: white; - !background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #43a1f7), color-stop(1, #2e70c4)); - !background: -webkit-linear-gradient(top, #43a1f7 0%, #2e70c4 100%); - !background: -moz-linear-gradient(top, #43a1f7 0%, #2e70c4 100%); - !background: linear-gradient(top, #43a1f7 0%, #2e70c4 100%); border: 1px solid #2e70c4; cursor: pointer; text-shadow: 0 -1px 1px #2c6bbb; diff -r 5ba250832739 -r e868cdd4b3e9 www/m/css/nodescore-tablet.css --- a/www/m/css/nodescore-tablet.css Tue Apr 02 15:14:25 2013 +0000 +++ b/www/m/css/nodescore-tablet.css Sun Apr 21 23:41:13 2013 +0000 @@ -43,6 +43,14 @@ position: relative; +filter: invert(100%); } +.outermaster2{ + margin-top:4px; + height: 880px; + width: 1020px; + border-radius: 15px; + position: relative; + +filter: invert(100%); +} #live{ width: 100%; @@ -170,7 +178,6 @@ opacity:1; } - .outersquare{ border-radius: 15px; border: 1px solid blue; @@ -190,14 +197,13 @@ height: 445px; } -#thesquare{ position:absolute; } - +#thesquare{ position:absolute; width:700px; } .magicsquare { border: 1px solid white; padding: 2px 2px 2px 2px; - width: 160px; - height: 75px; - float: left; + width: 110px; + height: 100px; + float: left; font-size: 3em; color:white; text-align:center @@ -308,7 +314,7 @@ display:table-cell; vertical-align:middle; border-radius: 15px; float:right; - background-color: transparent; + background-color: black; color: white; font-size: 3.7em; text-align: center; @@ -320,6 +326,17 @@ z-position: 2; } +#c_chronometer{ + position:relative; + bottom:-20px; + right:-35%; + height:40px; + width:200px; + border-radius: 15px; + color: gray; + font-size: 3.5em; +} + #counttitle{ font-size:3em; margin:0; @@ -334,7 +351,6 @@ width:40px; font-size: 5em; font-weight:bolder; - font-align:center; margin:0; padding:0; position:relative; @@ -370,7 +386,8 @@ } #content-txt { - width: 100%; height: 90%; + width: 100%; + height: 90%; font-size:3em; text-align:center; background-color:black; @@ -379,4 +396,31 @@ display:table-cell; vertical-align:middle; border-radius: 15px; -} \ No newline at end of file +} +#wide { width:100%; height:50%; border: 1px solid gray; + padding: 6px 6px 6px 6px; +} + +#outer { display:block; float:left; width: 40%; height: 85%; padding: 0; border: 0px solid white; background-color: black; } + +#outerpreview { display:block; float:right; + height:85%; width: 59%; padding: 0; + border: 1px solid black; background-color: black; } + +.pview { border: 1px solid gray; height:50%; width:49%; display:block; float:left; } + + +.middle { float: left; width: 15%; height: 15.5%; padding: 0; border: 0; margin: 0.33%; + border: 1px solid gray;} /* 100 = 6 * widt\h + 12 * margin */ + +.inner-0, .inner-1, .inner-2, .inner-3 { font-size:2em; float: left; width: 47%; height: 50%; padding: 0; + border: 0; margin: 0; text-align: center; font-weight: bold; } + +.inner-0 { background-color: transparent; } +.inner-1 { background-color: transparent; } +.inner-2 { background-color: transparent; } +.inner-3 { background-color: transparent; } + +.musicianprog { display:inline; float:left; + width:33%; background:transparent; height:40px; + padding: 5px 5px 5px 5px; text-align:center; } \ No newline at end of file diff -r 5ba250832739 -r e868cdd4b3e9 www/m/d.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/m/d.html Sun Apr 21 23:41:13 2013 +0000 @@ -0,0 +1,123 @@ + + + + + controls@nodescore + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+ +
+
+ +
+
+
x
+
+ +
+
+
+
+
x
+
+
+
+
+
+
x
+
+
+
+
+
+
x
+
+
+
+ + + + +
00:00:00.0
+ +
+ + + +
+ + +
+ + + + + + + + +
+ + + + diff -r 5ba250832739 -r e868cdd4b3e9 www/m/js/controlseq.js --- a/www/m/js/controlseq.js Tue Apr 02 15:14:25 2013 +0000 +++ b/www/m/js/controlseq.js Sun Apr 21 23:41:13 2013 +0000 @@ -1,4 +1,3 @@ - ////////////////////////////////////////////// var socket = io.connect(); ////////////////////////////////////////////// @@ -8,19 +7,14 @@ function resetSeq() { socket.emit("resetSeq") } ////////////////////////////////////////////// // Chron Controls - function stopWatch(value) { socket.emit("stopWatch", value) } - ////////////////////////////////////////////// // Metronome Controls - //socket.on("metroPulse", metronomeTick); function metroStart(pulse) { socket.emit("metroStart", pulse);} function metroStop() { socket.emit("metroStop");} - ////////////////////////////////////////////// // Latency "Pong" - socket.on("timeFromServer", function(n) { socket.emit("clientTimeResponse",n); //console.log(n); @@ -28,67 +22,72 @@ socket.on("latencyFromServer", function(latency) { $("#client_latency").text(latency+"ms.") }); - function getLatencies(x) { socket.emit("getLatencies", x); } - ////////////////////////////////////////////// // Chronometer Controls - function startChr() { socket.emit("startChr"); } function stopChr() { socket.emit("stopChr"); } -function resetChr() { - socket.emit("resetChr"); - $("div#client_chronometer").text("00:00:00.0"); -} -socket.on("chronFromServer", function(chron){ - //console.log(chron); - $("div#client_chronometer").text(chron); -}); +function resetChr() { socket.emit("resetChr"); + $("div#client_chronometer").text("00:00:00.0"); } +socket.on("chronFromServer", function(chron){ + $("div#c_chronometer").text(chron); }); ////////////////////////////////////////////// // SEQUENCER MONITOR - socket.on("pageFlipfromserver", sequenceMonitor); function sequenceMonitor(group, unit,time,mm,seq,unitlast){ -// var n=6; var x=seq-1; var off=((x%n)+n)%n // thanks claudiusmaximus - + // var n=6; var x=seq-1; var off=((x%n)+n)%n // thanks claudiusmaximus if (group == 1) { turnmeoff = "#sqr"+unitlast+".sqa"} if (group == 2) { turnmeoff = "#sqr"+unitlast+".sqb"} if (group == 3) { turnmeoff = "#sqr"+unitlast+".sqc"} if (group == 4) { turnmeoff = "#sqr"+unitlast+".sqd"} - - $(turnmeoff).css({'color':'black'}) - + $(turnmeoff).css({'color':'black'}) } -socket.on("counterText", function(group,unit,counter,seq){ - - if (group == 1) { $('#sqr'+unit+".sqa").text(counter); - if (counter == 0 ) { $('#sqr'+unit+".sqa").css("color","black") } - else { $('#sqr'+unit+".sqa").css("color","yellow") } +// countdown to change +socket.on("countinFromServer", countinCtrl); +function countinCtrl(groupID, currentseconds,mm,text,colour,background,unit){ + console.log("#count"+groupID) + // all counts to control page + $("#counttitle"+groupID).css('color','white'); + $("#counttitle"+groupID).text(text); + $("#count"+groupID).text(currentseconds).css('color','white'); + document.getElementById("count"+groupID).style.color=colour; +} + +socket.on("counterText", function(group,unit,counter,seq){ + if (group == 1) { $('#inner-'+unit+"-0").text(counter); +// $("#count1").text(currentseconds); + if (counter == 0 ) { $('#inner-'+unit+"-0").css("color","black") } + else { $('#inner-'+unit+"-0").css("color","yellow") } } - if (group == 2) { $('#sqr'+unit+".sqb").text(counter); - if (counter == 0 ) { $('#sqr'+unit+".sqb").css("color","black") } - else { $('#sqr'+unit+".sqb").css("color","green") } + if (group == 2) { $('#inner-'+unit+"-1").text(counter); + + if (counter == 0 ) { $('#inner-'+unit+"-1").css("color","black") } + else { $('#inner-'+unit+"-1").css("color","green") } } - if (group == 3) { $('#sqr'+unit+".sqc").text(counter); - if (counter == 0 ) { $('#sqr'+unit+".sqc").css("color","black") } - else { $('#sqr'+unit+".sqc").css("color","aqua") } + if (group == 3) { $('#inner-'+unit+"-2").text(counter); + + if (counter == 0 ) { $('#inner-'+unit+"-2").css("color","black") } + else { $('#inner-'+unit+"-2").css("color","aqua") } } - if (group == 4) { $('#sqr'+unit+".sqd").text(counter); - if (counter == 0 ) { $('#sqr'+unit+".sqd").css("color","black")} - else { $('#sqr'+unit+".sqd").css("color","red") } + if (group == 4) { $('#inner-'+unit+"-3").text(counter); + if (counter == 0 ) { $('#inner-'+unit+"-3").css("color","black")} + else { $('#inner-'+unit+"-3").css("color","red") } } } ); +/* ////////////////////////////////////////////// // CLient Popup window code function newPopup(url) { popupWindow = window.open( - url,'popUpWindow','height=400,width=800,left=10,top=10,resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,titlebar=no,directories=no,status=yes')} \ No newline at end of file + url,'popUpWindow','height=400,width=800,left=10,top=10,resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,titlebar=no,directories=no,status=yes')} + +*/ diff -r 5ba250832739 -r e868cdd4b3e9 www/m/js/nodescore-slides.js --- a/www/m/js/nodescore-slides.js Tue Apr 02 15:14:25 2013 +0000 +++ b/www/m/js/nodescore-slides.js Sun Apr 21 23:41:13 2013 +0000 @@ -7,6 +7,7 @@ ///////////////////////////////////////////////// socket.on("metroPulse", pulseInClient); function pulseInClient(pulse,groupID,metrobeat){ + var groupPage=document.getElementById('group').value if (groupID == groupPage) { metronomeTick(1000, groupID, metrobeat); @@ -15,7 +16,6 @@ ///////////////////////////////////////////////// function metroCss(beat, beatcolor,text){ var color = beatcolor; - $(".metrocase > div").each(function(){$(this).stop()}); $(".metrocase > div").each(function(){$(this).css('background-color', beatcolor)}); $(".metrocase > div").each(function(){$(this).text(" ")}); @@ -33,49 +33,30 @@ }; ///////////////////////////////////////////////// - // update the stopwatch value on the client page in line with server -socket.on("chronFromServer", function(chron) { - $("div#client_chronometer").text(chron); -}); - +socket.on("chronFromServer", function(chron) { $("div#client_chronometer").text(chron); }); // server time - //var groupPage=document.getElementById('group').value //if (groupID == groupPage) { socket.on("dateTime", function(datetime) { $("div#datetime").text("" +datetime); - }); ///////////////////////////////////////////////// // countdown to change - socket.on("countinFromServer", countinClient); function countinClient(groupID, currentseconds,mm,text,colour,background,unit){ var groupPage=document.getElementById('group').value if (groupID == groupPage) { - //document.getElementById("count").style.visibility="visible"; - //document.getElementById("midcomms").style.visibility="visible"; $("#counttitle").css('color','white'); $("#counttitle").text(text); - // in box - //$('#sqr'+unit).text(currentseconds); - $("#count").text(currentseconds); - //$("#cnt").text(currentseconds); - - $("#count").css('background-color', background); + $("#count").text(currentseconds); document.getElementById("count").style.color=colour; - if ( currentseconds == 0) { - //document.getElementById("midcomms").style.visibility='hidden'; - } - }} -///////////////////////////////////////////////// + }} ///////////////////////////////////////////////// // countdown to change - socket.on("counterText", cText); function cText(groupID, currentseconds,text){ $("#totalcountdown"+groupID).text(text); @@ -86,10 +67,7 @@ }} /////////////////////////////////////// -function pageFlip(unit) { - - $('#sections').trigger('goto', [parseFloat(unit)]); -} +function pageFlip(unit) { $('#sections').trigger('goto', [parseFloat(unit)]); } ///////////////////////////////////////////////// // call the fancy jquery functions @@ -222,7 +200,7 @@ }); function message (from, msg) { - $('#lines').append($('

').append($('').text(from), msg)); + $('#lines').prepend($('

').prepend($('').text(from), msg)); } // dom manipulation diff -r 5ba250832739 -r e868cdd4b3e9 www/m/score.html --- a/www/m/score.html Tue Apr 02 15:14:25 2013 +0000 +++ b/www/m/score.html Sun Apr 21 23:41:13 2013 +0000 @@ -5,17 +5,12 @@ score@nodescore - - - - - @@ -50,12 +45,11 @@

-
- +
next in:
.
@@ -73,9 +67,7 @@
-