change function MIDIAccess(){...} to var MIDIAccess = function(){...}