Bevy does not yet have this built-in, but there is a 3rd-party plugin available: bevy_midi.
bevy_midi