MIDI sound util- make sure resources are closed, expand documentation