diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5c57963 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +src/libs/* \ No newline at end of file diff --git a/fetch-libs.sh b/fetch-libs.sh new file mode 100644 index 0000000..a1456b8 --- /dev/null +++ b/fetch-libs.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +curl https://unpkg.com/web-audio-daw@4.13.2 -Lo src/libs/wad.js +curl https://unpkg.com/jquery@3.7.1 -Lo src/libs/jquery.js \ No newline at end of file diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..253b952 --- /dev/null +++ b/src/index.html @@ -0,0 +1,50 @@ + + + + toolbox + + + +
+
+
+
+ +
+ (+10c) + 400.23hz + F#4 + + +
+
+
+
+ Temperment: Equal +
+
+ A4 = 440 +
+
+ Transpose: F +
+
+
+
+
+
+ Tuner +
+
+ Metronome +
+
+ Settings +
+
+
+ + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..3787599 --- /dev/null +++ b/src/main.js @@ -0,0 +1,25 @@ +function clickhandler() { + const voice = new Wad({source: 'mic'}); + const tuner = new Wad.Poly(); + const pitchoutput = document.getElementById("pitch"); + + tuner.setVolume(0); + tuner.add(voice); + + voice.play(); + + tuner.updatePitch(); + + const logPitch = function() { + console.log(tuner.pitch); + pitch.innerHTML = tuner.pitch; + requestAnimationFrame(logPitch); + }; + logPitch(); +} +$(document).ready(function() { + $('.debugme').each(function () { + var hue = 'rgb(' + (Math.floor((256-199)*Math.random()) + 200) + ',' + (Math.floor((256-199)*Math.random()) + 200) + ',' + (Math.floor((256-199)*Math.random()) + 200) + ')'; + $(this).css("background-color", hue); + }); +}); \ No newline at end of file diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..aabebec --- /dev/null +++ b/src/style.css @@ -0,0 +1,77 @@ +#container { + display: flex; + width: 100%; + height: 100vh; + flex-direction: column; + flex-wrap: nowrap; +} + +#params { + display: flex; + flex-direction: row; +} + +#bottombar { + display: flex; + flex-direction: row; +} + +.barmember, .param { + width: 100%; + height: 4em; + text-align: center; +} + +#maincontent { + flex-grow: 1; + min-width: 0; + height: 100%; +} + +#resultcontainer { + flex-grow: 1; + min-width: 0; + display: flex; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + flex-direction: column; + justify-content: center; + align-items: center; +} + +#higherdiff, #higherfreq, #lowerfreq, #lowerdiff { + font-size: 1em; + min-height: 1em; + min-width: 1px; +} + +body { + margin: 0px; +} + +#tunerview { + height: 100%; + position: relative; +} + +#tunerpage { + display: flex; + flex-direction: column; + height: 100%; +} + +#tunerbackground { + position: absolute; + z-index: -1; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +#detectednote { + font-size: 4em; +} \ No newline at end of file