-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathxylophone.html
92 lines (91 loc) · 2.51 KB
/
xylophone.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
82
83
84
85
86
87
88
89
90
91
92
<!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: gray;
border-radius: 3px;
height: 60%;
width: 60%;
z-index: 1;
position: absolute;
top: 0;
left: -30%;
}
.pressed {
background-color: grey !important;
}
.beat {
background-color: rgb(255, 188, 69);
}
</style>
</head>
<body>
<table>
<tr>
<td id="a1x" class="beat"></td>
<td id="c1x" class="beat"></td>
<td id="d1x" class="beat"></td>
<td id="e1x" class="beat"></td>
<td id="g1x" class="beat"></td>
<td id="a2x" class="beat"></td>
<td id="c2x" class="beat"></td>
<td id="d2x" class="beat"></td>
<td id="e2x" class="beat"></td>
<td id="g2x" class="beat"></td>
<td id="a3x" class="beat"></td>
<td id="c3x" class="beat"></td>
<td id="d3x" class="beat"></td>
<td id="e3x" 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__ = "XYLO";
var beats = {
// XYLO
"a1x":"xylophone/A0.wav",
"c1x":"xylophone/C0.wav",
"d1x":"xylophone/D0.wav",
"e1x":"xylophone/E0.wav",
"g1x":"xylophone/G0.wav",
"a2x":"xylophone/A.wav",
"c2x":"xylophone/C.wav",
"d2x":"xylophone/D.wav",
"e2x":"xylophone/E.wav",
"g2x":"xylophone/G.wav",
"a3x":"xylophone/A1.wav",
"c3x":"xylophone/C1.wav",
"d3x":"xylophone/D1.wav",
"e3x":"xylophone/E1.wav",
"g3x":"xylophone/G1.wav"
}
var key_to_sound = {
"W": "e1x",
"A": "g1x",
"S": "a2x",
"D": "c2x",
"F": "d2x",
"G": "e2x"
}
</script>
</body>
</html>