diff --git a/app.js b/app.js index 1710eb68b1db4d5c9f94bf58aa76cea2a169e061..6e21e9143e28b6955ef178b1f7db017b91f5f362 100644 --- a/app.js +++ b/app.js @@ -30,7 +30,7 @@ io.on('connection', function(socket){ io.sockets.emit('updateUserCount', Object.keys(io.engine.clients).length); socket.on('disconnect', function(){ io.sockets.emit('updateUserCount', Object.keys(io.engine.clients).length); - //io.sockets.emit('clearExternalData'); + io.sockets.emit('clearExternalData'); }); console.log('a user connected'); socket.on('bpm', function(newBpm){ @@ -41,11 +41,6 @@ io.on('connection', function(socket){ }); io.sockets.emit('setBpmSlider', bpm); - /* - socket.on('playSound', function(data){ - socket.broadcast.emit('playExternalSound', data); - }); - */ socket.on('grid', function(data){ socket.broadcast.emit('updateExternalGrid', data); }); diff --git a/public/client.js b/public/client.js index 94b68cce9d126e6f92afc99146fdda97980e5a1b..3f28af50d0b436d5889e8b5fdc12919e979a9742 100644 --- a/public/client.js +++ b/public/client.js @@ -18,7 +18,6 @@ $(function(){ // metronome iosocket.on('metronome', function(serverStepPos){ - console.log('tick'); stepPos = serverStepPos; advanceStep(stepPos); playExternalSound(); @@ -32,15 +31,14 @@ $(function(){ }); iosocket.on('updateExternalGrid', function(data){ - //playExternalSound(data)); externalGrid = data; }); - /* + iosocket.on('clearExternalData', function(){ externalGrid = null; }); - */ + iosocket.on('updateUserCount', function(userCount){ userCount--; @@ -128,14 +126,12 @@ function generateSteps(){ function playSound(){ for (var i = 0; i < 4; i++){ if($('.step'+stepPos)[i].checked){ - //$('body').css('background-color', randomColor()); var sound = $('#row'+i+' select').val(); this[sound].pause(); this[sound].currentTime = 0; this[sound].playbackRate = $('#pitchRow'+i).val(); this[sound].volume = $('#volumeRow'+i).val(); this[sound].play(); - //iosocket.emit('playSound', {pitch: $('#pitchRow'+i).val(), sound: sound}); } } } diff --git a/public/style.css b/public/style.css index 4bc04b01889d77734bb84df990c33ee16e3c1022..842f918ebd697f14ac5d3f731c9adf11574b399b 100644 --- a/public/style.css +++ b/public/style.css @@ -5,10 +5,10 @@ body{ font-family: 'Codystar', cursive; color:#9d0000; -webkit-user-select: none; --khtml-user-select: none; --moz-user-select: none; --o-user-select: none; -user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; } #container{ @@ -28,12 +28,11 @@ user-select: none; .beatIndicator{ border: 1px solid black; - width: 8px; height: 8px; margin-right:8px; margin-left:8px; border-radius: 5px; - float: left; + } .beatIndicator.inactive{ @@ -85,6 +84,7 @@ label.css-label { td{ vertical-align: middle!important; border-radius:7px; + width:20px; } .styled-select select {