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
#returns true if the message represents a positive change of | |
# the given controller number, as will happen when depressing buttons a midi keyb. | |
# We ignore messages with value bytes 0, as those are sent on button releases. | |
on isMidiButtonPressed(msg, controllerNumber) | |
return (isControlChange(msg, controllerNumber) and (item 3 of msg > 0)) | |
end isMidiButtonPressed | |
on isControlChange(msg, controllerNumber) | |
return ((item 1 of msg = 191) and (item 2 of msg = controllerNumber)) | |
end isControlChange |