-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (88 loc) · 4.86 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
<!-- I made this for my wife's music class which heavily uses Chrome Music Lab -->
<html>
<head>
<title>Chrome Music Lab Scales</title>
<link rel="stylesheet" type="text/css" href="/keys/site.css">
<link href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet">
<script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="icon" href="/keys/favicon.png" type="image/png">
</head>
<body class='mdc-typography'>
<div class="viewportDiv">
<div style='margin-block-start: 0;margin-block-end: 0;padding-inline-start: 0;display: flex;flex-wrap: wrap;align-content: center;justify-content: space-evenly;align-items: center;flex-direction: row;'>
<button id='btn-major' class='mdc-button mdc-button--outlined' type='button' onclick='showMajor()'>Major</button>
<button id='btn-chromatic' class='mdc-button' type='button' onclick='showChromatic()'>Chromatic</button>
<button id='btn-pentatonic' class='mdc-button' type='button' onclick='showPentatonic()'>Pentatonic</button>
</div>
<div id="major">
<div class="pitch major major-c">C 8</div>
<div class="pitch major major-b">B 7</div>
<div class="pitch major major-a">A 6</div>
<div class="pitch major major-g">G 5</div>
<div class="pitch major major-f">F 4</div>
<div class="pitch major major-e">E 3</div>
<div class="pitch major major-d">D 2</div>
<div class="pitch major major-c">C 1</div>
</div>
<div id="pentatonic" style='display:none'>
<div class="pitch major major-c">C 8</div>
<div class="pitch major major-a">A 6</div>
<div class="pitch major major-g">G 5</div>
<div class="pitch major major-e">E 3</div>
<div class="pitch major major-d">D 2</div>
<div class="pitch major major-c">C 1</div>
</div>
<div id="chromatic" style='display: none;'>
<div class="pitch chromatic chromatic-b">B 7</div>
<div class="pitch chromatic chromatic-as">A# Bb</div>
<div class="pitch chromatic chromatic-a">A 6</div>
<div class="pitch chromatic chromatic-gs">G# Ab</div>
<div class="pitch chromatic chromatic-g">G 5</div>
<div class="pitch chromatic chromatic-fs">F# Gb</div>
<div class="pitch chromatic chromatic-f">F 4</div>
<div class="pitch chromatic chromatic-e">E 3</div>
<div class="pitch chromatic chromatic-ds">D# Eb</div>
<div class="pitch chromatic chromatic-d">D 2</div>
<div class="pitch chromatic chromatic-cs">C# Db</div>
<div class="pitch chromatic chromatic-c">C 1</div>
</div>
<div xmlns:cc="http://creativecommons.org/ns#"
xmlns:dct="http://purl.org/dc/terms/"
style='text-align: center;'>
<a href="https://creativecommons.org/publicdomain/zero/1.0?ref=chooser-v1"
target="_blank" rel="license noopener noreferrer"
style="display:inline-block;">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/zero.svg?ref=chooser-v1">
</a>
<a href="http://www.apache.org/licenses/LICENSE-2.0">Icon License</a>
</div>
</div>
<script type='text/javascript'>
function showMajor() {
const el = document.querySelector('.mdc-button--outlined');
el.classList.remove("mdc-button--outlined");
document.getElementById('btn-major').classList.add("mdc-button--outlined");
document.getElementById('major').style='display: block;';
document.getElementById('chromatic').style='display: none;';
document.getElementById('pentatonic').style='display: none;';
}
function showChromatic() {
const el = document.querySelector('.mdc-button--outlined');
el.classList.remove("mdc-button--outlined");
document.getElementById('btn-chromatic').classList.add("mdc-button--outlined");
document.getElementById('major').style='display: none;';
document.getElementById('chromatic').style='display: block;';
document.getElementById('pentatonic').style='display: none;';
}
function showPentatonic() {
const el = document.querySelector('.mdc-button--outlined');
el.classList.remove("mdc-button--outlined");
document.getElementById('btn-pentatonic').classList.add("mdc-button--outlined");
document.getElementById('major').style='display: none;';
document.getElementById('chromatic').style='display: none;';
document.getElementById('pentatonic').style='display: block;';
}
</script>
</body>
</html>