-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
119 lines (112 loc) · 4.67 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Project 1 - Canvas Guitar</title>
<link rel="icon" type="image/png" href="favicon.png">
<link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fauna+One&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles/index-styles.css">
<script src="https://tonejs.github.io/build/Tone.js"></script>
<script src="src/crlLIB.js"></script>
<script src="src/guitar.js"></script>
<script src="src/ambience.js"></script>
<script src="src/index.js"></script>
</head>
<body>
<section id="main">
<h1>Canvas Guitar</h1>
<canvas id="guitarCanvas"></canvas>
<p id="description">
Listen to the calming sounds of nature as you strum your guitar.<br> Change your environment with the dropdown menu below.
</p>
</section>
<section id="instructions">
<ul>
<li>
<h2>Instructions</h2>
<ul class="chunk">
<li>
<p>Hold the left mouse button and<br> mouse over a string to tug on it.</p>
</li>
<li>
<p>Pull it far enough or release the<br> left mouse button and it will be plucked.</p>
</li>
</ul>
</li>
<li>
<ul class="chunk">
<li>
<h3>Keyboard Controls</h3>
<ul id="keyboard-controls">
<li>
<ul class="chunk">
<li>
<p>Left Arrow - Pluck 1st string</p>
</li>
<li>
<p>Down Arrow - Pluck 2nd string</p>
</li>
<li>
<p>Right Arrow - Pluck 3rd string</p>
</li>
</ul>
</li>
<li>
<ul class="chunk">
<li>
<p>Numpad 4 - Pluck 4th string</p>
</li>
<li>
<p>Numpad 5 - Pluck 5th string</p>
</li>
<li>
<p>Numpad 6 - Pluck 6th string</p>
</li>
</ul>
</li>
<li>
<ul class="chunk">
<li>
<p>Hold 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, or =<br> to press fret numbers 1-12</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section id="controls">
<h2>Controls</h2>
<ul>
<li>
<label for="ambience">Ambience:</label>
<select name="ambience" id="ambience">
<option value="morning" selected>Morning</option>
<option value="evening">Evening</option>
<option value="rain">Rain</option>
<option value="none">None</option>
</select>
</li>
<li>
<label for="ambienceVolume">Ambience Volume:</label>
<input type="range" min="0" max="100" value="60" name="ambienceVolume" id="ambienceVolume" step="2">
</li>
<li>
<label for="instrument">Instrument:</label>
<select name="instrument" id="instrument">
<option value="acousticGuitar" selected>Acoustic Guitar</option>
<option value="synth">Synthesizer</option>
</select>
</li>
<li>
<label for="instrumentVolume">Instrument Volume:</label>
<input type="range" min="0" max="100" value="80" name="instrumentVolume" id="instrumentVolume" step="2">
</li>
</ul>
</section>
</body>
</html>