beep
freq: Hz
duration: sec
vol: %
<script type="module">
import { beep } from "https://code4fukui.github.io/beep/beep.js";
btnplay.onclick = () => {
const freq = infreq.value;
const vol = invol.value / 100;
const duration = induration.value;
beep(freq, duration, vol);
};
btnstop.onclick = () => {
beep(0);
};
btnmulti.onclick = async () => {
await beep(440, 0.1);
await beep(880, 0.1);
};
</script>
src on GitHub