# HG changeset patch # User Rob Canning # Date 1406896177 -3600 # Node ID cb1862bbcd5abee0c399d034fd9b4cce0f164a75 # Parent a633d8c049299bb2aec022a6874d5766a6e2aac7 added functionality for audio score units diff -r a633d8c04929 -r cb1862bbcd5a nodescore.js --- a/nodescore.js Fri Aug 01 01:24:07 2014 +0100 +++ b/nodescore.js Fri Aug 01 13:29:37 2014 +0100 @@ -228,6 +228,10 @@ // initiate first page here var nextunit=seq.units[seq.transect%numberoftransects][(seq.counter+1)%order]; socket.emit("pageIni", voice, unit, time, seq.mm,seq.counter,nextunit ); + socket.broadcast.emit("pageIni", voice, unit, time, seq.mm,seq.counter,nextunit ); + + socket.emit("pageFlip", voice, unit, time, seq.mm,seq.counter,nextunit ); + socket.broadcast.emit("pageFlip", voice, unit, time, seq.mm,seq.counter,nextunit ); } diff -r a633d8c04929 -r cb1862bbcd5a www/martin/css/chat-tablet.css --- a/www/martin/css/chat-tablet.css Fri Aug 01 01:24:07 2014 +0100 +++ b/www/martin/css/chat-tablet.css Fri Aug 01 13:29:37 2014 +0100 @@ -18,28 +18,36 @@ position: absolute; height: 90%; z-index: 100; - left: 0; + left: -900px; top: 0; - background: gray; + background: black; text-align: center; - width: 250px; + width: 750px; font: 15px Georgia; color: orange; + opacity:0.9; display: block; } + #nickname .wrap, -#connecting .wrap {padding-top: 30px; } +#connecting .wrap {padding-top: 130px; } #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; } + +.nickname-set #nickname { + display: none; +} + #messages { height: 100%; background: gray; } #messages em { color: white; } + #messages p { padding: 0; margin: 0; @@ -47,6 +55,7 @@ padding: 0px 10px; color: white; } + #messages p b { display: inline-block; padding-right: 10px; @@ -57,6 +66,7 @@ background: gray; color: white; } + #messages #nicknames { background: gray; border: 1px dashed orange; diff -r a633d8c04929 -r cb1862bbcd5a www/martin/index.html --- a/www/martin/index.html Fri Aug 01 01:24:07 2014 +0100 +++ b/www/martin/index.html Fri Aug 01 13:29:37 2014 +0100 @@ -12,7 +12,7 @@ - + @@ -65,7 +65,9 @@ - +
+ +
diff -r a633d8c04929 -r cb1862bbcd5a www/martin/js/nodescore-client.js --- a/www/martin/js/nodescore-client.js Fri Aug 01 01:24:07 2014 +0100 +++ b/www/martin/js/nodescore-client.js Fri Aug 01 13:29:37 2014 +0100 @@ -1,5 +1,6 @@ ///////////////////////////////////////////////// // connect to websocket + var socket = io.connect(); function initPage() { socket.emit("initPage"); console.log("init.client.log") @@ -7,6 +8,7 @@ //socket.on("metroPulse", metronomeTick); ///////////////////////////////////////////////// + socket.on("metroPulse", pulseInClient); function pulseInClient(pulse,groupID,metrobeat){ var groupPage=document.getElementById('group').value @@ -15,6 +17,21 @@ } } +////////////////////////////////////////////////// +// AUDIO SCORE CUES + +var audioUnit1 = new Audio('audio/testfile.ogg'); +var audioUnit49 = new Audio('audio/testfile.ogg'); +var audioUnit3 = new Audio('audio/testfile.ogg'); +var audioUnit4 = new Audio('audio/testfile.ogg'); + +function playAudio(a) { + a.play(); +} + +//playAudio(audio_unit_1); + + ///////////////////////////////////////////////// function metroCss(beat, beatcolor,text){ var color = beatcolor; @@ -114,8 +131,11 @@ $("#previewbox-solo-next").html("") } } + + } + socket.on("pageFlip", pageFlip); // some if logic to check if file is already displayed @@ -141,14 +161,32 @@ $("#previewbox-4").html("") } + + // page flip for solo part section if (group==soloist) { + + // changes the svg and preview images $("#previewbox-solo").html("") $("#previewbox-solo-next").html("") + + // check for audio assets to play + // audio assets should have a value attribute which should be compared with the unit + // if the unit has an associated audio attribute it should play + + if ( window["audioUnit"+unit] ){ + console.log("audio asset detected for this unit... playing now...") + playAudio(window["audioUnit"+unit]); + } else { console.log("no audio for this unit.."); } } + + // check for effect associated with unit + // maybe in future we could use the webAudio API? + } + //////////////////////////////////////////////// /* commented out for now as interferes with chat diff -r a633d8c04929 -r cb1862bbcd5a www/martin/svg/0.svg --- a/www/martin/svg/0.svg Fri Aug 01 01:24:07 2014 +0100 +++ b/www/martin/svg/0.svg Fri Aug 01 13:29:37 2014 +0100 @@ -1,5 +1,5 @@ - + image/svg+xml + + + + + + + + + + + + + + + + + + + + \ No newline at end of file + units="px"> + + + + + + + image/svg+xml + + + + + + + + + 1 + + + + + 3 + + + 2 + + + + + 4 + + + + + 6 + + + + 5 + + + + + + + + XII + XXIV + XII + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XII + + + + diff -r a633d8c04929 -r cb1862bbcd5a www/martin/svg/48.svg --- a/www/martin/svg/48.svg Fri Aug 01 01:24:07 2014 +0100 +++ b/www/martin/svg/48.svg Fri Aug 01 13:29:37 2014 +0100 @@ -14,9 +14,23 @@ id="svg2" version="1.1" inkscape:version="0.48.4 r9939" - sodipodi:docname="1.svg"> + sodipodi:docname="mutedharmonictrem.svg"> + + + + + + + + + + + + + + + + + + units="px" + showguides="true" + inkscape:guide-bbox="true"> image/svg+xml - + @@ -303,76 +389,245 @@ d="m 26.446216,909.81405 867.022024,0" id="path2989-7-1" inkscape:connector-curvature="0" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + XII + id="tspan3802-7-0" + x="273.57608" + y="928.58966" + style="font-size:15px">III + + + + + XXIV + id="tspan3802-7-0-9" + x="250.47357" + y="936.47412" + style="font-size:15px" /> XII - - - - + id="tspan3802-7-0-4" + x="368.16199" + y="928.58966" + style="font-size:15px">V I + id="tspan3802-7-0-4-0" + x="405.67142" + y="928.58966" + style="font-size:15px">VII + II + + + + sodipodi:docname="1.svg"> + + + id="Arrow2Lend" + style="overflow:visible;"> - - - - - - - - - - - - - - + id="path4626" + style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(1.1) rotate(180) translate(1,0)" /> - - - + id="path4626-0" + style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="matrix(-1.1,0,0,-1.1,-1.1,0)" /> image/svg+xml - + @@ -173,99 +127,266 @@ inkscape:groupmode="layer" id="layer1" transform="translate(0,-652.3622)"> + + id="g3708" + transform="translate(-176.02262,-170.80899)"> + 1 + transform="matrix(0.31642907,0,0,0.30831552,98.356249,870.25343)" + d="m 308.5155,345.98193 c 0,11.99486 -9.47442,21.7186 -21.16171,21.7186 -11.68729,0 -21.16171,-9.72374 -21.16171,-21.7186 0,-11.99485 9.47442,-21.7186 21.16171,-21.7186 11.68729,0 21.16171,9.72375 21.16171,21.7186 z" + sodipodi:ry="21.718601" + sodipodi:rx="21.161715" + sodipodi:cy="345.98193" + sodipodi:cx="287.35379" + id="path3592" + style="color:#000000;fill:none;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + sodipodi:type="arc" /> + + + transform="matrix(0.31642907,0,0,0.30831552,152.59569,927.85512)" + d="m 308.5155,345.98193 c 0,11.99486 -9.47442,21.7186 -21.16171,21.7186 -11.68729,0 -21.16171,-9.72374 -21.16171,-21.7186 0,-11.99485 9.47442,-21.7186 21.16171,-21.7186 11.68729,0 21.16171,9.72375 21.16171,21.7186 z" + sodipodi:ry="21.718601" + sodipodi:rx="21.161715" + sodipodi:cy="345.98193" + sodipodi:cx="287.35379" + id="path3592-6" + style="color:#000000;fill:none;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + sodipodi:type="arc" /> + 3 + + + 2 + transform="matrix(0.31642907,0,0,0.30831552,200.61427,915.50749)" + d="m 308.5155,345.98193 c 0,11.99486 -9.47442,21.7186 -21.16171,21.7186 -11.68729,0 -21.16171,-9.72374 -21.16171,-21.7186 0,-11.99485 9.47442,-21.7186 21.16171,-21.7186 11.68729,0 21.16171,9.72375 21.16171,21.7186 z" + sodipodi:ry="21.718601" + sodipodi:rx="21.161715" + sodipodi:cy="345.98193" + sodipodi:cx="287.35379" + id="path3592-6-5" + style="color:#000000;fill:none;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + sodipodi:type="arc" /> + + + + 4 + + transform="matrix(0.31642907,0,0,0.30831552,239.02913,920.30935)" + d="m 308.5155,345.98193 c 0,11.99486 -9.47442,21.7186 -21.16171,21.7186 -11.68729,0 -21.16171,-9.72374 -21.16171,-21.7186 0,-11.99485 9.47442,-21.7186 21.16171,-21.7186 11.68729,0 21.16171,9.72375 21.16171,21.7186 z" + sodipodi:ry="21.718601" + sodipodi:rx="21.161715" + sodipodi:cy="345.98193" + sodipodi:cx="287.35379" + id="path3592-6-7" + style="color:#000000;fill:none;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + sodipodi:type="arc" /> + + + 6 + transform="matrix(0.31642907,0,0,0.30831552,284.30379,925.79719)" + d="m 308.5155,345.98193 c 0,11.99486 -9.47442,21.7186 -21.16171,21.7186 -11.68729,0 -21.16171,-9.72374 -21.16171,-21.7186 0,-11.99485 9.47442,-21.7186 21.16171,-21.7186 11.68729,0 21.16171,9.72375 21.16171,21.7186 z" + sodipodi:ry="21.718601" + sodipodi:rx="21.161715" + sodipodi:cy="345.98193" + sodipodi:cx="287.35379" + id="path3592-6-0" + style="color:#000000;fill:none;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + sodipodi:type="arc" /> + + + 5 - + transform="matrix(0.31642907,0,0,0.30831552,334.38031,901.10192)" + d="m 308.5155,345.98193 c 0,11.99486 -9.47442,21.7186 -21.16171,21.7186 -11.68729,0 -21.16171,-9.72374 -21.16171,-21.7186 0,-11.99485 9.47442,-21.7186 21.16171,-21.7186 11.68729,0 21.16171,9.72375 21.16171,21.7186 z" + sodipodi:ry="21.718601" + sodipodi:rx="21.161715" + sodipodi:cy="345.98193" + sodipodi:cx="287.35379" + id="path3592-6-50" + style="color:#000000;fill:none;stroke:#000000;stroke-width:2.5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + sodipodi:type="arc" /> + + + + + XII - II - + id="tspan3806" + x="334.29651" + y="965.29047" + style="font-size:15px">XXIV VI + id="tspan3802-7" + x="596.78198" + y="965.29047" + style="font-size:15px">XII + + + + I