-
Notifications
You must be signed in to change notification settings - Fork 1
/
space1.html
61 lines (45 loc) · 1.58 KB
/
space1.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
<html>
<head>
<title>Steven Yi - Sacred Spaces - Space No. 1</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Raleway|Roboto:400,700" rel="stylesheet">
<link href="sacred-spaces.css" rel="stylesheet">
</head>
<body>
<header>
<h1>Space No. 1</h1>
Author: <a href="http://kunstmusik.com">Steven Yi</a>
</header>
<main>
<section class="centered">
<p><button id="startButton" disabled>Loading Music...</button></p>
</section>
</main>
<footer>
<small>Copyright © <a href="http://kunstmusik.com">Steven Yi</a> 2018. All rights reserved.</small>
</footer>
<script src="csound/CsoundObj.js"></script>
<script src="space_no1.orc" type="text/csound-orc"></script>
<script>
// Setup Csound and load piece
CsoundObj.importScripts("./csound/").then(() => {
fetch("space_no1.orc").then((response) => {
response.text().then((orc) => {
let startButton = document.getElementById("startButton");
startButton.innerText = "Press to Start";
startButton.disabled = false;
startButton.onclick = function() {
let cs = new CsoundObj();
cs.setOption("-m0")
cs.compileOrc(orc);
cs.start();
startButton.innerText = "Listening Now...";
startButton.disabled = true;
}
})
})
});
</script>
</body>
</html>