summaryrefslogtreecommitdiff
path: root/Build/index.html
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2021-07-26 09:50:19 +0100
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2021-07-26 09:50:19 +0100
commitef53f705cf5708875a43fc314d741964ffa71637 (patch)
tree0313a10e696bc905b435360b2a3ad5415eef433a /Build/index.html
parent15540b20041cbeb6e804549445c02cc12aead7ed (diff)
downloadWasmAudio-ef53f705cf5708875a43fc314d741964ffa71637.tar.gz
WasmAudio-ef53f705cf5708875a43fc314d741964ffa71637.zip
Update to be compatible with web
Diffstat (limited to 'Build/index.html')
-rw-r--r--Build/index.html39
1 files changed, 38 insertions, 1 deletions
diff --git a/Build/index.html b/Build/index.html
index 24e84d6..4c371ec 100644
--- a/Build/index.html
+++ b/Build/index.html
@@ -5,7 +5,7 @@
</head>
<body>
<pre>
- Koh fractal. Version: 0.3
+ Wasm audio FIR. Version: 0.1
</pre>
<script type='text/javascript'>
var Module = {};
@@ -26,6 +26,41 @@
<div align="center">
<canvas id="canvas" ></canvas>
</div>
+
+ <button class="setCutoffFrequency" type="button">Set Cutoff(Hz)</button>
+ <textarea class="outSetCutoffFrequency"></textarea>
+
+ <button class="setNumberTaps" type="button">Set Taps</button>
+ <textarea class="outSetNumberTaps"></textarea>
+
+ <button class="recalculateFir" type="button">Calc</button>
+ <textarea class="outCoeficients">1</textarea>
+
+
+ <script>
+ get_cutoff_freq = Module.cwrap("get_cutoff_freq","number",[]);
+ get_tap_number = Module.cwrap("get_tap_number","number",[]);
+ recalculate_fir = Module.cwrap("recalculate_fir",'number',[]);
+
+ var setCutoffFrequency = document.querySelector('.setCutoffFrequency')
+ var outSetCutoffFrequency = document.querySelector('.outSetCutoffFrequency')
+ var setNumberTaps = document.querySelector('.setNumberTaps')
+ var outSetNumberTaps = document.querySelector('.outSetNumberTaps')
+ var recalculateFir = document.querySelector('.recalculateFir')
+ var outCoeficients = document.querySelector('.outCoeficients')
+
+ //outSetCutoffFrequency.value = get_cutoff_freq();
+ //outSetCutoffFrequency.value = "Hello";
+ //outSetNumberTaps.value = get_tap_number();
+
+ recalculateFir.addEventListener('click', function(){
+ recalculate_fir();
+ console.log("Oh noe");
+ outCoeficients.value = 2;
+ })
+
+ </script>
+
<pre>
If no recording, check developer console(Ctrl+Shift+I) or add domain (http://wasm.main.lv) to chrome://flags/#unsafely-treat-insecure-origin-as-secure
@@ -40,6 +75,8 @@
Changelog:
v0.1 - initial release
</pre>
+
+ <!--<script src="index.js"></script>-->
</body>
</html>