-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
242 lines (242 loc) · 10.1 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html lang="en">
<body>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Virtual Keyboard</title>
<link rel="stylesheet" href="styles.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap"
rel="stylesheet"
/>
</head>
<header>
<h1 id="logo">piano.io</h1>
<nav>
<ul>
<li><button class="info-page btn">Info</button></li>
<li><button class="open btn">Sheet music</button></li>
<li><a href="mailto:[email protected]">Contact</a></li>
<hr />
<li>
<a href="https://github.com/alekzandriia/virtual-piano/tree/main"
>Source Code</a
>
</li>
</ul>
</nav>
</header>
<dialog class="modal">
<button class="close">X</button>
<iframe
src="files/ode-to-joy-sheet-music.pdf"
frameborder="0"
id="embed"
></iframe>
</dialog>
<main class="show" id="homepage">
<figure class="piano">
<h2 id="tickle-the-ivories">Tickle the Ivories</h2>
<div>
<div class="piano-wrapper">
<ul class="piano-keys">
<li class="keys">
<span data-key="01" title="C" class="white key"></span>
<span data-key="02" title="C#" class="black key"></span>
</li>
<li class="keys">
<span data-key="03" title="D" class="white key"></span>
<span data-key="04" title="D#" class="black key"></span>
</li>
<li class="keys">
<span data-key="05" title="E" class="white key"></span>
</li>
<li class="keys">
<span data-key="06" title="F" class="white key"></span>
<span data-key="07" title="F#" class="black key"></span>
</li>
<li class="keys">
<span data-key="08" title="G" class="white key"></span>
<span data-key="09" title="G#" class="black key"></span>
</li>
<li class="keys">
<span data-key="10" title="A" class="white key"></span>
<span data-key="11" title="A#" class="black key"></span>
</li>
<li class="keys">
<span data-key="12" title="B" class="white key"></span>
</li>
<li class="keys">
<span data-key="13" title="2C" class="white key"></span>
<span data-key="14" title="2C#" class="black key"></span>
</li>
<li class="keys">
<span data-key="15" title="2D" class="white key"></span>
<span data-key="16" title="2D#" class="black key"></span>
</li>
<li class="keys">
<span data-key="17" title="2E" class="white key"></span>
</li>
<li class="keys">
<span data-key="18" title="2F" class="white key"></span>
<span data-key="19" title="2F#" class="black key"></span>
</li>
<li class="keys">
<span data-key="20" title="2G" class="white key"></span>
<span data-key="21" title="2G#" class="black key"></span>
</li>
<li class="keys">
<span data-key="22" title="2A" class="white key"></span>
<span data-key="23" title="2A#" class="black key"></span>
</li>
<li class="keys">
<span data-key="24" title="2B" class="white key"></span>
</li>
</ul>
</div>
</div>
<figcaption>
<p>
Figure 1: This keyboard has 24 keys. The music notes are MP3 files
sourced from the
<a href="https://archive.org/details/24-piano-keys "
>Internet Archive</a
>.
</p>
</figcaption>
</figure>
</main>
<main class="hide" id="infopage">
<button class="back">Back to Home</button>
<section class="">
<h2>Keys</h2>
<ul>
<li>
The number of keys on a keyboard or piano varies between models.
</li>
<li>A standard piano has 88 keys, 52 white and 36 black.</li>
<li>A standard keyboard has 61 keys, 36 white and 25 black.</li>
</ul>
<p>
Regardless of the total number, boards are configured in a pattern of
repeating seven white keys and five black keys.
</p>
<p>
Each iteration encompasses a full octave, and contains one key for
each of the notes in the Western musical scale
</p>
</section>
<section class="">
<h2>Misc</h2>
<ul>
<li>
The
<a
href="https://www.classicfm.com/music-news/pictures/worlds-biggest-grand-piano-ventspils-latvia/"
>world's largest piano</a
>
is 15ft tall, it's so big that you need to climb a flight of stairs
to play it.
</li>
<li>
LEGO released a 3,622-piece
<a href="https://www.lego.com/en-ca/product/grand-piano-21323"
>model</a
>
of a grand piano that plays beautiful
<a href="https://www.youtube.com/watch?v=qgg61no1Hm4&t=156s"
>music</a
>.
</li>
<li>
The piano was originally called the pianoforte, referring to the
instruments ability to play both loud (forte) and soft (piano)
notes.
</li>
<li>
Pianos keys were once made with ivory. Hence the phrase
<a href="#tickle-the-ivories">"tickle the ivories."</a> Fortunately,
that fell out of fashion (because ivory is porous and easily
dirties, not because PETA stepped in).
</li>
<li>
<a
href="https://joshuarosspiano.com/why-does-piano-have-black-and-white-keys/"
>Nobody actually knows</a
>
why piano keys are black and white.
</li>
</ul>
</section>
</main>
<footer>
<ul>
<li>
<a href="https://www.facebook.com/alekzandriia"
><svg
xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
width="100"
height="100"
viewBox="0 0 50 50"
>
<path
d="M25,2C12.318,2,2,12.317,2,25s10.318,23,23,23c12.683,0,23-10.317,23-23S37.683,2,25,2z M32,16h-3.29 C26.772,16,26,16.455,26,17.806V21h6l-1,5h-5v13h-6V26h-3v-5h3v-2.774C20,14.001,21.686,11,26.581,11C29.203,11,32,12,32,12V16z"
></path></svg
></a>
</li>
<li>
<a href="https://www.instagram.com/alekzandriia"
><svg
xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
width="100"
height="100"
viewBox="0 0 50 50"
>
<path
d="M 16 3 C 8.83 3 3 8.83 3 16 L 3 34 C 3 41.17 8.83 47 16 47 L 34 47 C 41.17 47 47 41.17 47 34 L 47 16 C 47 8.83 41.17 3 34 3 L 16 3 z M 37 11 C 38.1 11 39 11.9 39 13 C 39 14.1 38.1 15 37 15 C 35.9 15 35 14.1 35 13 C 35 11.9 35.9 11 37 11 z M 25 14 C 31.07 14 36 18.93 36 25 C 36 31.07 31.07 36 25 36 C 18.93 36 14 31.07 14 25 C 14 18.93 18.93 14 25 14 z M 25 16 C 20.04 16 16 20.04 16 25 C 16 29.96 20.04 34 25 34 C 29.96 34 34 29.96 34 25 C 34 20.04 29.96 16 25 16 z"
></path></svg
></a>
</li>
<li>
<a href="https://www.twitter.com/alekzandriia"
><svg
xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
width="100"
height="100"
viewBox="0 0 50 50"
>
<path
d="M25,2C12.317,2,2,12.317,2,25s10.317,23,23,23s23-10.317,23-23S37.683,2,25,2z M36.237,20.524 c0.01,0.236,0.016,0.476,0.016,0.717C36.253,28.559,30.68,37,20.491,37c-3.128,0-6.041-0.917-8.491-2.489 c0.433,0.052,0.872,0.077,1.321,0.077c2.596,0,4.985-0.884,6.879-2.37c-2.424-0.044-4.468-1.649-5.175-3.847 c0.339,0.065,0.686,0.1,1.044,0.1c0.505,0,0.995-0.067,1.458-0.195c-2.532-0.511-4.441-2.747-4.441-5.432c0-0.024,0-0.047,0-0.07 c0.747,0.415,1.6,0.665,2.509,0.694c-1.488-0.995-2.464-2.689-2.464-4.611c0-1.015,0.272-1.966,0.749-2.786 c2.733,3.351,6.815,5.556,11.418,5.788c-0.095-0.406-0.145-0.828-0.145-1.262c0-3.059,2.48-5.539,5.54-5.539 c1.593,0,3.032,0.672,4.042,1.749c1.261-0.248,2.448-0.709,3.518-1.343c-0.413,1.292-1.292,2.378-2.437,3.064 c1.122-0.136,2.188-0.432,3.183-0.873C38.257,18.766,37.318,19.743,36.237,20.524z"
></path></svg
></a>
</li>
<li>
<a href="mailto:[email protected]"
><svg
xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
width="100"
height="100"
viewBox="0 0 50 50"
>
<path
d="M25,2c12.703,0,23,10.297,23,23S37.703,48,25,48S2,37.703,2,25S12.297,2,25,2z M32.934,34.375 c0.423-1.298,2.405-14.234,2.65-16.783c0.074-0.772-0.17-1.285-0.648-1.514c-0.578-0.278-1.434-0.139-2.427,0.219 c-1.362,0.491-18.774,7.884-19.78,8.312c-0.954,0.405-1.856,0.847-1.856,1.487c0,0.45,0.267,0.703,1.003,0.966 c0.766,0.273,2.695,0.858,3.834,1.172c1.097,0.303,2.346,0.04,3.046-0.395c0.742-0.461,9.305-6.191,9.92-6.693 c0.614-0.502,1.104,0.141,0.602,0.644c-0.502,0.502-6.38,6.207-7.155,6.997c-0.941,0.959-0.273,1.953,0.358,2.351 c0.721,0.454,5.906,3.932,6.687,4.49c0.781,0.558,1.573,0.811,2.298,0.811C32.191,36.439,32.573,35.484,32.934,34.375z"
></path></svg
></a>
</li>
</ul>
</footer>
<script src="app.js"></script>
</body>
</html>