Skip to content

Commit

Permalink
Merge pull request #527 from xenharmonic-devs/fix-midi-0
Browse files Browse the repository at this point in the history
Fix MIDI visualization center calculation when base MIDI note = 0
  • Loading branch information
frostburn authored Jan 7, 2024
2 parents 22f8b09 + fbe7d2d commit a172aef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MidiPiano.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const BLACK_WIDTH = 0.6 * KEY_SCALE
// Close enough.
const center = computed(() => {
const info = midiKeyInfo(props.baseMidiNote)
if (info.whiteNumber) {
if (info.whiteNumber !== undefined) {
return info.whiteNumber * KEY_SCALE
}
return (info.sharpOf! + 0.5) * KEY_SCALE
Expand Down

0 comments on commit a172aef

Please sign in to comment.