-
Notifications
You must be signed in to change notification settings - Fork 0
/
piano.html
310 lines (258 loc) · 14.5 KB
/
piano.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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- Latest js CDN's -->
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js" integrity="sha256-0YPKAwZP7Mp3ALMRVB2i8GXeEndvCq3eSl/WsAl1Ryk="
crossorigin="anonymous"></script>
<!-- bootstrap CDN's -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!--Scripts-->
<script type="text/javascript" src="./js/LinkedList.js"></script>
<script type="text/javascript" src="./js/Node.js"></script>
<script type="text/javascript" src="./js/noteObtain.js"></script>
<script type="text/javascript" src="./js/jq_note_display.js"></script>
<!--Stylesheets-->
<link rel="stylesheet" type="text/css" href="./css/style_home.css">
<link rel="stylesheet" type="text/css" href="./css/style_piano.css">
<link rel="stylesheet" type="text/css" href="./css/style_fretboard.css">
<title>Fret Viz</title>
</head>
<body>
<embed src="High Seiko SQ50.wav" autostart="false" width="0" height="0" id="metronome-sound" enablejavascript="true">
<div class='row' id="header" style="margin-bottom:1.5em">
<div class="col-sm-4">
<nav class="navbar " id="headNavbar">
<div class="collapse navbar-collapse">
<ul class="navbar-nav">
<li class="nav-item"> <a href="" class="nav-link">Piano</a> </li>
<li class="nav-item"> <a href="~/../index.html" class="nav-link">Guitar</a></li>
<li class="nav-item"> <a href="personal_info.html" class="nav-link">About Me</a></li>
</ul>
</div>
</nav>
</div>
<div class="col-sm-6">
<h1>Piano Visualization</h1>
</div>
</div>
<!-- Displays the key selections tools, roman numeral option and generate and clear-->
<div class="row">
<div class="col-sm-2 col-sm-offset-2">
<h2 >Choose a Scale</h2>
</div>
</div>
<div class="row" style="margin:2em">
<article id="chordSetUp">
<!-- root note -->
<div class="form-group col-sm-2 col-sm-offset-2">
<label for="notes" style="font-size:20px">Select a root note:<span class"glyphicon glyphicon-music"></span></label>
<select class="form-control" name="notes" id="notes">
<option value="A">A</option>
<option value="A#">A#</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="C#">C#</option>
<option value="D">D</option>
<option value="D#">D#</option>
<option value="E">E</option>
<option value="F">F</option>
<option value="F#">F#</option>
<option value="G">G</option>
<option value="G#">G#</option>
</select>
</div>
<!-- mode/scale -->
<div class="form-group col-sm-2">
<label for="modes" style="font-size:20px">Select a mode/scale:</label>
<select class="form-control" name="modes" id="modes">
<option value="MAJOR">Major</option>
<option value="DORIAN">Dorian</option>
<option value="PHRYGIAN">Phrygian</option>
<option value="LYDIAN">Lydian</option>
<option value="MIXOLYDIAN">Mixolydian</option>
<option value="MINOR">Minor</option>
<option value="LOCRIAN">Locrian</option>
<option value="MAJOR-PENT">Maj. Pentatonic</option>
<option value="MINOR-PENT">Min. Pentatonic</option>
<option value="MAJ-MIN-PENT">Major & Minor Pent</option>
</select>
</div>
<!-- Option to add in blue and bebop notes -->
<!--<input type="checkbox" name="BEBOP" value="BEBOP">Bebop  -->
<!--<input type="checkbox" name="BLUES" value="BLUES">Blues Note<br>-->
<!-- Submit and clear functionality -->
<div class="col-sm-1">
<label for="modeAndNoteSubmit">Generate Scale!</label>
<button type="button" class="btn btn-success" id="modeAndNoteSubmit">
<span class="glyphicon glyphicon-music"></span>
</button>
</div>
<div class="col-sm-1">
<label for="modeAndNoteSubmit">Clear Scale!</label>
<button type="button" class="btn btn-warning" id="clearBoard">
<span class="glyphicon glyphicon-refresh"></span>
</button>
</div>
<!-- <div class="col-sm-1">
<button class="btn"><span class="glyphicon glyphicon-info-sign"></span></button>
</div> -->
</article>
</div>
<!-- scale info dynamic display -->
<div class="row">
<div class="col-sm-offset-2 col-sm-3">
<h2 id="currentScale"></h2>
<p id="scalePara"></p>
</div>
</div>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<div class="piano">
<ul class="twoOctaves">
<li class="key white"> <div class="whitenote note C"> C </div> </li>
<li class="key black"> <div class="blacknote note Csharp"> C# </div> </li>
<li class="key white"> <div class="whitenote note D"> D </div> </li>
<li class="key black"> <div class="blacknote note Dsharp"> D# </div> </li>
<li class="key white"> <div class="whitenote note E"> E </div> </li>
<li class="key white"> <div class="whitenote note F"> F </div> </li>
<li class="key black"> <div class="blacknote note Fsharp"> F# </div> </li>
<li class="key white"> <div class="whitenote note G"> G </div> </li>
<li class="key black"> <div class="blacknote note Gsharp"> G# </div> </li>
<li class="key white"> <div class="whitenote note A"> A </div> </li>
<li class="key black"> <div class="blacknote note Asharp"> A# </div> </li>
<li class="key white"> <div class="whitenote note B"> B </div> </li>
<li class="key white"> <div class="whitenote note C"> C </div> </li>
<li class="key black"> <div class="blacknote note Csharp"> C# </div> </li>
<li class="key white"> <div class="whitenote note D"> D </div> </li>
<li class="key black"> <div class="blacknote note Dsharp"> D# </div> </li>
<li class="key white"> <div class="whitenote note E"> E </div> </li>
<li class="key white"> <div class="whitenote note F"> F </div> </li>
<li class="key black"> <div class="blacknote note Fsharp"> F# </div> </li>
<li class="key white"> <div class="whitenote note G"> G </div> </li>
<li class="key black"> <div class="blacknote note Gsharp"> G# </div> </li>
<li class="key white"> <div class="whitenote note A"> A </div> </li>
<li class="key black"> <div class="blacknote note Asharp"> A# </div> </li>
<li class="key white"> <div class="whitenote note B"> B </div> </li>
</ul>
</div>
</div>
</div>
<div class="row" style="margin-top:2em;">
<div class="col-sm-4 col-sm-offset-2">
<h2>Control the Progression</h2>
</div>
<div class="col-sm-3 ">
<h2>Metronome</h2>
</div>
</div>
<!-- Shows the details of the scale, and metronome options. -->
<div class="row" style="margin:2em ;">
<div class="col-sm-1 col-sm-offset-2" >
<span>
<label for="chords">Play Chords</label>
<span id="controls">
<button class="btn" onclick="metronomeApp.toggle()" id="play"><span class="glyphicon glyphicon-play" style="color:green"></span></button>
<button class="btn" id="pause"><span class="glyphicon glyphicon-pause" style="color:red"></span></button>
</span>
</span>
</div>
<!-- Show full scale or just the current chord -->
<div class="col-sm-1" style="margin-right:3em;">
<label for="just-chord">Show Chord or Chord&Scale</label>
<button class="btn btn-info" id="just-chord" >
Scale and Chord
</button>
</div>
<!-- Roman Numeral switch -->
<div class="col-sm-1">
<label data-toggle="tooltop" data-placement="bottom" title="Roman Numerals aren't reliable for Major/Minor pentatonic combination. Roman numerals currently dont work within progressions." >Roman Numerals *</label>
<button class="btn" style="background-color:#b9b9b9;" id="romanNumeralsBTN">I,II...</button>
</div>
<!-- Setting BPM -->
<div class="col-sm-1">
<span id="bpm-span">
<!-- <input type="text" min="50" max="150"> -->
<label id="bpm-label" for="set-bpm">Set BPM:<output for="set-bpm" style="color:white" id="bpmOutput">100</output></label>
<input id="set-bpm" type="range" name="bpm" min="50" max="150" oninput="outputUpdate(value)"></input>
<span>
</div>
<div class="col-sm-3">
<p id="curr-chord"></p>
<ul class="list-inline">
<li class="list-inline-item metronome-ind" id="metr-square-1"></li>
<li class="list-inline-item metronome-ind"id="metr-square-2"></li>
<li class="list-inline-item metronome-ind" id="metr-square-3"></li>
<li class="list-inline-item metronome-ind" id="metr-square-4"></li>
</ul>
</div>
</div>
<div class="row" style="margin-top:2em;">
<div class="col-sm-offset-2 col-sm-4">
<h2>Choose Your Chord Progression</h2>
</div>
</div>
<div class="row">
<div class="col-sm-offset-4 col-sm-2"></div>
<p id="scalePara"></p>
</div>
<div class="row" id="carousel-row">
<!-- chord progression -->
<div class="col-sm-3 col-sm-offset-2" id ="progression-div">
<ul class="list-group" id="progression-chords">
<li class="list-group-item active" data-toggle="tooltop" data-placement="bottom" title="Double click a chord to add to your progression.">Your Chord Progression</li>
<li class="list-group-item active"data-toggle="tooltop" data-placement="bottom" title="Currently can only remove progression as a whole.">
<button id="clear-chord-progression"
class="btn" style="padding:0px;float:top;background-color:#9D002C;color:white">Remove Progression</button></li>
</ul>
</div>
<!-- carousel -->
<div class="col-sm-4">
<div class="carousel slide" data-ride="carousel" id="chord-carousel">
<!-- <ol>
<li data-target="#chord-carousel" data-slide-to="0" class="active"></li>
<li data-target="#chord-carousel" data-slide-to="1"></li>
<li data-target="#chord-carousel" data-slide-to="2"></li>
</ol>
-->
<div class="carousel-inner"data-toggle="tooltop" data-placement="bottom" title="Double click a chord to add to your progression.">
<div class="item active">
<div>
<ul class="list-group" id="basic-chords">
<li class="list-group-item active">Basic Chords</li>
</ul>
</div>
</div>
<div class="item">
<div >
<ul class="list-group" id="intermediate-chords">
<li class="list-group-item active">Intermediate Chords</li>
</ul>
</div>
</div>
<div class="item">
<div>
<ul class="list-group" id="jazz-chords">
<li class="list-group-item active">Jazz Chords</li>
</ul>
</div>
</div>
</div>
<a class="left carousel-control" href="#chord-carousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#chord-carousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</body>
</html>