-
Notifications
You must be signed in to change notification settings - Fork 0
/
polysynth1.html
72 lines (62 loc) · 2.06 KB
/
polysynth1.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MIDI Oscilloscope and Sound Generator</title>
<style>
#canvas {
border: 1px solid black;
}
#midiInfo {
border: 1px solid #ccc;
padding: 10px;
margin-bottom: 20px;
}
#main-container {
display: flex;
flex-direction: row;
}
#controls-container {
flex: 1;
}
#scope-container {
flex: 2;
}
#midiDataBox {
width: 300px; height: 100px; overflow: auto; border: 1px solid black;
}
</style>
</head>
<body>
<div id="main-container">
<div id="controls-container">
<h1>MIDI Oscilloscope and Sound Generator</h1>
<button id="start">Start</button>
<button id="stop">Stop</button>
<h2>Controls</h2>
<label for="frequency">Frequency: </label>
<input id="frequency" type="range" min="0" max="24000" step="1" value="440">
<span id="frequencyValue">440</span> Hz<br>
<label for="volume">Volume: </label>
<input id="volume" type="range" min="0" max="1" step="0.01" value="0.5">
<span id="volumeValue">0.5</span><br>
<label for="waveType">Wave Type: </label>
<select id="waveType">
<option value="sine">Sine</option>
<option value="square">Square</option>
<option value="triangle">Triangle</option>
<option value="sawtooth">Sawtooth</option>
</select><br>
<div id="midiInfo">
<h3>MIDI Data Stream</h3>
<p id="midiData">Awaiting MIDI input. Plug In your MIDI KB and Click Sart...</p>
</div>
<div id="midiDataBox"></div>
</div>
<div id="scope-container">
<canvas id="canvas" width="800" height="400"></canvas>
</div>
</div>
<script src="polysynth1.js"></script>
</body>
</html>