Mercurial > hg > nodescore
changeset 54:66bf613fb818
pre clean up push - moved vars into scoreB.js - called up with requirejs
added requirejs dep
line wrap: on
line diff
--- a/chronometer.js Sun Oct 14 00:26:42 2012 +0000 +++ b/chronometer.js Wed Dec 19 13:36:19 2012 +0000 @@ -23,19 +23,31 @@ zeroChron() -function chronometer(divisor) { - zecsec += divisor; // set tenths of a second - if(zecsec > 9) { zecsec = 0; seconds += 1;} - if(seconds > 59) { seconds = 0;mins += 1;} - if(mins > 59) { mins = 0; hours += 1; } - chron = pad(hours) +":"+pad(mins)+ ':'+ pad(seconds)+ ":"+ zecsec - chronsec = pad(hours) +":"+pad(mins)+ ':'+ pad(seconds) - if ( divisor !== 1000 ){ - return chron +/* +function chronCtrl (state,interval){ + console.log("=========================== chronstate=" + state) + if (state==1){ + var date = new Date() + var starttime = new Date().getTime() / 1000; + //var interval = 1020 - date.getMilliseconds(); + xstopwatch = setInterval(function () { + var nowtime = new Date().getTime() / 1000; + now = nowtime-starttime + hours = parseInt( now / 3600 ) % 24; + minutes = parseInt( now / 60 ) % 60; + seconds = parseInt(now % 60); + milliseconds = Math.floor((now-seconds)*10)%60; + time = (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds < 10 ? "0" + seconds : seconds) + "."+milliseconds; + console.log(time) +// socket.broadcast.emit('chronFromServer', time) +// socket.emit('chronFromServer', time) + }, 100) } - else { return chronsec } -}; - -exports.chronometer =chronometer; + if (state==0) { + clearInterval(xstopwatch); + } + } +*/ +//exports.chronCtrl = chronCtrl; exports.xdateTime = xdateTime; exports.zeroChron = zeroChron;
--- a/nodescore Sun Oct 14 00:26:42 2012 +0000 +++ b/nodescore Wed Dec 19 13:36:19 2012 +0000 @@ -9,7 +9,7 @@ # nodescore@kiben.net # nodescore.kiben.net -export NODE_PATH=${NODE_PATH}:/home/root/node_modules/:/usr/share/nodescore/ +export NODE_PATH=${NODE_PATH}:/home/root/node_modules/:/home/rob/node_modules/:/usr/share/nodescore/ if [ "$1" = "home" ] then
--- a/nodescore.js Sun Oct 14 00:26:42 2012 +0000 +++ b/nodescore.js Wed Dec 19 13:36:19 2012 +0000 @@ -14,6 +14,17 @@ , fs = require('fs') , static = require('node-static'); +var requirejs = require('requirejs'); + +requirejs.config({ + //Pass the top-level main.js/index.js require + //function to requirejs so that node modules + //are loaded relative to the top-level JS file. + nodeRequire: require, + findNestedDependencies: true + +}); + // run webserver serving static html //////////////////////////////////////////// var clientFiles = new static.Server('/usr/share/nodescore/www'); @@ -30,6 +41,9 @@ var pinging=0 console.log("ping set to 0") +//requirejs(['socketsstuff'],function(socketsstuff) {}); + + //////////////////////////////////////////// // connect to websockets //////////////////////////////////////////// @@ -71,59 +85,59 @@ fs.write( id, timestring+" " + socket.nickname + ": "+ msg+"\n", null, 'utf8', function(){}); }); }); - + +// /* //////////////////////////////////////////// - // metronome + // chronometer + sequencer controls (all this should be modularised) //////////////////////////////////////////// - - socket.on('metroStop', stopMetro) - function stopMetro () { - metroState=0; - }; -var chronstate=0; + socket.on('stopWatch', function (state) { stopWatch(state);}); + socket.on('stopChr', function () { stopChr();}); + socket.on('resetChr', function () { resetChr();}); + socket.on('startSeq', function () { startChr();}); + var chronstate=0; - + // send the date/time every second xdatetime = setInterval(function () { d = ch.xdateTime() socket.broadcast.emit('dateTime', d) - socket.emit('dateTime', d) + socket.emit('dateTime', d) }, 1000) - - - socket.on('startSeq', function () { startChr();}); - // if not already started start the chronometer - function startChr() { if (chronstate !== 1) { + + + // if not already started start the chronometer and sequencer + function startChr(socket) { if (chronstate !== 1) { chronstate = 1; chronCtrl(1,100); step(seqA);step(seqB); step(seqC); step(seqD); -} - } - - - socket.on('stopWatch', function (state) { stopWatch(state);}); + } + } + // if not already started start the chronometer function stopWatch(state) { if (chronstate !== 1) { if (state==1){ chronstate = 1; chronCtrl(1,100);} } + + // if get 0 then stop the chron + if (state==0){ + chronstate = 0; + clearInterval(xstopwatch); + } + // if get 2 then reset the chron + if (state==2){ + chronstate = 0; + c=ch.zeroChron() + socket.broadcast.emit('chronFromServer', c) + socket.emit('chronFromServer', c) + } + } - if (state==0){ - chronstate = 0; - clearInterval(xstopwatch); - } - if (state==2){ - chronstate = 0; - c=ch.zeroChron() - socket.broadcast.emit('chronFromServer', c) - socket.emit('chronFromServer', c) - } - } - - +////////////////////////////// +// /* this should be moved to its own file chronometer.js function chronCtrl (state,interval){ console.log("=========================== chronstate=" + chronstate) @@ -132,35 +146,32 @@ var starttime = new Date().getTime() / 1000; //var interval = 1020 - date.getMilliseconds(); xstopwatch = setInterval(function () { - var nowtime = new Date().getTime() / 1000; - now = nowtime-starttime - hours = parseInt( now / 3600 ) % 24; - minutes = parseInt( now / 60 ) % 60; - seconds = parseInt(now % 60); - milliseconds = Math.floor((now-seconds)*10)%60; - - time = (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds < 10 ? "0" + seconds : seconds) + "."+milliseconds; - console.log(time) + var nowtime = new Date().getTime() / 1000; + now = nowtime-starttime + hours = parseInt( now / 3600 ) % 24; + minutes = parseInt( now / 60 ) % 60; + seconds = parseInt(now % 60); + milliseconds = Math.floor((now-seconds)*10)%60; + time = (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds < 10 ? "0" + seconds : seconds) + "."+milliseconds; + //console.log(time) socket.broadcast.emit('chronFromServer', time) socket.emit('chronFromServer', time) - }, 200) + }, 100) } if (state==0) { clearInterval(xstopwatch); } } - +//*/ // stop the chronometer - socket.on('stopChr', function () { stopChr();}); + function stopChr() {console.log("stop chron................................................") chronCtrl(0) chronstate=0 } - + function pad(number) { return (number < 10 ? '0' : '') + number } - - socket.on('resetChr', function () { resetChr();}); function resetChr() {//clearInterval(); chronstate = 0; zecsec = 0; seconds = 0; @@ -172,53 +183,36 @@ socket.emit('chronFromServer', chron) } + //////////////////////////////////////////// - // magic square sequencer + // magic square sequencer (this should be modularised) //////////////////////////////////////////// -// var score = require('./score'); -// var c = require('/usr/share/nodescore/www/m/js/chronometer'); + + // all the variables this sequencer needs are in scoreB.js -// var mm = score.mm + requirejs(['scoreB'],function(scoreB) {}); + var sequencerState = 0; - - - // var srcsqr = score.srcsqr - var srcsqr = [] - srcsqr[0] = [22,21,24,25,06,07]; - srcsqr[1] = [20,23,27,26,05,04]; - srcsqr[2] = [03,00,17,16,35,34]; - srcsqr[3] = [01,02,19,18,33,32]; + var countdowntick = function(seq){ -// var seqA = score.seqA -// var seqB = score.seqB -// var seqC = score.seqC -// var seqD = score.seqD - - var seqA = { metrobeat:0, voice:1, name: "A", counter: 0, mm: 60, beatsinbar: 4, durations: srcsqr[0], units: [1,2,3,1,2,4]}; - var seqB = { metrobeat:0, voice:2, name: "B", counter: 0, mm: 120, beatsinbar: 4, durations: srcsqr[1], units: [3,2,1,1,2,3]}; - var seqC = { metrobeat:0, voice:3, name: "C", counter: 0, mm: 90, beatsinbar: 4, durations: srcsqr[2], units: [4,5,6,5,4,2]}; - var seqD = { metrobeat:0, voice:4, name: "D", counter: 0, mm: 105, beatsinbar: 4, durations: srcsqr[3], units: [2,3,4,2,3,1]}; - - - - var countdowntick = function(seq){ - // var tempoms = Math.floor(60000/seq.mm) + // var tempoms = Math.floor(60000/seq.mm) var tempoms = Math.floor(60000/seq.mm) - //console.log(tempoms) - var timemultiplier=1 + + var timemultiplier=1000 var outcount = 4; var incount=4; 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 voice = seq.voice; + console.log(time) // initiate first page here - socket.broadcast.emit("pageFlipfromserver", seq.voice, unit, time, seq.mm,seq.counter); - socket.emit("pageFlipfromserver", seq.voice, unit, time, seq.mm,seq.counter); + socket.broadcast.emit("pageFlipfromserver", voice, unit, time, seq.mm,seq.counter); + socket.emit("pageFlipfromserver", voice, unit, time, seq.mm,seq.counter); function sequenCer() { - // console.log(ztime) + // console.log(ztime) if (ztime >= 0 ){ // basic unit is still the second/1000ms - change this to tempoms? no i dont think so @@ -228,30 +222,29 @@ var counter = Math.floor(ztime/tempoms) //console.log(counter) if (counter >= 0 ){ - socket.broadcast.emit('counterText', seq.voice, seq.counter, counter); - socket.emit('counterText', seq.voice, seq.counter, counter); + socket.broadcast.emit('counterText', voice, seq.counter, counter); + socket.emit('counterText', voice, seq.counter, counter); if (counter <= outcount ) { - socket.broadcast.emit('countinFromServer', seq.voice, counter, "","stop in: ", "red", "transparent"); + socket.broadcast.emit('countinFromServer', voice, counter, "","stop in: ", "red", "transparent"); } if (counter > (totaltime)-incount && counter <= totaltime ) { - socket.broadcast.emit('countinFromServer', seq.voice, counter-(totaltime-incount), "","play in: ", "green","transparent"); - socket.emit('countinFromServer', seq.voice, counter-(totaltime-incount), "","play in: ", "green","transparent"); - + socket.broadcast.emit('countinFromServer', voice, counter-(totaltime-incount), "","play in: ", "green","transparent"); + socket.emit('countinFromServer', voice, counter-(totaltime-incount), "","play in: ", "green","transparent"); } if (counter == (totaltime)-incount ) { - socket.broadcast.emit('countinFromServer', seq.voice, "+", "","playing.. ", "green","transparent"); - socket.emit('countinFromServer', seq.voice, "+", "","playing.. ", "green","transparent"); + socket.broadcast.emit('countinFromServer', voice, "+", "","playing.. ", "green","transparent"); + socket.emit('countinFromServer', voice, "+", "","playing.. ", "green","transparent"); } // remove displayed number with " " at end of both countin/out if (counter == 0 ) { - socket.broadcast.emit('countinFromServer', seq.voice, "", "","", "green","transparent"); - socket.broadcast.emit('counterText', seq.voice, seq.counter, ""); - socket.emit('counterText', seq.voice, seq.counter, ""); + socket.broadcast.emit('countinFromServer', voice, "", "","", "green","transparent"); + socket.broadcast.emit('counterText', voice, seq.counter, ""); + socket.emit('counterText', voice, seq.counter, ""); } } @@ -260,14 +253,14 @@ // push out the pulse to metronome seq.metrobeat = (seq.metrobeat+1)%seq.beatsinbar ; - socket.broadcast.emit('metroPulse', tempoms, seq.voice,seq.metrobeat); - socket.emit('metroPulse', tempoms, seq.voice,seq.metrobeat); + socket.broadcast.emit('metroPulse', tempoms, voice,seq.metrobeat); + socket.emit('metroPulse', tempoms, voice,seq.metrobeat); } // flip the page if (counter == 0){ seq.counter = (seq.counter + 1) % seq.durations.length - socket.broadcast.emit("pageFlipfromserver", seq.voice, unit, time, seq.mm,seq.counter); + socket.broadcast.emit("pageFlipfromserver", voice, unit, time, seq.mm,seq.counter); //delete tockTock; step(seq); } @@ -291,7 +284,7 @@ step = function (seq) { //clearInterval(seq.boo); - //clearInterval(countdowntick); + clearInterval(countdowntick); countdowntick(seq) sequencerState=1; }; @@ -369,7 +362,8 @@ }); - -exports.io = io; -exports.sio = sio; +//}); +//exports.io = io; +//exports.sio = sio; +exports.socket= io.sockets; exports.httpServer = httpServer; \ No newline at end of file
--- a/score.js Sun Oct 14 00:26:42 2012 +0000 +++ b/score.js Wed Dec 19 13:36:19 2012 +0000 @@ -1,5 +1,6 @@ exports.score = function(){ + console.log("============================== this is the score!") srcsqr = [] srcsqr[0] = [22,21,24,25,06,07]; srcsqr[1] = [20,23,27,26,05,04];
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scoreB.js Wed Dec 19 13:36:19 2012 +0000 @@ -0,0 +1,52 @@ + +//exports.score = function(){ + console.log("============================== this is the score!") + srcsqr = [] + srcsqr[0] = [22,21,24,25,06,07]; + srcsqr[1] = [20,23,27,26,05,04]; + srcsqr[2] = [03,00,17,16,35,34]; + srcsqr[3] = [01,02,19,18,33,32]; + + seqA = { + metrobeat:0, + voice:1, + name: "A", + counter: 0, mm: 60, beatsinbar: 4, + durations: srcsqr[0], + units: [1,2,3,1,2,4] + }; + + seqB = { + metrobeat:0, + voice:2, + name: "B", + counter: 0, + mm: 60, beatsinbar: 4, + durations: srcsqr[1], + units: [2,2,3,1,2,4] + }; + + seqC = { + metrobeat:0, + voice:3, + name: "C", + counter: 0, + mm: 60, beatsinbar: 4, + durations: [03,00,17,16,35,34], + units: [1,2,3,1,2,4] + }; + + + seqD = { + metrobeat:0, + voice:4, + name: "D", + counter: 0, + mm: 60, beatsinbar: 4, + durations: [01,02,19,18,33,32], + units: [1,2,3,1,2,4] + }; + +//return seqA seqB seqC seqD + +//} \ No newline at end of file
--- a/sequencer.js Sun Oct 14 00:26:42 2012 +0000 +++ b/sequencer.js Wed Dec 19 13:36:19 2012 +0000 @@ -28,9 +28,9 @@ // var seqD = score.seqD var seqA = { metrobeat:0, voice:1, name: "A", counter: 0, mm: 60, beatsinbar: 4, durations: srcsqr[0], units: [1,2,3,1,2,4]}; - var seqB = { metrobeat:0, voice:2, name: "B", counter: 0, mm: 120, beatsinbar: 4, durations: srcsqr[1], units: [3,2,1,1,2,3]}; + var seqB = { metrobeat:0, voice:2, name: "B", counter: 0, mm: 90, beatsinbar: 4, durations: srcsqr[1], units: [3,2,1,1,2,3]}; var seqC = { metrobeat:0, voice:3, name: "C", counter: 0, mm: 90, beatsinbar: 4, durations: srcsqr[2], units: [4,5,6,5,4,2]}; - var seqD = { metrobeat:0, voice:4, name: "D", counter: 0, mm: 105, beatsinbar: 4, durations: srcsqr[3], units: [2,3,4,2,3,1]}; + var seqD = { metrobeat:0, voice:4, name: "D", counter: 0, mm: 45, beatsinbar: 4, durations: srcsqr[3], units: [2,3,4,2,3,1]}; var countdowntick = function(seq){
--- a/www/m/css/nodescore-tablet.css Sun Oct 14 00:26:42 2012 +0000 +++ b/www/m/css/nodescore-tablet.css Wed Dec 19 13:36:19 2012 +0000 @@ -9,7 +9,6 @@ } - h3,h4,h5,h6 { width: 400px; background-color: white; @@ -38,8 +37,8 @@ .outermaster{ margin-top:4px; - height: 470px; - width: 1022px; + height: 570px; + width: 1020px; border-radius: 15px; !2Bbackground-color:black; !border: 1px solid gray; @@ -59,7 +58,7 @@ !margin-top:5px; !margin: 2px; width: 100%; - height: 465px; + height: 500px; text-align: center; border-radius: 15px; background-color:black; @@ -78,7 +77,7 @@ position: absolute; border: 0px solid red; border-radius:15px; -top: 335px; +top: 450px; !padding: 5px 5px 5px 5px; height: 135px; width: 100%; @@ -176,7 +175,7 @@ padding: 1px 1px 1px 1px ; background: black; width: 99%; - height: 690px; + height: 490px; } .svgmusic { @@ -186,7 +185,7 @@ border-radius: 15px; margin: 0px; width: 100%; - height: 330px; + height: 445px; } .magicsquare {
--- a/www/m/css/nodescore.css Sun Oct 14 00:26:42 2012 +0000 +++ b/www/m/css/nodescore.css Wed Dec 19 13:36:19 2012 +0000 @@ -32,7 +32,7 @@ .outermaster{ - height: 768px; + height: 800px; width: 1024px; border-radius: 15px; background-color:DimGray; @@ -49,7 +49,7 @@ margin-left:auto; margin-right:auto; margin-top:5px; !margin: 2px; width: 99%; - height: 90%; + height: 100%; text-align: center; border-radius: 15px; background-color:black;
--- a/www/m/js/nodescore-client.js Sun Oct 14 00:26:42 2012 +0000 +++ b/www/m/js/nodescore-client.js Wed Dec 19 13:36:19 2012 +0000 @@ -98,6 +98,9 @@ ///////////////////////////////////////////////// + + + socket.on("pageFlipfromserver", pageTurn); function pageTurn (group,unit,time,mm) { var groupPage=document.getElementById('group').value; @@ -106,7 +109,7 @@ var p= pad2(unit); // pageFlip(unit); pageTurnB(unit) - + testSound.play(); } else { console.log("not for this group... ignoring... for group:" + group );
--- a/www/m/js/nodescore-slides.js Sun Oct 14 00:26:42 2012 +0000 +++ b/www/m/js/nodescore-slides.js Wed Dec 19 13:36:19 2012 +0000 @@ -83,22 +83,18 @@ }} /////////////////////////////////////// - function pageFlip(unit) { console.log("flipping page:"+ unit); $('#sections').trigger('goto', [parseFloat(unit)]); } - ///////////////////////////////////////////////// - // call the fancy jquery functions - -function slideTo (target) { $('#sections').trigger('goto', [target]); } +//function slideTo (target) { $('#sections').trigger('goto', [target]); } function pad2(number) { return (number < 10 ? '0' : '') + number } ///////////////////////////////////////////////// - +//var testSound = new buzz.sound( 'audio/testfile', { formats: [ 'ogg', 'mp3' ] } ); socket.on("pageFlipfromserver", pageTurn); function pageTurn (group,unit,time,mm) { var groupPage=document.getElementById('group').value; @@ -107,7 +103,7 @@ var p= pad2(unit); // pageFlip(unit); pageTurnB(unit) - + } else { console.log("not for this group... ignoring... for group:" + group ); @@ -117,7 +113,7 @@ function pageTurnB(unit) { var units=6; var next=(((unit+1)%units)+units)%units - //console.log("HOP TURN" + unit+ "next:" + next); + console.log("HOP TURN" + unit+ "next:" + next); $("#live").load("music.html #"+unit +" *"); $("#preview").html("<h3 style='background:transparent; position: relative; font-size:1.5em;top:14px; left:10px;';> n e x t : </h3><img src='thumbs/"+next + ".png" + "' width='315'>") }
--- a/www/m/music.html Sun Oct 14 00:26:42 2012 +0000 +++ b/www/m/music.html Wed Dec 19 13:36:19 2012 +0000 @@ -5,14 +5,53 @@ .svgmusic {margin:0; width:1000px; height:330px;} .unit {padding:0px; bottom-margin:0; margin:0px; background:blue; height:330px;} </style> -</head> + <script src="js/jaysalvat-buzz-05c96cc/buzz.js"></script> +</head>> <body style="margin:0"> - <a id="1"><div class="unit" id="unit01"> <embed class="svgmusic" src="svg/13_6_2.svg" type="image/svg+xml"/> </div></a> - <a id="2"><div class="unit" id="unit02"> <embed class="svgmusic" src="svg/14_1_1.svg" type="image/svg+xml"/> </div></a> - <a id="3"><div class="unit" id="unit03"> <embed class="svgmusic" src="svg/15_0_2.svg" type="image/svg+xml"/> </div></a> - <a id="4"><div class="unit" id="unit04"> <embed class="svgmusic" src="svg/26_6_3.svg" type="image/svg+xml"/> </div></a> - <a id="5"><div class="unit" id="unit05"> <embed class="svgmusic" src="svg/44_7_5.svg" type="image/svg+xml"/> </div></a> - <a id="6"><div class="unit" id="unit06"> <embed class="svgmusic" src="svg/32_2_4.svg" type="image/svg+xml"/> </div></a> + <script> var testSound = new buzz.sound( 'audio/testfile', { formats: [ 'ogg', 'mp3' ] } );</script> + + <a id="0"><div class="unit" id="unit00"> <script>testSound.play();</script><embed class="svgmusic" src="svg/13_6_2.svg" type="image/svg+xml"/> </div></a> + <a id="1"><div class="unit" id="unit01"> <script>testSound.play();</script><embed class="svgmusic" src="svg/13_6_2.svg" type="image/svg+xml"/> </div></a> + <a id="2"><div class="unit" id="unit02"> <script>testSound.play();</script><embed class="svgmusic" src="svg/14_1_1.svg" type="image/svg+xml"/> </div></a> + <a id="3"><div class="unit" id="unit03"> <script>testSound.play();</script><embed class="svgmusic" src="svg/15_0_2.svg" type="image/svg+xml"/> </div></a> + <a id="4"><div class="unit" id="unit04"> <script>testSound.play();</script><embed class="svgmusic" src="svg/26_6_3.svg" type="image/svg+xml"/> </div></a> + <a id="5"><div class="unit" id="unit05"> <script>testSound.play();</script><embed class="svgmusic" src="svg/44_7_5.svg" type="image/svg+xml"/> </div></a> + <a id="6"><div class="unit" id="unit06"> <script>testSound.play();</script><embed class="svgmusic" src="svg/32_2_4.svg" type="image/svg+xml"/> </div></a> + <a id="7"><div class="unit" id="unit07"> <script>testSound.play();</script><embed class="svgmusic" src="svg/14_1_1.svg" type="image/svg+xml"/> </div></a> + <a id="8"><div class="unit" id="unit08"> <script>testSound.play();</script><embed class="svgmusic" src="svg/15_0_2.svg" type="image/svg+xml"/> </div></a> + <a id="9"><div class="unit" id="unit09"> <script>testSound.play();</script><embed class="svgmusic" src="svg/26_6_3.svg" type="image/svg+xml"/> </div></a> + <a id="10"><div class="unit" id="unit10"> <script>testSound.play();</script><embed class="svgmusic" src="svg/44_7_5.svg" type="image/svg+xml"/> </div></a> + <a id="11"><div class="unit" id="unit11"> <script>testSound.play();</script><embed class="svgmusic" src="svg/32_2_4.svg" type="image/svg+xml"/> </div></a> + <a id="12"><div class="unit" id="unit12"> <script>testSound.play();</script><embed class="svgmusic" src="svg/14_1_1.svg" type="image/svg+xml"/> </div></a> + <a id="13"><div class="unit" id="unit13"> <script>testSound.play();</script><embed class="svgmusic" src="svg/15_0_2.svg" type="image/svg+xml"/> </div></a> + <a id="14"><div class="unit" id="unit14"> <script>testSound.play();</script><embed class="svgmusic" src="svg/26_6_3.svg" type="image/svg+xml"/> </div></a> + <a id="15"><div class="unit" id="unit15"> <script>testSound.play();</script><embed class="svgmusic" src="svg/44_7_5.svg" type="image/svg+xml"/> </div></a> + <a id="16"><div class="unit" id="unit16"> <script>testSound.play();</script><embed class="svgmusic" src="svg/32_2_4.svg" type="image/svg+xml"/> </div></a> + <a id="17"><div class="unit" id="unit17"> <script>testSound.play();</script><embed class="svgmusic" src="svg/14_1_1.svg" type="image/svg+xml"/> </div></a> + <a id="18"><div class="unit" id="unit18"> <script>testSound.play();</script><embed class="svgmusic" src="svg/15_0_2.svg" type="image/svg+xml"/> </div></a> + <a id="19"><div class="unit" id="unit19"> <script>testSound.play();</script><embed class="svgmusic" src="svg/26_6_3.svg" type="image/svg+xml"/> </div></a> + <a id="20"><div class="unit" id="unit20"> <script>testSound.play();</script><embed class="svgmusic" src="svg/44_7_5.svg" type="image/svg+xml"/> </div></a> + <a id="21"><div class="unit" id="unit21"> <script>testSound.play();</script><embed class="svgmusic" src="svg/32_2_4.svg" type="image/svg+xml"/> </div></a> + <a id="22"><div class="unit" id="unit22"> <script>testSound.play();</script><embed class="svgmusic" src="svg/14_1_1.svg" type="image/svg+xml"/> </div></a> + <a id="23"><div class="unit" id="unit23"> <script>testSound.play();</script><embed class="svgmusic" src="svg/15_0_2.svg" type="image/svg+xml"/> </div></a> + <a id="24"><div class="unit" id="unit24"> <script>testSound.play();</script><embed class="svgmusic" src="svg/26_6_3.svg" type="image/svg+xml"/> </div></a> + <a id="25"><div class="unit" id="unit25"> <script>testSound.play();</script><embed class="svgmusic" src="svg/44_7_5.svg" type="image/svg+xml"/> </div></a> + <a id="26"><div class="unit" id="unit26"> <script>testSound.play();</script><embed class="svgmusic" src="svg/32_2_4.svg" type="image/svg+xml"/> </div></a> + <a id="27"><div class="unit" id="unit27"> <script>testSound.play();</script><embed class="svgmusic" src="svg/14_1_1.svg" type="image/svg+xml"/> </div></a> + <a id="28"><div class="unit" id="unit28"> <script>testSound.play();</script><embed class="svgmusic" src="svg/15_0_2.svg" type="image/svg+xml"/> </div></a> + <a id="29"><div class="unit" id="unit29"> <script>testSound.play();</script><embed class="svgmusic" src="svg/26_6_3.svg" type="image/svg+xml"/> </div></a> + <a id="30"><div class="unit" id="unit30"> <script>testSound.play();</script><embed class="svgmusic" src="svg/44_7_5.svg" type="image/svg+xml"/> </div></a> + <a id="31"><div class="unit" id="unit31"> <script>testSound.play();</script><embed class="svgmusic" src="svg/32_2_4.svg" type="image/svg+xml"/> </div></a> + <a id="32"><div class="unit" id="unit32"> <script>testSound.play();</script><embed class="svgmusic" src="svg/14_1_1.svg" type="image/svg+xml"/> </div></a> + <a id="33"><div class="unit" id="unit33"> <script>testSound.play();</script><embed class="svgmusic" src="svg/15_0_2.svg" type="image/svg+xml"/> </div></a> + <a id="34"><div class="unit" id="unit34"> <script>testSound.play();</script><embed class="svgmusic" src="svg/26_6_3.svg" type="image/svg+xml"/> </div></a> + <a id="35"><div class="unit" id="unit35"> <script>testSound.play();</script><embed class="svgmusic" src="svg/44_7_5.svg" type="image/svg+xml"/> </div></a> + + + + + + </body> </html>
--- a/www/m/score.html Sun Oct 14 00:26:42 2012 +0000 +++ b/www/m/score.html Wed Dec 19 13:36:19 2012 +0000 @@ -2,6 +2,7 @@ <html> <head> <script src="/socket.io/socket.io.js"></script> + <script src="js/jaysalvat-buzz-05c96cc/buzz.js"></script> <meta charset="UTF-8"> <title>score@nodescore</title> @@ -12,7 +13,8 @@ <link href="css/menu.css" rel="stylesheet"> <script src="js/jquery-1.7.1.min.js"></script> - <script src="js/nodescore-slides.js"></script> + <script src="js/nodescore-slides.js"></script> + </head> @@ -69,9 +71,15 @@ <div id="client_latency">Latency: 0ms</div> </div> + <div id="current"> + <script type="text/javascript"> + function setPart(sel) { + //var testSound = new buzz.sound( 'audio/testfile', { formats: [ 'ogg', 'mp3' ] } ); + //testSound.play(); + var value = sel.options[sel.selectedIndex].value; document.getElementById('group').value=value; //$('div#current').text('GROUP ' +value).text='value'; @@ -87,7 +95,6 @@ </div> </div> - </div>