-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
156 lines (104 loc) · 4.55 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/addons/p5.sound.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tone/13.7.6/Tone.min.js"></script>
<!-- <script src="https://tonejs.github.io/build/Tone.min.js"></script> -->
<script type="text/javascript" src="https://unpkg.com/@tonejs/midi"></script>
<!-- <script src="https://tonejs.github.io/MidiConvert/build/MidiConvert.js"></script> -->
<script src="https://cdn.jsdelivr.net/g/filesaver.js"></script>
<!--
<script src="pitchdetect.js"></script>
<script src="getchords.js"></script>
<script src="sketch.js"></script>
-->
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Bungee+Hairline|Concert+One" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Alike' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Bungee+Hairline|Concert+One" rel="stylesheet">
<!-- <script src="https://rawgit.com/lsu-emdm/nexusUI/master/dist/nexusUI.min.js"></script> -->
</head>
<body>
<!--<p>TUNER</p>-->
<div align="center" id="titleimage">
<h1>Tuner</h1>
</div>
<div align="center" id="buttons1">
<!-- <button id = "demo" onclick="this.innerText = togglePlayback()">use demo audio</button> -->
<button id="live" onclick="toggleLiveInput()">Analyze Audio</button>
<!-- <a>
<input type="button" id="record" value="record" onclick="event.preventDefault(); checkrecording();" </>
</a> -->
<button id="micmute" onclick="mutemic()" value="On">MUTE</button>
<button id="record" onclick="checkrecording()" innerText="record">record</button>
<p></p>
<button id="playaudio" onclick="playaudio()">Play Audio</button>
<button id="saveaudio" onclick="saveaudio()">Save Audio</button>
<p></p>
<button id="savemidi" onclick="savemidi()">Save MIDI</button>
<button id="playmidi" onclick="playmidi()">Play MIDI</button>
<p></p>
</div>
<!-- <input type="button" id ="record" value="record" onclick="startrecording();"> -->
<!-- <button id="osc" onclick="toggleOscillator()">use oscillator</button> -->
<!-- <p align="left">Load new demo audio</p>
<button align="center" align="center" id="playsound" onclick="playsound()">PLAY SOUND</button>
<input align="center" value="Load Sound" onchange="loadUserAudioFile(this.files)" type="file"></input> -->
<!-- <input align="center" type="button" value="On" id="onoff" onclick="onoff();">
-->
<!-- <button onclick="updatePitch(0);">sample</button> -->
<!-- <input align="center" value="sensitivity" id="sensitivity" onchange="sensitivity()" type="range"></input> -->
<!-- <button onclick="updatePitch(0);">sample</button>
<input align="center" value="sensitivity" id="sensitivity" onchange="sensitivity()" type="range"></input>
-->
<div align="center" id="detector" class="vague">
<div id="d2" class="note">
<span id="note">--</span>
</div>
<div id="d3" class="pitch">
<span id="pitch">--</span>
Hz</div>
<div id="detune">
<span id="detune_amt">--
</span>
<!-- <span id="flat">cents ♭
</span>
<span id="sharp">cents ♯
</span> -->
</div>
</div>
<div align="right" id="predictedchords" class="predict">
<button id="getchords" onclick="getChords(document.getElementById('note').innerHTML)" innerText="get chords">Grab Note</button>
<p></p>
<p></p>
<button id="majorchord" onclick="majorchord()">Get Major Chord</button>
<p></p>
<button id="minorchord" onclick="minorchord()">Get Minor Chord</button>
<p></p>
<button id="randomchord" onclick="randomchord()">Get Random Chord</button>
<p></p>
<span id="detectedchord">--
</span>
<p></p>
<span id="prechord">--
</span>
<p></p>
</div>
<!--<canvas nx="keyboard" style="width:800px;height:170px"></canvas>
-->
<!--<script src="nexusUI.js"></script> -->
<script src="getchords.js"></script>
<script src="pitchdetect.js"></script>
<script src="sketch.js"></script>
<!--<script src="https://rawgit.com/lsu-emdm/nexusUI/master/dist/nexusUI.min.js"></script>
-->
<!--<script>
nx.onload = function() {
//nx.context=getAudioContext();
keyboard1.octaves = 1;
keyboard1.init();
}
</script>
</body>
</html>