From 25e9a06f958d646adfb305b56fb41edc16aa8191 Mon Sep 17 00:00:00 2001
From: Jonas Blumer <jonas.blumer@entwicklungspark.com>
Date: Fri, 27 Nov 2015 11:39:22 +0100
Subject: [PATCH] changed bg color to only grays and made speed range way
 smaller...too small maybe...dunno

---
 index.html | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/index.html b/index.html
index d7bd89a..a35414f 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)
         }
 
 
-- 
GitLab