started midi functions

My hope is that this will be the last time I define all these
dumb little midi utility functions.