-
Notifications
You must be signed in to change notification settings - Fork 0
/
synthe.html
61 lines (61 loc) · 1.94 KB
/
synthe.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
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>24平均律</title>
<script src="scrip.js"></script>
<style>
body {
margin: 0;
padding: 0;
height: 1000px;
}
#canvas {
margin: 0;
padding: 0;
}
#cover {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: 0;
padding: 0;
background: rgba(0, 0, 0, 0.5);
display: none;
}
</style>
<script>
function toggle() {
if (document.getElementById('hide').style.display !== 'block'){
document.getElementById('hide').style.display = 'block';
document.getElementById('button1').value = '目隠しを外す'
document.getElementById('button2').value = '目隠しを外す'
} else {
document.getElementById('hide').style.display = 'none';
document.getElementById('button1').value = '目隠しをつける'
document.getElementById('button2').value = '目隠しをつける'
}
}
</script>
</head>
<body>
<a href="index.html">トップページに戻る</a><br>
シンセ部分の作者:<a href="https://twitter.com/na2co3_ftw">@na2co3_ftw</a><br>
<input id="button1" type="button" onclick="toggle()" value="目隠しをつける">
<hr>
<div id="foo" style="position:relative;">
<div id="hide" style="width:600px; height: 200px; background-color: white; border: 1px solid blue; position: absolute; top: 590px; text-align: center; display: none; padding: 20px;">目隠し<br><input id="button2" type="button" onclick="toggle()" value="目隠しをつける"></div>
<canvas id="canvas" width="520" height="770"></canvas>
<div id="cover"></div>
</div>
<script>
if (typeof navigator.requestMIDIAccess !== "function") {
document.getElementById("foo").innerHTML =
"<a href='https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess'>MIDIAccess</a>という機能がChromeとOperaにしかないので、Chrome使ってください<br>"
+ "<img src='compatibility.png' width='600'/>"
}
</script>
</body>
</html>