Skip to content

Commit

Permalink
Merge pull request #422 from xenharmonic-devs/round-base-midi-note
Browse files Browse the repository at this point in the history
Force base MIDI note to be an integer
  • Loading branch information
frostburn authored Nov 26, 2023
2 parents d1dd036 + 87a534f commit ec28ca1
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 ec28ca1

Please sign in to comment.