diff --git a/index.html b/index.html index d7bd89ac7f0e5e0559796aadbd522fd5c28f5186..a35414f1c3147c3adb0ce741d84fe7c47ffc2d4d 100644 --- a/index.html +++ b/index.html @@ -121,6 +121,7 @@ // if bpm changes from other client, update slider pos here iosocket.on('setBpmSlider', function(newSliderVal){ $('#bpm').val(newSliderVal); + console.log(newSliderVal); }); // send bpm change to server @@ -204,7 +205,6 @@ $('body').css('background-color', randomColor()); //} var sound = $('#row'+i+' select').val(); - console.log(sound); this[sound].pause(); this[sound].currentTime = 0; this[sound].playbackRate = $('#pitchRow'+i).val(); @@ -215,8 +215,12 @@ } function randomColor(){ - return(function(m,s,c){return (c ? arguments.callee(m,s,c-1) : '#') + - s[m.floor(m.random() * s.length)]})(Math,'0123456789ABCDEF',5) + var value = Math.random() * 0xFF | 0; + var grayscale = (value << 16) | (value << 8) | value; + var color = '#' + grayscale.toString(16); + return color; + //return(function(m,s,c){return (c ? arguments.callee(m,s,c-1) : '#') + + //s[m.floor(m.random() * s.length)]})(Math,'0123456789ABCDEF',5) }