Skip to content
Snippets Groups Projects
Commit 25e9a06f authored by Jonas Blumer's avatar Jonas Blumer
Browse files

changed bg color to only grays and made speed range way smaller...too small maybe...dunno

parent 45e01cdd
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment