forked from lichard49/web-audio-bluetooth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
84 lines (71 loc) · 3.35 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
<html>
<head>
<title>Button to play sound</title>
<!-- <script src="http://unpkg.com/tone"></script> -->
<script src="https://unpkg.com/[email protected]/build/Tone.js"></script>
<script src="test_sound.js"></script>
</head>
<body>
<h3>Abstract</h3>
<div>
Utilizing tone.js, we are able to manipulate sound and send messages in the form of tones
to bypass ios's complications with the bluetooth api. This also allows us to present a tool that can be used anywhere
in the form of a browser rather than an app that needs to be downloaded.
</div>
<h3>Data</h3>
<div>
With this graph you can see that as the decibel levels increase, there is an upward trend in data.<br>
This detail allows us to assign letters to different decibel levels.<br>
<img src="Sound_test-website/RMS_graph/output.png" /><br>
The bar graph below displays the accuracy difference between the various models that were used to interpret letters<br>
<img src="Sound_test-website/Accuracy_graph/acc_bar_graph.png" />
</div>
<h3>Buttons that make sounds</h3>
<div>
<p>These buttons make sounds</p>
<button onclick="PlaySound()">One sound</button>
<button onclick="PlayMoreSound()">Many sounds</button>
</div><br>
<h3>Button that makes a long sound</h3>
<div>
<p>This button plays a long sound that can be adjusted to different decibel levels</p>
<p>The slider ranges from -80 to -20</p>
<button onclick = "PlayLongSound()">Play</button>
<button onclick = "Stop()">Stop</button>
<div class="slider">
<input id="myRange" type="range" min="-80" max="-20" value="0" >
<div id="sliderAmount"></div>
</div>
</div><br>
<h3>Button that sends a message that is encoded in sound</h3>
<div>
<p>In case you don't have a microcontroller:</p>
<iframe width="420" height="325" frameborder="0" allowfullscreen src="https://www.youtube.com/embed/GkKwaquj-iU"></iframe>
<p>This button plays a message ("def") that is encoded into sounds</p>
<button onclick = "PlayMessage([-50,-100,-49,-100,-48,-100])">Play message</button>
</div><br>
<h3>Button that sends a custom message encoded in sound</h3>
<div>
<p>In case you do not have a microcontroller, here are some demos:</p>
Version 2<br>
<iframe width="420" height="325" frameborder="0" allowfullscreen src="https://www.youtube.com/embed/7w7A5j_sBq8"></iframe><br><br>
Version 3<br>
<iframe width="420" height="325" frameborder="0" allowfullscreen src="https://www.youtube.com/embed/reQ0cXwQSHI"></iframe>
<p>This button plays a custom message encoded in sound <br>
Messages to test:<br>
abcdefghijklmnopqrstuvwxyz<br>
ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
Outputting message right now<br>
This should output a really long message to test if ACCURACY is at ONE HUNDRED PERCENT
</p>
<button onclick = "PlayCustomMessage()">Play custom message</button>
<button onclick = "Stop()">Stop</button><br>
<textarea id = "Cmessage" placeholder = "Enter Custom Message"></textarea>
</div>
<h3>Button that sends a tone at decibel level -50</h3>
<div>
<button onclick = "PlayDiffFreq()">Play sound</button>
<button onclick = "FreqStop()">Stop</button>
</div>
</body>
</html>