forked from stephband/scribe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dolphin-dance.html
98 lines (90 loc) · 3.79 KB
/
dolphin-dance.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
<!DOCTYPE html>
<html lang="en">
<head>
<title><scribe-music></title>
<meta charset="utf-8" />
<meta name="author" content="@stephband" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width" />
<script title="load">
document.documentElement.className += ' js loading';
// window.addEventListener('DOMContentLoaded', () => document.documentElement.classList.remove('content-loading'));
// Wait for other load handlers to run first - Bolt does a few things on
// load (eg. targetable scrolls) and we want them to run before the loading
// class is removed
window.addEventListener('load', () => window.requestAnimationFrame(() => document.documentElement.classList.remove('loading')));
window.DEBUG = true;
</script>
<!-- Import <scribe-music> -->
<link rel="stylesheet" href="./build/scribe-music/module.css" />
<script type="module" src="./build/scribe-music/module.js"></script>
<link rel="stylesheet" href="./elements/lead-sheet-document.css" />
<style>
body {
font-family: Jazz, JazzText;
}
</style>
<script type="module">
document.body.addEventListener('change', function(e) {
if (e.target.name === 'transpose') {
const scribe = document.body.querySelector('scribe-music');
scribe.transpose = e.target.value;
return;
}
if (e.target.name === 'clef') {
const scribe = document.body.querySelector('scribe-music');
scribe.clef = e.target.value;
return;
}
});
</script>
</head>
<body>
<header>
<h1>Dolphin Dance</h1>
<p class="author">Herbie Hancock</p>
<form class="scribe-part">
<label for="select-clef">Clef:</label>
<select name="clef" id="select-clef">
<option value="treble">Treble</option>
<option value="bass">Bass</option>
<option value="piano">Piano</option>
<option value="drum">Drums</option>
<option value="percussion">Percussion</option>
</select>
<label for="select-transpose">Transpose:</label>
<select name="transpose" id="select-transpose">
<option value="12">+12</option>
<option value="11">+11</option>
<option value="10">+10</option>
<option value="9">+9</option>
<option value="8">+8</option>
<option value="7">+7</option>
<option value="6">+6</option>
<option value="5">+5</option>
<option value="4">+4</option>
<option value="3">+3</option>
<option value="2">+2</option>
<option value="1">+1</option>
<option value="0" selected="">0</option>
<option value="-1">-1</option>
<option value="-2">-2</option>
<option value="-3">-3</option>
<option value="-4">-4</option>
<option value="-5">-5</option>
<option value="-6">-6</option>
<option value="-7">-7</option>
<option value="-8">-8</option>
<option value="-9">-9</option>
<option value="-10">-10</option>
<option value="-11">-11</option>
<option value="-12">-12</option>
</select>
</form>
</header>
<scribe-music clef="treble" type="application/json" src="./data/dolphin-dance.json"></scribe-music>
<footer>
<p>Test page for music renderer <a href="https://github.com/stephband/scribe/">Scribe</a>. Contribute on <a href="https://github.com/stephband/scribe">github</a>.</p>
</footer>
</body>
</html>