-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
173 lines (167 loc) · 9.85 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<!-- <script src="https://unpkg.com/@webcomponents/custom-elements"></script> -->
<script src="./webaudio/custom-elements.min.js"></script>
<!-- <script src='https://g200kg.github.io/webaudio-tinysynth/webaudio-tinysynth.js'></script> -->
<script src='./webaudio/webaudio-tinysynth.js'></script>
<!-- <script src="https://g200kg.github.io/webaudio-controls/webaudio-controls.js" ></script> -->
<script src="./webaudio/webaudio-controls.js" ></script>
<!-- Library to export midi files -->
<script src="./webaudio/midiWriter.js" ></script>
<!-- controls speech synthesis -->
<script src="./speechSynthesis.js"></script>
<!-- controls qwerty keyboard inputs -->
<script src="./keys.js"></script>
<!-- controls midi keyboard setup and inputs -->
<script src="./midi.js"></script>
<script src="./instruments.js"></script>
<script src="https://www.webrtc-experiment.com/MultiStreamsMixer.js"></script>
<link href="https://fonts.googleapis.com/css?family=Audiowide" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<div id="base">
<!-- <a href="http://www.g200kg.com/" target="_blank"><img id="logo" src="./g200kg160x80.png" style="float:left;margin:0px 20px 0px 0px"/></a> -->
<h1>Headless DAW</h1>
<p>Simplified accessible DAW built on <a href = "https://github.com/g200kg/webaudio-tinysynth">webaudio-tinysynth</a><br/> GitHub Repository : <a href="https://github.com/silianBraille/headless-daw" target="_blank">https://github.com/silianBraille/headless-daw</a></p>
<!-- <button id="about" onclick="About()">About</button> -->
<br/><hr/>
<div id="container">
<p style="font-family:AudioWide">Tracks</p>
<table>
<tr>
<td><webaudio-tinysynth class = "tinysynth" id="tinysynth" src="ws.mid" quality="1" loop="1" disableDrop="0" masterVol="0.3"></webaudio-tinysynth></td>
<!-- <td><webaudio-knob colors="#c00;#ccf;#fff" diameter="40" min="0" max="1" step="0.01" id="vol" value="0.5" oninput="Ctrl()"></webaudio-knob></td>
<td><webaudio-knob colors="#c00;#ccf;#fff" diameter="40" min="0" max="1" step="0.01" id="rev" value="0.2" oninput="Ctrl()"></webaudio-knob></td>
<td><webaudio-switch id="loop" onchange="Ctrl()" value="1"></webaudio-switch></td>
<td><select onchange="SetQuality(this.selectedIndex)"><option>quality=0</option><option selected>quality=1</option></select> -->
</td>
</tr>
<table id="track_list"></table>
<!-- <tr><td><input type="file" onchange="loadMidi(this.files)"/></td><td>Vol</td><td>Reverb</td><td>Loop</td><td>Quality</td></tr> -->
</table>
<br/>
<hr/>
Select a MIDI Keyboard : <select id="midiport" onchange="SelectMidi(this.selectedIndex-1)"><option>--</option></select>
<br/>
Oct : <label><input type="radio" name="oct" onclick="OctChange(-2)"/> -2</label>
<label><input type="radio" name="oct" onclick="OctChange(-1)"/> -1</label>
<label><input type="radio" name="oct" onclick="OctChange(0)" checked/> 0</label>
<label><input type="radio" name="oct" onclick="OctChange(1)"/> +1</label>
<label><input type="radio" name="oct" onclick="OctChange(2)"/> +2</label>
<br/>
<div style="display:inline-block">Sustain<br/>(shift)<br/><input id="sus" type="checkbox" onchange="Sustain(this.checked)"/></div> <webaudio-keyboard id="kb" keys="73" min="35" width="800" tabindex="1"></webaudio-keyboard>
<br/>
Ch : <select onchange="ChChange(this)"><option>Ch1</option><option>Ch2</option><option>Ch3</option><option>Ch4</option><option>Ch5</option><option>Ch6</option><option>Ch7</option><option>Ch8</option><option>Ch9</option><option>Drum (Ch10)</option></select>
Prog : <select id="prog" onchange="ProgChange(this.selectedIndex)">
</select>
<hr/>
Record your voice and instruments!
<section class="main-controls">
<canvas class="visualizer" height="30px"></canvas>
<div id="buttons">
<button class="record">Record</button>
<button class="stop">Stop</button>
</div>
</section>
<section class="sound-clips">
</section>
<!--Web dictaphone is built using <a href="https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getUserMedia">getUserMedia</a> and the <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API">MediaRecorder API</a>, which provides an easier way to capture Media streams.</p> -->
<script src="./mic.js"></script>
<!--
<br>
Record instruments!
<section class="main-controls2">
<div id="buttons2">
<button class="record2">Record</button>
<button class="stop2">Stop</button>
</div>
</section>
<section class="sound-clips2">
</section>
<script src = "./recordinstruments.js"></script> -->
</div>
<br/>
<hr/>
<!-- <button onclick="OpenEditor()">Timbre Editor</button> -->
<span id="name"></span>
<button id="shot">--</button>
<br/>
<div id="soundeditor">
<br/>
<!-- Number of Oscillator :<select id="oscs" onchange="Edit()"><option>1</option><option>2</option><option>3</option><option>4</option></select>
<table>
<tr id="desc1"><td>G</td><td>W</td><td>V</td><td>T</td><td>F</td><td>A</td><td>H</td><td>D</td><td>S</td><td>R</td><td>P</td><td>Q</td><td>K</td></tr>
<tr id="osc1">
<td><input id="g1" oninput="Edit()" value="0" size="4"/><br/></td>
<td><select id="w1" style="width:60px" onchange="document.getElementById('w1').value=this.value;Edit()"><option value="sine">sine</option><option value="sawtooth">sawtooth</option><option value="square">square</option><option value="triangle">triangle</option><option value="n0">n0</option><option value="n1">n1</option><option value="w9999">w9999</option></select></td>
<td><input id="v1" oninput="Edit()" value="0.5" size="4"/></td>
<td><input id="t1" oninput="Edit()" value="1" size="4"/></td>
<td><input id="f1" oninput="Edit()" value="0" size="4"/></td>
<td><input id="a1" oninput="Edit()" value="0" size="4"/></td>
<td><input id="h1" oninput="Edit()" value="0" size="4"/></td>
<td><input id="d1" oninput="Edit()" value="0.1" size="4"/></td>
<td><input id="s1" oninput="Edit()" value="0" size="4"/></td>
<td><input id="r1" oninput="Edit()" value="0.1" size="4"/></td>
<td><input id="p1" oninput="Edit()" value="1" size="4"/></td>
<td><input id="q1" oninput="Edit()" value="1" size="4"/></td>
<td><input id="k1" oninput="Edit()" value="0" size="4"/></td>
</tr>
<tr id="osc2">
<td><input id="g2" oninput="Edit()" value="0" size="4"/></td>
<td><select id="w2" style="width:60px" onchange="document.getElementById('w2').value=this.value;Edit()"><option value="sine">sine</option><option value="sawtooth">sawtooth</option><option value="square">square</option><option value="triangle">triangle</option><option value="n0">n0</option><option value="n1">n1</option><option value="w9999">w9999</option></select></td>
<td><input id="v2" oninput="Edit()" value="0.5" size="4"/></td>
<td><input id="t2" oninput="Edit()" value="1" size="4"/></td>
<td><input id="f2" oninput="Edit()" value="0" size="4"/></td>
<td><input id="a2" oninput="Edit()" value="0" size="4"/></td>
<td><input id="h2" oninput="Edit()" value="0" size="4"/></td>
<td><input id="d2" oninput="Edit()" value="0.1" size="4"/></td>
<td><input id="s2" oninput="Edit()" value="0" size="4"/></td>
<td><input id="r2" oninput="Edit()" value="0.1" size="4"/></td>
<td><input id="p2" oninput="Edit()" value="1" size="4"/></td>
<td><input id="q2" oninput="Edit()" value="1" size="4"/></td>
<td><input id="k2" oninput="Edit()" value="0" size="4"/></td>
</tr>
<tr id="osc3">
<td><input id="g3" oninput="Edit()" value="0" size="4"/></td>
<td><select id="w3" style="width:60px" onchange="document.getElementById('w3').value=this.value;Edit()"><option value="sine">sine</option><option value="sawtooth">sawtooth</option><option value="square">square</option><option value="triangle">triangle</option><option value="n0">n0</option><option value="n1">n1</option><option value="w9999">w9999</option></select></td>
<td><input id="v3" oninput="Edit()" value="0.5" size="4"/></td>
<td><input id="t3" oninput="Edit()" value="1" size="4"/></td>
<td><input id="f3" oninput="Edit()" value="0" size="4"/></td>
<td><input id="a3" oninput="Edit()" value="0" size="4"/></td>
<td><input id="h3" oninput="Edit()" value="0" size="4"/></td>
<td><input id="d3" oninput="Edit()" value="0.1" size="4"/></td>
<td><input id="s3" oninput="Edit()" value="0" size="4"/></td>
<td><input id="r3" oninput="Edit()" value="0.1" size="4"/></td>
<td><input id="p3" oninput="Edit()" value="1" size="4"/></td>
<td><input id="q3" oninput="Edit()" value="1" size="4"/></td>
<td><input id="k3" oninput="Edit()" value="0" size="4"/></td>
</tr>
<tr id="osc4">
<td><input id="g4" oninput="Edit()" value="0" size="4"/></td>
<td><select id="w4" style="width:60px" onchange="document.getElementById('w4').value=this.value;Edit()"><option value="sine">sine</option><option value="sawtooth">sawtooth</option><option value="square">square</option><option value="triangle">triangle</option><option value="n0">n0</option><option value="n1">n1</option><option value="w9999">w9999</option></select></td>
<td><input id="v4" oninput="Edit()" value="0.5" size="4"/></td>
<td><input id="t4" oninput="Edit()" value="1" size="4"/></td>
<td><input id="f4" oninput="Edit()" value="0" size="4"/></td>
<td><input id="a4" oninput="Edit()" value="0" size="4"/></td>
<td><input id="h4" oninput="Edit()" value="0" size="4"/></td>
<td><input id="d4" oninput="Edit()" value="0.1" size="4"/></td>
<td><input id="s4" oninput="Edit()" value="0" size="4"/></td>
<td><input id="r4" oninput="Edit()" value="0.1" size="4"/></td>
<td><input id="p4" oninput="Edit()" value="1" size="4"/></td>
<td><input id="q4" oninput="Edit()" value="1" size="4"/></td>
<td><input id="k4" oninput="Edit()" value="0" size="4"/></td>
</tr>
</table> -->
<br/>
Patch : <input id="patch" size="80"/>
</div>
<hr/>
</div>
</div>
</body>
</html>