Last active
March 13, 2020 03:38
-
-
Save hsitz/419165fe2ec2544093e2101b59f1bfba to your computer and use it in GitHub Desktop.
fbfly-nocomments
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
@OnMidiNote | |
note = MIDIByte2 | |
button_col = 1 + ( div (59-(note-40)), 3) | |
note = 4 + ((button_col-1) * 7) | |
note = 12 + (note % 12) | |
c = button_col // just to save typing | |
if row = 1 // row 4 on actual bank | |
if (c < 9) or (c = 12) or (c = 14) or (c = 20) | |
note = note + ( 3 * 12 ) | |
else | |
note = note + ( 4 * 12 ) | |
endif | |
elseif row = 0 // row 3 on actual bank | |
note = note + 4 // base FLY chord note is up major 3rd | |
note = note + (3 * 12) | |
if (c = 1) or (c = 3) | |
note = note - 12 | |
elseif (c = 12) or (c = 14) or (c = 16) or (c = 18) or (c = 19) | |
note = note + 12 | |
endif | |
elseif row = 2 // row 5 on an actual bank | |
note = note + (3 * 12) | |
if (c < 4) or (c = 5) or (c = 7) | |
note = note - 12 | |
elseif (c = 16) or (c = 18) | |
note = note + 12 | |
endif | |
endif | |
chordnote1 = note | |
if row = 0 // row 3 on actual bank | |
chordnote2 = note + 3 | |
elseif row = 1 // row 4 ... | |
chordnote2 = note + 3 | |
elseif row = 2 // row 5 ... | |
chordnote2 = note + 4 | |
endif | |
SendMIDIOut MIDIByte1, chordnote1, MIDIByte3 | |
SendMIDIOut MIDIByte1, chordnote2, MIDIByte3 | |
@END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment