-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html@freq=500&waveform=square
More file actions
438 lines (321 loc) · 14.2 KB
/
Copy pathindex.html@freq=500&waveform=square
File metadata and controls
438 lines (321 loc) · 14.2 KB
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Online Tone Generator 2.0 - Free, Simple and Easy to Use</title>
<meta name="viewport" content="initial-scale=1">
<script async src="https://cdn.fuseplatform.net/publift/tags/2/3547/fuse.js"></script>
<link rel="shortcut icon" type="image/png" href="favicon.png">
<link href="css/main.css" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z8TTZXQT2S"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-Z8TTZXQT2S');
</script>
<style>
/* Styles for publift */
body {
margin-bottom:100px;
}
#wrapper {
max-width: 1100px;
}
@media only screen and (max-width: 1868px) {
.fuse-sidebar {
width:160px!important;
}
}
@media only screen and (max-width: 1700px) {
.fuse-sidebar {
width:160px!important;
}
#wrapper {
max-width: 1000px;
}
}
@media only screen and (max-width: 1423px) {
#wrapper {
max-width: 1100px;
}
.fuse-sidebar {
display:none!important;
}
}
</style>
</head>
<body class="">
<div class="site-outer-wrapper" style="max-width: 1900px;margin: 0 auto;text-align:center;">
<div class="fuse-sidebar" style="width:200px;float:left;width: 300px;position: sticky;top:20px;margin:20px;display:inline-block;">
<div data-fuse="23080447251"></div>
</div>
<div id="wrapper" style="display: inline-block;text-align:left;">
<div id="navMenu">
<ul id="nav" class=''>
<li><a href="index.html@freq=500&waveform=square#" class="js-menu-toggle">☰ Show menu</a></li>
<li>
<a class="" href="index.html">Home </a>
</li>
<li>
<a class="" href="multiple-tone-generator.html">Multiple Tone Generator </a>
</li>
<li>
<a class="" href="pitch-shifter.html">Pitch Shifter </a>
</li>
<li>
<a class="" href="time-stretcher.html">Time Stretcher </a>
</li>
<li>
<a class="" href="voice-generator.html">Voice Generator </a>
</li>
<li>
<a class="" href="voice-recorder.html">Voice Recorder <span class="new">NEW</span></a>
</li>
<li>
<a class="" href="frequency-sweep-generator.html">Sweep Generator </a>
</li>
<li>
<a class="" href="tuning.html">Instrument Tuning </a>
</li>
<li>
<a class="" href="subwoofer.html">Subwoofer Testing </a>
</li>
<li>
<a class="" href="hearingtest.html">Hearing Test </a>
</li>
<li>
<a class="" href="noise.html">Noise Generator </a>
</li>
<li>
<a class="" href="binauralbeats.html">Binaural Beats </a>
</li>
<li>
<a class="" href="432Hz.html">432Hz Frequency </a>
</li>
<li>
<a class="" href="dtmf.html">DTMF Signals </a>
</li>
<li>
<a class="" href="metronome.html">Metronome </a>
</li>
<li>
<a class="" href="pips.html">The Pips </a>
</li>
<li>
<a class="" href="theory.html">Acoustic Theory </a>
</li>
<li class="">
<a class="" href="shop.html">Shop <span class="new">NEW</span></a>
</li>
<li class="">
<a class="" href="about.html">About </a>
</li>
<li>
<a target="_blank" rel="noreferrer" href="https://ko-fi.com/onlinetonegenerator" class="last">Support the developer <span style="font-family:sans-serif;">☕</span></a>
</li>
</ul>
<script>
$(".js-menu-toggle").click(function(e){
e.preventDefault();
$nav = $(this).parents("#nav");
if ($nav.hasClass("js-open")){
// $nav.height($(this).outerHeight());
$(this).html("☰ Show menu");
} else {
// $nav.height("auto");
$(this).html("☰ Close menu");
}
$nav.toggleClass("js-open");
});
</script>
</div>
<div id="mainContent">
<h1><a href='index.html'><!-- <img src="/img/Speaker_Icon-tilted.png" alt=""> -->Online Tone Generator 2.0</a></h1>
<p class="tagline"><strong>Free, Simple and Easy to Use.</strong></p>
<link href="/css/vendor/jquery.nouislider.css" rel="stylesheet">
<script src="/js/vendor/jquery.nouislider.min.js"></script>
<p>
Simply enter your desired frequency and press play. You will hear a pure tone sine wave sampled at a rate of 44.1kHz.
The tone will continue until the stop button is pushed.
</p>
<p>
The tone generator can play four different waveforms: Sine, Square, Sawtooth and Triangle. Click on the buttons to select
which waveform you would like to generate.
</p>
<!-- <p class="warning"> -->
<p style='font-weight:bold'>
Please always make sure headphones/speakers are set to a low volume to avoid damage to hearing or equipment.
</p>
<div class="fuse-in-content" style="margin:20px 0;min-height: 250px;max-width:100%;">
<!-- GAM 71161633/OLGEN_onlinetonegenerator/incontent_1 -->
<div data-fuse="23080803961"></div>
</div>
<div class="generator-ad-wrapper">
<div id="generator" class='generator'>
<form id="generatorForm" action ="https://onlinetonegenerator.com/php/tonegenerator.php" method="post">
<div class="input-group">
<input aria-label="Frequency" type="text" class="input--frequency" id="freq" name="freq" value="440" autocomplete="off" />
<p id="units">Hertz</p>
</div>
<div style='clear:both'></div>
<div class="generator-buttons">
<button type="button" class="beginTuning generatorButton">Play</button>
<button type="button" onclick="stop()" class="stopTuning generatorButton">Stop</button>
<button type="submit" class="downloadButton generatorButton">Save</button>
</div>
<div class="volume-wrapper">
<label for="">Volume</label>
<div class="volume-slider"></div>
</div>
<div class="advanced-options">
<div class="waveform-wrapper">
<input type="radio" name="waveform" value='sine' id='sine' checked>
<label for="sine">Sine</label>
<div class="waveform-image waveform-image--sine"></div>
</div>
<div class="waveform-wrapper">
<input type="radio" name="waveform" value='square' id='square'>
<label for="square">Square</label>
<div class="waveform-image waveform-image--square"></div>
</div>
<div class="waveform-wrapper">
<input type="radio" name="waveform" value='sawtooth' id='sawtooth'>
<label for="sawtooth">Sawtooth</label>
<div class="waveform-image waveform-image--sawtooth"></div>
</div>
<div class="waveform-wrapper">
<input type="radio" name="waveform" value='triangle' id='triangle'>
<label for="triangle">Triangle</label>
<div class="waveform-image waveform-image--triangle"></div>
</div>
</div>
</form>
<p class="clear"></p>
<div id="spinner" style="display:none;">
<p>Your file will be ready in a few seconds...</p>
<img src="img/ajax-loader.gif" alt="Spinning loader" />
</div>
<p class="clear"></p>
</div>
<div class="rectangle-ad-wrapper" style="padding:10px;">
</div>
</div>
<div id="fb-root"></div>
<script>
$(window).on("load", function() {
faceyb(document, 'script', 'facebook-jssdk');
twitter(document, 'script', 'twitter-wjs');
});
function faceyb(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
};
function twitter(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}
/* Twitter */
</script>
<div class="social-buttons">
<div class="twitter-share-button">
<a href="https://twitter.com/share" data-url='https://onlinetonegenerator.github.io/' class="twitter-share-button"></a>
</div>
<div class="fb-share-button-wrapper">
<div class="fb-share-button" data-href="https://onlinetonegenerator.github.io/" data-type="button_count"></div>
</div>
</div>
<p>
Online Tone Generator is compatible with the latest versions of Chrome, Firefox, Safari and Microsoft Edge so if you don't hear any sound, please update your browser and try again. Alternatively, if this is not possible, you can download and save a 10 second WAV file that can be played at any time and is universally compatible with all browsers and software.
</p>
<p>
You can smoothly increment the frequency by clicking in the generator's input box, and pressing and holding the up or down arrow on your keyboard. This will increase/decrease the frequency by 1Hz at a time. If you hold the shift key at the same time, the frequency will change by plus or minus 10Hz at a time instead.
</p>
<style type="text/css">
.ad-wrapper {
width: 320px;
height: 50px;
margin-left:auto;
margin-right:auto;
}
@media (min-width:500px) {
.ad-wrapper {
width: 468px;
height: 60px;
}
}
@media (min-width:980px) {
.ad-wrapper {
width: 728px;
height: 90px;
}
}
</style>
<p>
Did you know you can now easily share specific tones with others using simple links? For example, if
you want to share a link for a 432Hz frequency, simply type the following into your address bar:
<a href='index.html@freq=432'>https://onlinetonegenerator.github.io?freq=432</a>. The number at the end of the URL
represents the frequency so simply change this to whatever frequency you want.
</p>
<div class="fuse-in-content" style="margin:20px 0;min-height: 250px;max-width: 100%;">
<!-- GAM 71161633/OLGEN_onlinetonegenerator/incontent_2 -->
<div data-fuse="23081403308"></div>
</div>
<p>
A similar principle also applies for pre-selecting a waveform. For example, to pre-select the square wave, simply use <a href='index.html@waveform=square'>https://onlinetonegenerator.github.io?waveform=square</a>. For the other types, change the word "square", with "sine", "sawtooth" or "triangle".
</p>
<p>If you would like to specify both a frequency <em>and</em> a waveform, this is possible by using an & character, like in this example: <a href='index.html@freq=500&waveform=square'>https://onlinetonegenerator.github.io?freq=500&waveform=square</a></p>
<script>
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? null : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var getFreq = getParameterByName('freq');
var getWaveform = getParameterByName('waveform');
if (getFreq){
$("#freq").val(getFreq);
}
if (getWaveform){
getWaveform.toLowerCase();
if (getWaveform == "sine" || getWaveform == "square" || getWaveform == "sawtooth" || getWaveform == "triangle"){
$(".waveform-wrapper input").attr("checked", false).prop("checked", false);
$("input[value='"+getWaveform+"']").attr("checked", true).prop("checked", true);
if (typeof oscillator != 'undefined') oscillator.type = $(this).children("input").val();
}
}
// alert(getFreq);
</script>
<script src='js/vendor/jquery.nouislider.min.js'></script>
</div>
<div id="footer">
Online Tone Generator utilises HTML5 and the Web Audio API. It is optimized for use with the latest versions of Chrome, Safari, Firefox and Microsoft Edge.
<br />
© onlinetonegenerator.github.io <a href="privacy-policy.html">Privacy Policy.</a>
</div>
</div><!-- End of main content wrapper -->
<div class="fuse-sidebar" style="display:inline-block;vertical-align:top;width: 300px;position: sticky;top:20px;margin:20px;">
<div data-fuse="23080803958"></div>
</div>
</div>
<!-- <p style="clear:both"></p> -->
</div>
<script src='js/tonegenerator.js'></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
if (window.location.host != 'localhost:4000') {
ga('create', 'UA-17960919-2', 'onlinetonegenerator.github.io');
ga('send', 'pageview');
window.onerror = function(message, file, line){
ga('send', 'event', 'JavaScript Error', message, file + ": Line "+ line, { 'nonInteraction': 1 });
}
}
</script>
</body>
</html>