forked from hvianna/audioMotion-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverlay.html
208 lines (180 loc) · 6.63 KB
/
overlay.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>audioMotion-analyzer overlay demo</title>
<link href="https://fonts.googleapis.com/css?family=Orbitron:900" rel="stylesheet">
<link href="styles.css" rel="stylesheet">
</head>
<body>
<header>
<h1><a href="https://audiomotion.dev" class="logo">audioMotion-analyzer</a> | overlay demo</h1>
<ul class="header-nav">
<li><a href="index.html">Demos</a></li>
<li><a href="https://audiomotion.dev">Home</a></li>
<li><a href="https://github.com/hvianna/audioMotion-analyzer/tree/master/demo/src/overlay.js">View on GitHub</a></li>
</ul>
</header>
<div id="container" class="overlay">
<video id="video" src="media/night-mist.mp4" controls></video>
</div>
<p class="center">
<button data-prop="isOn" data-func="toggleAnalyzer">toggleAnalyzer()</button>
<button id="btn_fullscr">Fullscreen</button>
</p>
<div class="analyzer-configuration">
<div class="box center">
<label class="label">Load a preset
<select id="presets"></select>
</label>
<label class="label">mode
<select data-setting="mode">
<option value="0">0 - Discrete frequencies</option>
<option value="1">1 - 1/24th octave bands</option>
<option value="2">2 - 1/12th octave bands</option>
<option value="3">3 - 1/8th octave bands</option>
<option value="4">4 - 1/6th octave bands</option>
<option value="5">5 - 1/4th octave bands</option>
<option value="6">6 - 1/3rd octave bands</option>
<option value="7">7 - Half octave bands</option>
<option value="8">8 - Full octave bands</option>
<option value="10">10 - Line / Area graph</option>
</select>
</label>
<label class="label">gradient
<select data-setting="gradient">
<option value="classic">classic</option>
<option value="prism">prism</option>
<option value="rainbow">rainbow</option>
</select>
</label>
<label class="label">fftSize
<select data-setting="fftSize">
<option value="1024">1024</option>
<option value="2048">2048</option>
<option value="4096">4096</option>
<option value="8192">8192</option>
<option value="16384">16384</option>
<option value="32768">32768</option>
</select>
</label>
<label class="label">minFreq
<select data-setting="minFreq">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
<option value="60">60</option>
<option value="100">100</option>
</select>
</label>
<label class="label">maxFreq
<select data-setting="maxFreq">
<option value="8000">8000</option>
<option value="10000">10000</option>
<option value="12000">12000</option>
<option value="16000">16000</option>
<option value="20000">20000</option>
<option value="22000">22000</option>
</select>
</label>
<label class="label">minDecibels
<input type="range" min="-100" max="-60" step="5" data-setting="minDecibels">
<div class="value"></div>
</label>
<label class="label">maxDecibels
<input type="range" min="-40" max="0" step="5" data-setting="maxDecibels">
<div class="value"></div>
</label>
<label class="label">smoothing
<input type="range" min="0" max=".9" step=".1" data-setting="smoothing">
<div class="value"></div>
</label>
<label class="label">volume
<input type="range" min="0" max="1" step=".1" data-setting="volume">
<div class="value"></div>
</label>
</div>
<div class="box center">
<fieldset>
<legend>modes 1-8 only</legend>
<label class="label">barSpace
<select data-setting="barSpace">
<option value="0">0</option>
<option value="0.1">0.1</option>
<option value="0.25">0.25</option>
<option value="0.5">0.5</option>
<option value="0.75">0.75</option>
<option value="1">1 (legacy)</option>
</select>
</label>
</fieldset>
<fieldset>
<legend>mode 10 only</legend>
<label class="label">lineWidth
<input type="range" id="line_width" min="0" max="9" step="1" data-setting="lineWidth">
<div class="value"></div>
</label>
<label class="label">fillAlpha
<input type="range" id="fill_alpha" min="0" max="1" step=".1" data-setting="fillAlpha">
<div class="value"></div>
</label>
</fieldset>
<fieldset>
<legend>Radial effect</legend>
<button data-prop="radial">radial</button>
<label class="label">spinSpeed
<input type="range" min="-5" max="5" step="1" data-setting="spinSpeed">
<div class="value"></div>
</label>
</fieldset>
<fieldset>
<legend>Reflex effect</legend>
<label class="label">reflexRatio
<input type="range" min="0" max=".9" step=".1" data-setting="reflexRatio">
<div class="value"></div>
</label>
<label class="label">reflexAlpha
<input type="range" min="0" max="1" step=".05" data-setting="reflexAlpha">
<div class="value"></div>
</label>
<label class="label">reflexBright
<input type="range" min="0" max="2" step=".1" data-setting="reflexBright">
<div class="value"></div>
</label>
<button data-prop="reflexFit">reflexFit</button>
</fieldset>
<fieldset>
<legend>Overlay mode</legend>
<button data-prop="overlay">overlay</button>
<label class="label">bgAlpha
<input type="range" id="bg_alpha" min="0" max="1" step=".1" data-setting="bgAlpha">
<div class="value"></div>
</label>
</fieldset>
</div>
<div class="box center">
<button data-prop="showBgColor">showBgColor</button>
<button data-prop="showPeaks">showPeaks</button>
<button data-prop="showLeds">showLeds</button>
<button data-prop="lumiBars">lumiBars</button>
<button data-prop="showScaleX">showScaleX</button>
<button data-prop="showScaleY">showScaleY</button>
<button data-prop="stereo">stereo</button>
<button data-prop="splitGradient">splitGradient</button>
<button data-prop="loRes">loRes</button>
<button data-prop="showFPS">showFPS</button>
</div>
</div>
<div class="credits">
<strong>audioMotion-analyzer v<span id="version"></span></strong> Copyright © 2018-2021 Henrique Avila Vianna. Source code available on <a href="https://github.com/hvianna/audioMotion-analyzer">GitHub</a>.
Video: <a href="https://www.youtube.com/watch?v=Trh6syrA8qU">"Night Mist" by NuSan & Valden</a>
</div>
<script src="overlay.js" type="module"></script>
<script>
if ( location.href.startsWith('file://') )
alert("This demo won't work when loaded via file:// protocol.\nSee the README file inside the demo folder for more information.");
</script>
</body>
</html>