-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.html
75 lines (61 loc) · 2.21 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fretboard App</title>
<meta name="description"
content="Fretboard app - Chords, Scales and Fingerings for Stringed Instruments. Written in Elm">
<meta name="author" content="Frederic Cormier">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600,800,900" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/style.css">
<link rel="icon" type="image/png" href="images/favicon.png">
</head>
<body>
<div class="container">
<div class="row">
<div class="twelve columns">
<div id="elm-app"></div>
</div>
</div>
</div>
<div class='footer'>
<div class='footerContent'>
©Frédéric Cormier 2017 <a href="http://www.github.com/fredericcormier">- Fork Me On Github </a> - Written in
<strong>Elm</strong> - <a href="http://elm-lang.org">www.elm-lang.org</a>
</div>
</div>
<script src="lib/Tone.min.js"></script>
<script src="lib/logger.min.js"></script>
<script src="lib/fbaudio.js"></script>
<script src="js/Main-min.js"></script>
<script>
document.documentElement.addEventListener(
"mousedown", function () {
mouse_IsDown = true;
if (Tone.context.state !== 'running') {
Tone.context.resume();
}
})
var app = Elm.Main.init({
node: document.getElementById('elm-app'),
flags: "nevermind"
});
var fba = new FBAudio;
app.ports.audioStart.subscribe(function (nevermind) {
fba.start();
});
app.ports.audioStop.subscribe(function (nevermind) {
fba.stop();
});
app.ports.notesChanged.subscribe(function (nl) {
fba.notesHaveChanged(nl);
})
app.ports.bpmChanged.subscribe(function (newBPM) {
Tone.Transport.bpm.value = newBPM;
});
</script>
</body>
</html>