Created
May 14, 2023 05:11
-
-
Save jens-a-e/e669db1b9c85079605f1f1e6de87db8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A one liner to convert a decimal MIDI note pitch to human readable notation | |
const midiNote2Name = (i, offset=-2) => `${["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"][i%12]}${Math.floor(i / 12) + offset}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment