Permalink
Browse files

wtfasdasd

  • Loading branch information...
1 parent 92a4c71 commit c2ba62a3fad99ff2ead180f8f99e85405623c755 Sridatta Thatipamala committed Mar 10, 2011
Showing with 18 additions and 87 deletions.
  1. +0 −83 public/index.html
  2. +18 −4 server.js
View
@@ -1,83 +0,0 @@
-<html lang="en">
-<head>
-<title>Jazzroom - classy js and chill</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta http-equiv="Content-Language" content="en-us">
-
-<link href="css/style.css" rel="stylesheet" type="text/css">
-
-
-<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
-
-<script type="text/javascript" src="http://192.168.2.107:8080/nowjs/nowClientLib.js"></script>
-
-<script type="text/javascript" src="js/jquery.jplayer.min.js"></script>
-<script type="text/javascript" src="js/jazz.js">
-
- var instrument = <%=instrument%>;
-
-</script>
-
-
-</head>
-
-<body>
-
-<div id="wrap">
- <div id="head"></div>
- <div id="main">
- <div id="instruments">
- <div id="piano"></div>
- <div id="bass"></div>
- <div id="drum"></div>
- </div>
- <div id="disp">
-
- </div>
- <div id="cover"></div>
- </div>
- <div id="players">
- <div class="piano" id="piano-c"></div>
- <div class="piano" id="piano-cs"></div>
- <div class="piano" id="piano-d"></div>
- <div class="piano" id="piano-ds"></div>
- <div class="piano" id="piano-e"></div>
- <div class="piano" id="piano-f"></div>
- <div class="piano" id="piano-fs"></div>
- <div class="piano" id="piano-g"></div>
- <div class="piano" id="piano-gs"></div>
- <div class="piano" id="piano-a"></div>
- <div class="piano" id="piano-as"></div>
- <div class="piano" id="piano-b"></div>
-
- <div class="bass" id="bass-c"></div>
- <div class="bass" id="bass-cs"></div>
- <div class="bass" id="bass-d"></div>
- <div class="bass" id="bass-ds"></div>
- <div class="bass" id="bass-e"></div>
- <div class="bass" id="bass-f"></div>
- <div class="bass" id="bass-fs"></div>
- <div class="bass" id="bass-g"></div>
- <div class="bass" id="bass-gs"></div>
- <div class="bass" id="bass-a"></div>
- <div class="bass" id="bass-as"></div>
- <div class="bass" id="bass-b"></div>
-
- <div class="drum" id="drum-c"></div>
- <div class="drum" id="drum-cs"></div>
- <div class="drum" id="drum-d"></div>
- <div class="drum" id="drum-ds"></div>
- <div class="drum" id="drum-e"></div>
- <div class="drum" id="drum-f"></div>
- <div class="drum" id="drum-fs"></div>
- <div class="drum" id="drum-g"></div>
- <div class="drum" id="drum-gs"></div>
- <div class="drum" id="drum-a"></div>
- <div class="drum" id="drum-as"></div>
- <div class="drum" id="drum-b"></div>
- </div>
-</div>
-
-
-</body>
-</html>
View
@@ -16,10 +16,22 @@ app.use(express.errorHandler({ showStack: true, dumpExceptions: true }));
//
-app.get('/:room/:instrument', function(req, res){
-
- res.render('index', {locals: {instrument: req.params.instrument, room: req.params.room}});
-
+app.get('/', function(req, res){
+ var room = Math.floor(uCount/3);
+ var instrument;
+ switch(uCount%3){
+ case 0:
+ instrument = 'piano';
+ break;
+ case 1:
+ instrument = 'bass';
+ break;
+ case 2:
+ instrument = 'drum';
+ break;
+ }
+ uCount++;
+ res.render('index', {locals: {instrument: instrument, room: room}});
});
@@ -36,6 +48,8 @@ var everyone = require("./lib/nowServerLib.js").initialize(server);
everyone.now.receiveTick = function(){};
+uCount = 0;
+
setInterval(function(){everyone.now.receiveTick();}, 2000);
everyone.now.filterNote = function(type, note, id, room){

0 comments on commit c2ba62a

Please sign in to comment.