Simple monitor for displaying MIDI status for digital pianos.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

getKeyOctave.ts 145 B

1234567
  1. interface GetKeyOctave {
  2. (key: number): number,
  3. }
  4. const getOctave: GetKeyOctave = (key) => Math.floor(key / 12) - 1
  5. export default getOctave