mild refactoring of buffer function names and some

and some Midi work as well.