-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.html
170 lines (161 loc) · 6.63 KB
/
example.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
<!doctype html>
<html lang=en-us>
<meta charset=utf-8>
<title>Spectroplot: I/Q and audio Spectrogram plot example</title>
<meta name=description content="HTML5 I/Q Spectrogram.">
<meta name=viewport content="width=device-width,initial-scale=1">
<link rel=stylesheet href="styles.css">
<link rel=stylesheet href="example.css">
<!-- drop zone overlay -->
<div id="dropZone"></div>
<div id="header">
<h1>Spectroplot <small>I/Q and audio Spectrogram plot example</small></h1>
</div>
<!-- Container for Spectrogram -->
<div id="spectros">
<!-- Template for a Spectrogram -->
<div class="spectro">
<div class="control">
<select name="fftN" class="fftN" required>
<option value="1024">N=1024</option>
<option value="512" selected>N=512</option>
<option value="256">N=256</option>
<option value="128">N=128</option>
</select>
<select name="height" class="height" required>
<option value="0">Auto</option>
<option value="1024">1024px</option>
<option value="512" selected>512px</option>
<option value="256">256px</option>
<option value="128">128px</option>
</select>
<select name="windowF" class="windowF" required>
<option value="rectangular">Rectangular</option>
<option value="bartlett">Bartlett</option>
<option value="hamming">Hamming</option>
<option value="hann">Hann</option>
<option value="blackman">Blackman</option>
<option value="blackmanHarris" selected>Blackman-Harris</option>
</select>
<span class="group">
<button name="zoomOut" class="zoomOut">-</button>
<button name="zoomFit" class="zoomFit">Fit</button>
<button name="zoomIn" class="zoomIn">+</button>
</span>
</select>
<select name="gain" class="gain" required>
<option value="0">+0 dB</option>
<option value="3">+3 dB</option>
<option value="6" selected>+6 dB</option>
<option value="9">+9 dB</option>
<option value="12">+12 dB</option>
<option value="15">+15 dB</option>
<option value="18">+18 dB</option>
<option value="21">+21 dB</option>
<option value="24">+24 dB</option>
<option value="27">+27 dB</option>
<option value="30">+30 dB</option>
<option value="36">+36 dB</option>
<option value="42">+42 dB</option>
<option value="48">+48 dB</option>
<option value="54">+54 dB</option>
<option value="60">+60 dB</option>
<option value="72">+72 dB</option>
<option value="90">+90 dB</option>
</select>
<select name="range" class="range" required>
<option value="6">+6 dB</option>
<option value="12">+12 dB</option>
<option value="18">+18 dB</option>
<option value="24">+24 dB</option>
<option value="30" selected>+30 dB</option>
<option value="36">+36 dB</option>
<option value="42">+42 dB</option>
<option value="48">+48 dB</option>
<option value="54">+54 dB</option>
<option value="60">+60 dB</option>
<option value="72">+72 dB</option>
<option value="90">+90 dB</option>
<option value="120">+120 dB</option>
</select>
<select name="cmap" class="cmap" required>
<option value="cube1">Cube1</option>
<option value="viridis">Viridis</option>
<option value="plasma">Plasma</option>
<option value="inferno">Inferno</option>
<option value="magma">Magma</option>
<option value="hot">Hot</option>
<option value="afmhot">Afmhot</option>
<option value="gist_heat">Gist heat</option>
<option value="naive">Naive</option>
<option value="parula">Parula</option>
<option value="sox">Sox</option>
</select>
<select name="ampHeight" class="ampHeight" required>
<option value="0">Amp bar off</option>
<option value="16">Amp tiny</option>
<option value="256">Amp full</option>
</select>
<select name="minmaxHeight" class="minmaxHeight" required>
<option value="0">dB bar off</option>
<option value="16" selected>dB tiny</option>
<option value="256">dB full</option>
</select>
<select name="histWidth" class="histWidth" required>
<option value="0">Hist off</option>
<option value="30">Hist tiny</option>
<option value="100" selected>Hist full</option>
</select>
<select name="channelMode" class="channelMode" required>
<option value="I/Q">I/Q SDR data</option>
<option value="L/R">L/R stereo audio</option>
</select>
<select name="turnFlip" class="turnFlip" required>
<option value="spectrogram">Spectrogram</option>
<option value="waterfall">Waterfall</option>
</select>
<select name="theme" class="theme" required>
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
<span class="fileinfo"></span>
</div>
<div>
<div class="draw">
<div class="left">
<canvas class="freq"></canvas>
</div>
<div class="scroll">
<canvas class="guides"></canvas>
<canvas class="fft"></canvas>
<canvas class="time"></canvas>
<canvas class="amp"></canvas>
<canvas class="minmax"></canvas>
</div>
<div class="right">
<canvas class="dbfs"></canvas>
</div>
</div>
</div>
</div>
</div>
<label class="inputfile-box">
<svg class="inputfile-icon" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43">
<path d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z"></path>
</svg>
<input type="file" id="inputfile" class="inputfile-files" name="files[]" multiple />
<strong>Choose a file</strong>
<span> or drag it here</span>.
<br>
<i>
.cu4 .cs4 .cu8 (.data .complex16u) .cs8 (.complex16s) .cu12 .cs12 .cu16 .cs16 .cu32 .cs32 .cu64 .cs64 .cf32 (.cfile .complex) .cf64
(also audio containing I/Q data if supported by the browser:
.wav .bwf .webm .ogg .opus .flac .mp4 .m4a .aac .mp3)
</i>
</label>
<input type="file" id="addfile" class="inputfile-files" name="files[]" multiple />
<label for="addfile"><div class="fab"> + </div></label>
<script src="spectroplot.js"></script>
<script>
new EasyCloning('#spectros', document.location.hash.substring(1))
</script>