-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·545 lines (506 loc) · 29 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
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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://code.jquery.com/jquery-3.3.1.min.js" charset="utf-8"></script>
<script src="app.js" charset="utf-8"></script>
<link rel="stylesheet" href="style.css">
<link rel="ICON" href="imgs/Spotify_Icon_CMYK_Green.png" type="image/x-icon">
<title>Spotify Track Filter</title>
</head>
<body>
<!-- ///////////////////////////////////////////////////////
//////////////////// SITE HEADER ////////////////////
/////////////////////////////////////////////////////// -->
<div id="header-box" class="main-div">
<div id="header-title-div" class="header-item">
<h1><img id="spotify-icon" src="imgs/Spotify_Icon_CMYK_Black.png" alt="">Spotify Track Filter</h1>
</div>
<div id="header-buttons-div">
<div id="header-key-div" class="header-item button-div">
<button id="header-key" class="header-button">
<img src="imgs/key-icon.jpg" alt="Key" id="img-key">
</button>
<div id="tooltip-key" class="tooltip header-tooltip">
<div id="tooltip-inner-key" class="tooltip-inner header-tooltip-inner">
<span id="tooltiptext-key" class="tooltiptext header-tooltiptext">
<input type="text" name="apikeys" id="apikeys" placeholder="client_id:client_secret">
</span>
</div>
</div>
</div>
<div id="header-search-div" class="header-item button-div">
<button id="header-search" class="header-button">
<img src="imgs/search-icon.svg" alt="Search" id="img-search">
</button>
<div id="tooltip-search" class="tooltip header-tooltip">
<div id="tooltip-inner-search" class="tooltip-inner header-tooltip-inner">
<span id="tooltiptext-search" class="tooltiptext header-tooltiptext">
<input type="search" id="search-box"
value="https://open.spotify.com/album/7tHPr5YXzvm42CeCjUFqBK">
<!-- https://open.spotify.com/playlist/2rUNIGichLH0E0AuQROrtB https://open.spotify.com/album/7tHPr5YXzvm42CeCjUFqBK-->
</span>
</div>
</div>
</div>
<div id="header-git-div" class="header-item button-div">
<button id="header-git" class="header-button">
<img src="imgs/github-logo-transparent.png" alt="GitHub" id="img-git">
</button>
<div id="tooltip-git" class="tooltip header-tooltip">
<div id="tooltip-inner-git" class="tooltip-inner header-tooltip-inner">
<span id="tooltiptext-git" class="tooltiptext header-tooltiptext">
<a id="git-repo" target="_blank">
<b>Git Repository</b>
</a>
<br>
Last updated at:
<br>
<em><span id="git-update"></span></em>
<br>
<br>
<a id="git-commit" target="_blank">
<b>Last commit</b>
</a>
<br>
SHA: <em><span id="git-sha"></span></em>
<br>
<br>
Commit message: <em>
<br>
<span id="git-message"></span></em>
</span>
</div>
</div>
</div>
<div id="header-site-div" class="header-item button-div">
<button id="header-site" class="header-button">
<img src="imgs/home-icon.png" alt="Home" id="img-home">
</button>
</div>
</div>
</div>
<!-- ///////////////////////////////////////////////////////
//////////////////// SITE HEADER ////////////////////
/////////////////////////////////////////////////////// -->
<!-- ///////////////////////////////////////////////////////
/////////////// READ ME INSTRUCTIONS ////////////////
/////////////////////////////////////////////////////// -->
<div id="readme-box" class="main-div">
<div id="readme-header" class="main-header">Instructions</div>
<div id="readme-text">
<h2>Purpose</h2>
<p>
Search for a keyword or specific album/playlist then filter all the tracks returned
based on their musical properties to create a more specific playlist of songs.
</p>
<h3>Searching</h3>
<ul>
<li>
Search Spotify database for albums, artists, playlists, and tracks normally using keywords
</li>
<li>
Or input a specific album or playlist URL copied from Spotify with the following layout
"https://open.spotify.com/album/7tHPr5YXzvm42CeCjUFqBK" (without quotes)
</li>
</ul>
<h3>Filtering</h3>
<ul>
<li>
Select desired filters, adjusting values and selecting whether a filtered track's values should be
above or below the input value
</li>
<li class="sub-li-item">
<ul>
<li>
Click run checked filters with no filters checked to display all tracks from a search result
</li>
<li>
Hover over a filter option to view a description of its meaning with a clickable picture of
the standard value distrubtions
</li>
</ul>
</li>
</ul>
<h3>Track Analysis</h3>
<ul>
<li>
Scroll down once filters have finished running to view all resulting tracks that match the selected
filter criteria
</li>
<li>
Click each result to display a detailed audio analysis of the track
</li>
</ul>
<h3><a
href="https://github.com/spk2dc/spk2dc.github.io/tree/master/SpotifyTrackFilter#spotify-track-filter-read-me">Full
Read Me</a></h3>
</div>
</div>
<!-- ///////////////////////////////////////////////////////
/////////////// READ ME INSTRUCTIONS ////////////////
/////////////////////////////////////////////////////// -->
<!-- ///////////////////////////////////////////////////////
////////////////// SEARCH RESULTS ///////////////////
/////////////////////////////////////////////////////// -->
<div id="results-box" class="main-div">
<div id="results-header" class="main-header">Search Results</div>
<div id="results-tables">
<div id="albums-div" class="search-results-section">
<div id="albums-header" class="sub-header">Albums</div>
<div id="albums-results" class="results-div">
<table id="albums-table" class="results-table">
<thead class="results-thead">
<tr>
<th>Album Name</th>
<th>Artists</th>
<th>Release Date</th>
<th>URL</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div id="artists-div" class="search-results-section">
<div id="artists-header" class="sub-header">Artists</div>
<div id="artists-results" class="results-div">
<table id="artists-table" class="results-table">
<thead class="results-thead">
<tr>
<th>Artist Name</th>
<th>Albums (3 most recent)</th>
<th>Followers</th>
<th>URL</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div id="playlists-div" class="search-results-section">
<div id="playlists-header" class="sub-header">Playlists</div>
<div id="playlists-results" class="results-div">
<table id="playlists-table" class="results-table">
<thead class="results-thead">
<tr>
<th>Playlist Name</th>
<th>Owner</th>
<th>Total Tracks</th>
<th>URL</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div id="tracks-div" class="search-results-section">
<div id="tracks-header" class="sub-header">Tracks</div>
<div id="tracks-results" class="results-div">
<table id="tracks-table" class="results-table">
<thead class="results-thead">
<tr>
<th>Track Name</th>
<th>Artists</th>
<th>Duration (ms)</th>
<th>URL</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
<!-- ///////////////////////////////////////////////////////
////////////////// SEARCH RESULTS ///////////////////
/////////////////////////////////////////////////////// -->
<!-- ///////////////////////////////////////////////////////
///////////////// FILTER SETTINGS ///////////////////
/////////////////////////////////////////////////////// -->
<div id="filter-settings" class="main-div">
<div id="filter-header" class="main-header">Filter Settings</div>
<div id="filter-body">
<button type="button" id="filter-button">Run Checked Filters</button>
<ul>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext">A confidence measure from 0.0 to 1.0 of whether the
track is acoustic. 1.0
represents high confidence the track is acoustic. The distribution of values for this
feature
look like this:
<a href="imgs/acousticness.png" target="_blank">
<img src="imgs/acousticness.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-acousticness">
<label for="check-acousticness" class="filter-option">Acousticness (0.0 to 1.0):</label>
<input type="number" class="filter-option" id="acousticness" min="0" max="1" step="0.1" value="0.5">
<input type="radio" name="radio-acousticness" value="above" id="radio-acousticness-above" checked>
<label for="radio-acousticness-above" class="comparison">Above</label>
<input type="radio" name="radio-acousticness" value="below" id="radio-acousticness-below"> <label
for="radio-acousticness-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext">Danceability describes how suitable a track is for
dancing based on a combination of musical elements including tempo, rhythm stability,
beat
strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most
danceable. The distribution of values for this feature look like this:
<a href="imgs/danceability.png" target="_blank">
<img src="imgs/danceability.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-danceability">
<label for="check-danceability" class="filter-option">Danceability (0.0 to 1.0):</label>
<input type="number" class="filter-option" id="danceability" min="0" max="1" step="0.1" value="0.5">
<input type="radio" name="radio-danceability" value="above" id="radio-danceability-above" checked>
<label for="radio-danceability-above" class="comparison">Above</label>
<input type="radio" name="radio-danceability" value="below" id="radio-danceability-below"> <label
for="radio-danceability-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext">The duration of the track in milliseconds.</span>
</div>
</div>
<input type="checkbox" id="check-duration_ms">
<label for="check-duration_ms" class="filter-option">Duration (ms):</label>
<input type="number" class="filter-option" id="duration_ms" min="0" step="10000" value="300000">
<input type="radio" name="radio-duration_ms" value="above" id="radio-duration_ms-above" checked>
<label for="radio-duration_ms-above" class="comparison">Above</label>
<input type="radio" name="radio-duration_ms" value="below" id="radio-duration_ms-below"> <label
for="radio-duration_ms-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext"> Energy is a measure from 0.0 to 1.0 and represents a
perceptual measure of intensity and activity. Typically, energetic tracks feel fast,
loud,
and noisy. For example, death metal has high energy, while a Bach prelude scores low on
the
scale. Perceptual features contributing to this attribute include dynamic range,
perceived
loudness, timbre, onset rate, and general entropy. The distribution of values for this
feature look like this:
<a href="imgs/energy.png" target="_blank">
<img src="imgs/energy.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-energy">
<label for="check-energy" class="filter-option">Energy (0.0 to 1.0):</label>
<input type="number" class="filter-option" id="energy" min="0" max="1" step="0.1" value="0.5">
<input type="radio" name="radio-energy" value="above" id="radio-energy-above" checked> <label
for="radio-energy-above" class="comparison">Above</label>
<input type="radio" name="radio-energy" value="below" id="radio-energy-below"> <label
for="radio-energy-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext">Predicts whether a track contains no
vocals. “Ooh”
and “aah” sounds are treated as instrumental in this context. Rap or spoken word tracks
are
clearly “vocal”. The closer the instrumentalness value is to 1.0, the greater likelihood
the
track contains no vocal content. Values above 0.5 are intended to represent instrumental
tracks, but confidence is higher as the value approaches 1.0. The distribution of values
for
this feature look like this:
<a href="imgs/instrumentalness.png" target="_blank">
<img src="imgs/instrumentalness.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-instrumentalness">
<label for="check-instrumentalness" class="filter-option">Instrumentalness (0.0 to 1.0):</label>
<input type="number" class="filter-option" id="instrumentalness" min="0" max="1" step="0.1"
value="0.5">
<input type="radio" name="radio-instrumentalness" value="above" id="radio-instrumentalness-above"
checked>
<label for="radio-instrumentalness-above" class="comparison">Above</label>
<input type="radio" name="radio-instrumentalness" value="below" id="radio-instrumentalness-below">
<label for="radio-instrumentalness-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext"> Detects the presence of an audience in the
recording. Higher liveness values represent an increased probability that the track was
performed live. A value above 0.8 provides strong likelihood that the track is live. The
distribution of values for this feature look like this:
<a href="imgs/liveness.png" target="_blank">
<img src="imgs/liveness.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-liveness">
<label for="check-liveness" class="filter-option">Liveness (0.0 to 1.0):</label>
<input type="number" class="filter-option" id="liveness" min="0" max="1" step="0.1" value="0.5">
<input type="radio" name="radio-liveness" value="above" id="radio-liveness-above" checked> <label
for="radio-liveness-above" class="comparison">Above</label>
<input type="radio" name="radio-liveness" value="below" id="radio-liveness-below"> <label
for="radio-liveness-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext">The overall loudness of a track in decibels (dB).
Loudness values are averaged across the entire track and are useful for comparing
relative
loudness of tracks. Loudness is the quality of a sound that is the primary psychological
correlate of physical strength (amplitude). Values typical range between -60 and 0 db.
The
distribution of values for this feature look like this:
<a href="imgs/loudness.png" target="_blank">
<img src="imgs/loudness.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-loudness">
<label for="check-loudness" class="filter-option">Loudness (-60 to 0 dB):</label>
<input type="number" class="filter-option" id="loudness" min="-60" max="0" step="-1" value="-5">
<input type="radio" name="radio-loudness" value="above" id="radio-loudness-above" checked> <label
for="radio-loudness-above" class="comparison">Above</label>
<input type="radio" name="radio-loudness" value="below" id="radio-loudness-below"> <label
for="radio-loudness-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext">Speechiness detects the presence of spoken words in a
track. The more exclusively speech-like the recording (e.g. talk show, audio book,
poetry),
the closer to 1.0 the attribute value. Values above 0.66 describe tracks that are
probably
made entirely of spoken words. Values between 0.33 and 0.66 describe tracks that may
contain
both music and speech, either in sections or layered, including such cases as rap music.
Values below 0.33 most likely represent music and other non-speech-like tracks. The
distribution of values for this feature look like this:
<a href="imgs/speechiness.png" target="_blank">
<img src="imgs/speechiness.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-speechiness">
<label for="check-speechiness" class="filter-option">Speechiness (0.0 to 1.0):</label>
<input type="number" class="filter-option" id="speechiness" min="0" max="1" step="0.1" value="0.5">
<input type="radio" name="radio-speechiness" value="above" id="radio-speechiness-above" checked>
<label for="radio-speechiness-above" class="comparison">Above</label>
<input type="radio" name="radio-speechiness" value="below" id="radio-speechiness-below"> <label
for="radio-speechiness-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext"> The overall estimated tempo of a track in beats per
minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and
derives directly from the average beat duration. The distribution of values for this
feature
look like this:
<a href="imgs/tempo.png" target="_blank">
<img src="imgs/tempo.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-tempo">
<label for="check-tempo" class="filter-option">Tempo (0 to 250 BPM):</label>
<input type="number" class="filter-option" id="tempo" min="0" max="250" step="10" value="100">
<input type="radio" name="radio-tempo" value="above" id="radio-tempo-above" checked> <label
for="radio-tempo-above" class="comparison">Above</label>
<input type="radio" name="radio-tempo" value="below" id="radio-tempo-below"> <label
for="radio-tempo-below" class="comparison">Below</label>
</li>
<li class="li-filter">
<div class="tooltip">
<div class="tooltip-inner">
<span class="tooltiptext"> A measure from 0.0 to 1.0 describing the musical
positiveness conveyed by a track. Tracks with high valence sound more positive (e.g.
happy,
cheerful, euphoric), while tracks with low valence sound more negative (e.g. sad,
depressed,
angry). The distribution of values for this feature look like this:
<a href="imgs/valence.png" target="_blank">
<img src="imgs/valence.png" alt="">
</a>
</span>
</div>
</div>
<input type="checkbox" id="check-valence">
<label for="check-valence" class="filter-option">Valence (0.0 to 1.0):</label>
<input type="number" class="filter-option" id="valence" min="0" max="1" step="0.1" value="0.5">
<input type="radio" name="radio-valence" value="above" id="radio-valence-above" checked> <label
for="radio-valence-above" class="comparison">Above</label>
<input type="radio" name="radio-valence" value="below" id="radio-valence-below"> <label
for="radio-valence-below" class="comparison">Below</label>
</li>
</ul>
</div>
</div>
<!-- ///////////////////////////////////////////////////////
///////////////// FILTER SETTINGS ///////////////////
/////////////////////////////////////////////////////// -->
<!-- ///////////////////////////////////////////////////////
///////////////// FILTERED TRACKS ///////////////////
/////////////////////////////////////////////////////// -->
<div id="filtered-tracks" class="main-div">
<div class="filtered-results-section">
<div id="filtered-header" class="main-header">Filtered Tracks (total <span
id="filtered-header-total">0</span>)
</div>
<div id="filtered-results" class="filtered-div">
<table id="filtered-table">
<thead>
<tr>
<th>Track Name</th>
<th>Artists</th>
<th>Duration (ms)</th>
<th>URL</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
<!-- ///////////////////////////////////////////////////////
///////////////// FILTERED TRACKS ///////////////////
/////////////////////////////////////////////////////// -->
<!-- ///////////////////////////////////////////////////////
////////////////// TRACK ANALYSIS ///////////////////
/////////////////////////////////////////////////////// -->
<div id="track-analysis" class="main-div">
<div id="track-analysis-header" class="main-header">Selected Track Audio Analysis</div>
<div id="track-analysis-results">
<table id="track-analysis-table">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</body>
</html>