-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpiano.html
81 lines (80 loc) · 2.34 KB
/
piano.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Synergic Noise</title>
<style>
table {
height: 100%;
width: 100%;
position: absolute;
top: -5px;
bottom: 0;
left: 0;
right: 0;
}
td {
position: relative;
border: 1px solid grey;
border-radius: 3px;
}
span {
background-color: black;
border-radius: 3px;
height: 60%;
width: 60%;
z-index: 1;
position: absolute;
top: 0;
left: -30%;
}
.pressed {
background-color: grey;
}
</style>
</head>
<body>
<table>
<tr>
<td id="1-c1" class="beat"></td>
<td id="3-d1" class="beat"><span id="2-c1s" class="beat"></span></td>
<td id="5-e1" class="beat"><span id="4-d1s" class="beat"></span></td>
<td id="6-f1" class="beat"></td>
<td id="8-g1" class="beat"><span id="7-f1s" class="beat"></span></td>
<td id="10-a1" class="beat"><span id="9-g1s" class="beat"></span></td>
<td id="12-b1" class="beat"><span id="11-a1s" class="beat"></span></td>
<td id="13-c2" class="beat"></td>
</tr>
</table>
<script src="/socket.io/socket.io.js"></script>
<script src="jquery-1.11.0.min.js"></script>
<script src="instrument.js"></script>
<script type="text/javascript">
var __name__ = "PIANO";
var beats = {
// PIANO
"1-c1":"piano/1-c1.wav",
"2-c1s":"piano/2-c1s.wav",
"3-d1":"piano/3-d1.wav",
"4-d1s":"piano/4-d1s.wav",
"5-e1":"piano/5-e1.wav",
"6-f1":"piano/6-f1.wav",
"7-f1s":"piano/7-f1s.wav",
"8-g1":"piano/8-g1.wav",
"9-g1s":"piano/9-g1s.wav",
"10-a1":"piano/10-a1.wav",
"11-a1s":"piano/11-a1s.wav",
"12-b1":"piano/12-b1.wav",
"13-c2":"piano/13-c2.wav"
}
var key_to_sound = {
"W": "1-c1",
"A": "3-d1",
"S": "5-e1",
"D": "6-f1",
"F": "8-g1",
"G": "10-a1"
}
</script>
</body>
</html>