-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
92 lines (87 loc) · 2.75 KB
/
index.html
File metadata and controls
92 lines (87 loc) · 2.75 KB
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
<script src="https://cdn.jsdelivr.net/combine/npm/tone@14.7.58,npm/@magenta/music@1.23.1/es6/core.js,npm/focus-visible@5,npm/html-midi-player@1.5.0"></script>
<title>Boxable</title>
<link rel="shortcut icon" href="https://funtasmo.github.io/boxable/favicon.ico" type="image/x-icon">
<style>
/* Custom player style */
#section3 midi-player {
display: block;
width: inherit;
margin: 4px;
margin-bottom: 0;
}
#section3 midi-player::part(control-panel) {
background: #6a329f;
border: 2px solid #000;
border-radius: 10px 10px 0 0;
}
#section3 midi-player::part(play-button) {
color: #353;
border: 2px solid currentColor;
background-color: #4d4;
border-radius: 20px;
transition: all 0.2s;
content: 'hello';
}
#section3 midi-player::part(play-button):hover {
color: #0a0;
background-color: #5f5;
border-radius: 10px;
}
#section3 midi-player::part(time) {
font-family: monospace;
}
/* Custom visualizer style */
#section3 midi-visualizer .piano-roll-visualizer {
background: #ffd;
border: 2px solid black;
border-top: none;
border-radius: 0 0 20px 20px;
margin: 4px;
margin-top: 0;
overflow: auto;
}
#section3 midi-visualizer svg rect.note {
opacity: 0.6;
stroke-width: 2;
}
#section3 midi-visualizer svg rect.note[data-instrument="0"]{
fill: #47eabc;
stroke: #47c7ea;
}
#section3 midi-visualizer svg rect.note[data-instrument="2"]{
fill: #d2a93f;
stroke: #eabc47;
}
#section3 midi-visualizer svg rect.note[data-is-drum="true"]{
fill: #5b5b5b;
stroke: #bcbcbc;
}
#section3 midi-visualizer svg rect.note.active {
opacity: 0.9;
stroke: #000;
}
a {
text-decoration: none;
color: #ffffff;
font-family: monospace;
}
</style>
<style>
body {
background-color: #38383b;
opacity: 0.8;
background-image: linear-gradient(30deg, #494eb1 12%, transparent 12.5%, transparent 87%, #494eb1 87.5%, #494eb1), linear-gradient(150deg, #494eb1 12%, transparent 12.5%, transparent 87%, #494eb1 87.5%, #494eb1), linear-gradient(30deg, #494eb1 12%, transparent 12.5%, transparent 87%, #494eb1 87.5%, #494eb1), linear-gradient(150deg, #494eb1 12%, transparent 12.5%, transparent 87%, #494eb1 87.5%, #494eb1), linear-gradient(60deg, #494eb177 25%, transparent 25.5%, transparent 75%, #494eb177 75%, #494eb177), linear-gradient(60deg, #494eb177 25%, transparent 25.5%, transparent 75%, #494eb177 75%, #494eb177);
background-size: 20px 35px;
background-position: 0 0, 0 0, 10px 18px, 10px 18px, 0 0, 10px 18px
}
</style>
<h1><a target="_blank" href="https://funtasmo.github.io/boxable">Boxable</a></h1>
<section id="section3">
<midi-player
src="https://funtasmo.github.io/boxable/example.mid"
sound-font visualizer="#section3 midi-visualizer">
</midi-player>
<midi-visualizer
src="https://funtasmo.github.io/boxable/example.mid">
</midi-visualizer>
</section>