-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrumkit.html
More file actions
77 lines (71 loc) · 2.06 KB
/
drumkit.html
File metadata and controls
77 lines (71 loc) · 2.06 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Squelchpad Drumkit</title>
<!--meta name="viewport" content="width=device-width" -->
<meta name="viewport" content="width=520,maximum-scale=3.0">
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/jquery-color/jquery.color.js"></script>
<script src="src/squelchpad.js"></script>
<script src="src/squelchpad-drum.js"></script>
<script>$(function($) {
var context;
try {
context = new webkitAudioContext();
} catch(e) { alert("Web Audio API is not supported in this browser"); }
new DrumPad({
context: context,
element: $('#bt0'),
baseColor: 'red',
samples: [
{ sample: 'sounds/kick.wav', position: 'M' },
{ sample: 'sounds/kick-large.wav', position: 'M', inverse: true },
{ sample: 'sounds/kick-huge.wav', position: 'MT' }
]
});
new DrumPad({
context: context,
element: $('#bt1'),
baseColor: '#d43cf3',
samples: [
{ sample: 'sounds/hihat-closed.wav', position: 'T', pan: true },
{ sample: 'sounds/hihat-open.wav', position: 'B' }
] });
new DrumPad({
context: context,
element: $('#bt2'),
baseColor: '#4fcb71',
samples: [
{ sample: 'sounds/snare.wav', position: 'M' },
{ sample: 'sounds/clap.wav', position: 'M', inverse: true },
{ sample: 'sounds/crash.wav', position: 'MT' }
]
});
new DrumPad({
context: context,
element: $('#bt3'),
baseColor: 'blue',
samples: [
{ sample: 'sounds/tom1.wav', position: 'TL' },
{ sample: 'sounds/tom2.wav', position: 'TR' },
{ sample: 'sounds/tom3.wav', position: 'BR' },
{ sample: 'sounds/tom4.wav', position: 'BL' },
{ sample: 'sounds/tom5.wav', position: 'M' }
]
});
});</script>
</head>
<body>
<table>
<tr>
<td><div class="squelch" id="bt0"></div></td>
<td><div class="squelch" id="bt1"></div></td>
</tr>
<tr>
<td><div class="squelch" id="bt2"></div></td>
<td><div class="squelch" id="bt3"></div></td>
</tr>
</table>
<p><a href="index.html">back</a></p>
</body>
</html>