Maps midi messages to javascript functions, use at your own risk