Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoder authored Sep 13, 2020
1 parent ba754fd commit a209ef1
Show file tree
Hide file tree
Showing 8 changed files with 848 additions and 6 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Sam Poder

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 💥 buzza

A buzzer app for Quiz Bowls made using Socket.io & Javascript.
15 changes: 9 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Piano on the Web</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="/socket.io/socket.io.js"></script>
<link href="/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css" integrity="sha512-Oy18vBnbSJkXTndr2n6lDMO5NN31UljR8e/ICzVPrGpSud4Gkckb8yUpqhKuUNoE+o9gAb4O/rAxxw1ojyUVzg==" crossorigin="anonymous" />
</head>

<body class="markdown-body">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tone/14.7.52/Tone.js">
</script>
<div>
<h1>Piano on the Web</h1>
<h1>Global piano</h1>
<p>Hey there! This site allows you to make music like you would on any piano! Let's make some noise!</p>
<p>Click the <kbd>S</kbd> key to make a middle C (or C4), then <kbd>D</kbd> to make D4 and so on up until B4 with the <kbd>K</kbd> key.
<p>Click the <kbd>S</kbd> key to make a play the C note, then <kbd>D</kbd> to make D4 and so on up until B4 with the <kbd>K</kbd> key.
<p>To move up and down the piano, click <kbd>⬅︎</kbd> and <kbd></kbd>. Your current section is <kbd id="sectionNo">4</kbd>
</p>
<p>Not hearing anything? You need to play a key to join!</p>
</div>
<div id="piano">
<span class="key" id="C"><strong>C</strong></span>
Expand All @@ -26,6 +30,5 @@ <h1>Piano on the Web</h1>
<span class="key" id="A"><strong>A</strong></span>
<span class="key" id="B"><strong>B</strong></span>
</div>
<script src="script.js"></script>
</body>
</html>
<script src="/script.js"></script>
</html>
21 changes: 21 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
var app = require("express")();
var http = require("http").Server(app);
var io = require("socket.io")(http);
var express = require('express');
var path = require('path');

app.use(express.static(__dirname + '/public'));

app.get("/", function(req, res) {
res.sendfile("index.html");
});

io.on("connection", function(socket) {
socket.on("new-sound", function(msg) {
io.sockets.emit("new-sound", msg);
});
});

http.listen(3000, function() {
console.log("listening on localhost:3000");
});
Loading

0 comments on commit a209ef1

Please sign in to comment.