Implement tunings

This commit is contained in:
2025-04-11 17:19:04 -07:00
parent ebba9f43a2
commit 865823b00d
2 changed files with 140 additions and 57 deletions

View File

@@ -15,60 +15,61 @@
<div id="keyboard" class="overflow-auto"></div>
<label>
Volume
<input type="range" min="0.0" max="2.0" value="1.0" step="0.01" id="range">
<input type="range" min="0.0" max="2.0" value="1.0" step="0.01" id="volume">
</label>
</article>
<section id="options">
<form>
<article>
<h3 id="current-note">-</h3>
<article>
<h3 id="current-note">-</h3>
<label>
<input type="checkbox" role="switch" id="hold">
Hold
</label>
</article>
<article>
<label>
<small>Frequency</small>
<input type="number" id="current-frequency" step="0.01">
</label>
<label>
<small id="adjust-value">- Hz</small>
<input type="range" min="0.944" max="1.059" value="1.0" step="0.001" id="adjust">
</label>
</article>
<article>
<fieldset>
<legend><small>Tuning</small></legend>
<label>
<input type="checkbox" role="switch" id="hold">
Hold
<input type="radio" name="tuning" value="equal">
Equal temperament
</label>
</article>
<article>
<label>
<small>Frequency</small>
<input type="number" id="current-frequency" step="0.01">
<input type="radio" name="tuning" value="5th">
Perfect 5th
</label>
</article>
<article>
<fieldset>
<legend><small>Tuning</small></legend>
<label>
<input type="radio" name="tuning">
Equal temperament
</label>
<label>
<input type="radio" name="tuning">
Perfect 5th
</label>
<label>
<input type="radio" name="tuning">
Perfect 4th
</label>
<label>
<input type="radio" name="tuning">
Perfect major 3rd
</label>
<label>
<input type="radio" name="tuning">
Perfect minor 3rd
</label>
<div id="tune-from" style="display: none">
<label>
From:
<select name="tuning-from">
<option selected disabled value></option>
<option>C2</option>
</select>
</label>
</div>
<button>Tune</button>
</fieldset>
</article>
</form>
<label>
<input type="radio" name="tuning" value="4th">
Perfect 4th
</label>
<label>
<input type="radio" name="tuning" value="maj3rd">
Perfect major 3rd
</label>
<label>
<input type="radio" name="tuning" value="min3rd">
Perfect minor 3rd
</label>
<label>
From:
<select id="tuning-from"></select>
</label>
<button id="tune">Tune</button>
</fieldset>
</article>
<article>
<button class="secondary" id="reset">Reset all</button>
<button class="secondary" id="zero">Zero all</button>
</article>
</section>
</main>
</body>