hear settings change

This commit is contained in:
Adrien MALINGREY 2024-08-23 09:12:53 +02:00
parent 96a49d7c57
commit 71cdf9f937
2 changed files with 16 additions and 13 deletions

View File

@ -10,18 +10,18 @@
<body> <body>
<div class="sliders"> <div class="sliders">
<label><input type="range" id="volRange" min="0" max="1" step="any" value="0.400" orient="vertical" oninput="onvolumeinput()"/>Vol.</label> <label><input type="range" id="volRange" min="0" max="1" step="any" value="0.400" orient="vertical" oninput="onvolumeinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>Vol.</label>
<label><input type="range" id="modRange" min="0" max="200" step="any" value="20" orient="vertical" oninput="onmodinput()" />Mod.</label> <label><input type="range" id="modRange" min="0" max="200" step="any" value="20" orient="vertical" oninput="onmodinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>Mod.</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.200" orient="vertical" oninput="onpartialinput()"/>1f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.200" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>1f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.150" orient="vertical" oninput="onpartialinput()"/>2f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.150" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>2f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.050" orient="vertical" oninput="onpartialinput()"/>3f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.050" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>3f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.135" orient="vertical" oninput="onpartialinput()"/>4f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.135" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>4f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.000" orient="vertical" oninput="onpartialinput()"/>5f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.000" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>5f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.127" orient="vertical" oninput="onpartialinput()"/>6f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.127" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>6f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.000" orient="vertical" oninput="onpartialinput()"/>7f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.000" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>7f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.040" orient="vertical" oninput="onpartialinput()"/>8f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.040" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>8f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.000" orient="vertical" oninput="onpartialinput()"/>9f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.000" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>9f</label>
<label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.040" orient="vertical" oninput="onpartialinput()"/>10f</label> <label><input type="range" class="partial" min="0" max="0.2" step="any" value="0.040" orient="vertical" oninput="onpartialinput()" onmousedown="playNote(57)" onmouseup="stopNote(57)"/>10f</label>
</div> </div>
<div class="keyboard"> <div class="keyboard">
<button type="button" class="white key" data-note="33">&lt;</button> <button type="button" class="white key" data-note="33">&lt;</button>
@ -193,6 +193,9 @@
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
{disableNormalization: false,} {disableNormalization: false,}
) )
for (const note in oscillators) {
oscillators[note].setPeriodicWave(wave)
}
} }
function onkeydown(key) { function onkeydown(key) {

View File

@ -74,6 +74,6 @@ body {
align-items: center; align-items: center;
} }
[orient="vertical"] { [orient=vertical] {
-webkit-appearance: slider-vertical; -webkit-appearance: slider-vertical;
} }