Protect midi state update against no-file situations. Also don't update during playback