Skip to content

Commit

Permalink
Change delay to bpm
Browse files Browse the repository at this point in the history
  • Loading branch information
reimu committed Oct 6, 2023
1 parent ad730d7 commit d138d61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/autoplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ autoplayEle.addEventListener("click", () => {
errorEle.innerText = "";
try {
const notes = inputEle.value;
const delay = parseInt(delayEle.value, 10);
const delay = 60000 / parseInt(delayEle.value, 10);
if (isNaN(delay)) {
throw new Error(`Invalid delay: ${delayEle.value}`);
}
Expand Down
4 changes: 2 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<button id="transpose" title="Transpose">Transpose</button>
</section>
<section class="toolbar">
<label title="Base for consecutive non-chord notes">
Base delay
<label title="Beats per minute for consecutive non-chord notes">
Bpm
<input id="delay" type="number" value="100" />
</label>
<p
Expand Down

0 comments on commit d138d61

Please sign in to comment.