Guest User

Untitled

a guest
Aug 29th, 2024
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. inline function isWhiteKey(midiNote)
  2. {
  3. // White keys in an octave
  4. local whiteKeys = [0, 2, 4, 5, 7, 9, 11];
  5.  
  6. // Note number in an octave
  7. local noteInOctave = midiNote % 12;
  8.  
  9. // Check if the note is in the list of white keys
  10. return whiteKeys.contains(noteInOctave);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment