-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (45 loc) · 2.52 KB
/
index.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
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=PT+Mono" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Webcam Drumkit</title>
</head>
<body>
<h2><a href="https://tommarx.fr">Tom Marx</a></h2>
<div id="main">
<h1><i class="fas fa-drum"></i> Control a drum kit with your webcam !</h1>
<p>
This project was made only using p5.js.
You can <b>drag pads</b> where you want, and <b>change their size</b> with the 'Pad size' slider.<br />
The <b>background behind you lightness should be the most different possible than your skin tone</b>. If your skin tone is darker than the background, check the dark skin mode.<br />
<i class="fab fa-github"></i> Check source code : <a class="button" href="https://github.com/t0mm4rx/WebcamDrumming" target="_blank"><i class="fas fa-external-link-alt"></i> Github repo</a>
</p>
<div id="canvas_wrapper">
<div id="sliders">
<span>Dark skin mode</span>
<input type="checkbox" onchange="dark_skin_mode = this.checked" />
<span>Pad size</span>
<input oninput="pad_size = this.value" type="range" min="10" max="200" value="50" />
<span>Kick sensitivity</span>
<input oninput="pads[0].threeshold = this.value" type="range" min="10" max="200" value="120" />
<span>Snare sensitivity</span>
<input oninput="pads[1].threeshold = this.value" type="range" min="10" max="200" value="120" />
<span>Open hi-hat sensitivity</span>
<input oninput="pads[2].threeshold = this.value" type="range" min="10" max="200" value="120" />
<span>Hi-hat sensitivity</span>
<input oninput="pads[3].threeshold = this.value" type="range" min="10" max="200" value="120" />
<span>Symbal sensitivity</span>
<input oninput="pads[4].threeshold = this.value" type="range" min="10" max="200" value="120" />
</div>
</div>
</div>
</body>
<script src="p5/p5.min.js"></script>
<script src="p5/addons/p5.sound.min.js"></script>
<script src="p5/addons/p5.dom.min.js"></script>
<script src="script.js"></script>
</html>