Skip to content

Commit

Permalink
Force base MIDI note to be an integer
Browse files Browse the repository at this point in the history
ref #416
  • Loading branch information
frostburn committed Nov 26, 2023
1 parent d1dd036 commit 87a534f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ const encodeState = debounce(() => {
router.push({ path: getPath(url), query });
}, 200);
watch(baseMidiNote, (newValue) => {
if (isNaN(newValue)) {
baseMidiNote.value = 69;
} else if (Math.round(newValue) != newValue) {
baseMidiNote.value = Math.round(newValue);
}
});
watch(
[
scaleName,
Expand Down

0 comments on commit 87a534f

Please sign in to comment.