Created
January 7, 2023 13:15
-
-
Save JavascriptMick/b0ed0e8947dd28551eeace650b2d653c to your computer and use it in GitHub Desktop.
MidiPipe Apple script for fixing problematic 'All Notes Off' midi signals from older keyboards
This file contains hidden or 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
— My Keyboard was 'enveloping' each Note On message with an 'All Notes Off' message | |
— This resulted in shitty results, especially chords which were morphed into single notes | |
— This Script ignores the initial 'All Notes Off' message and morphs the second one into an appropriate 'Note Up' message | |
property noteonchannel : {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | |
on runme(message) | |
if (item 2 of message = 123) then — All Notes Off | |
copy ((item 1 of message) - 175) to channel | |
if (item channel of noteonchannel > 0) then | |
set item 1 of message to (127 + channel) | |
set item 2 of message to (item channel of noteonchannel) | |
set item 3 of message to 0 | |
set item channel of noteonchannel to 0 | |
return message | |
end if | |
else if (item 1 of message >=143 and item 1 of message <= 159) then — Note On | |
set item ((item 1 of message) - 143) of noteonchannel to (item 2 of message) —save off the key pressed | |
return message | |
else | |
return message | |
end if | |
end runme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see for discussion. https://www.reddit.com/r/midi/comments/105e7vb/cant_play_chords_all_notes_off/