Sequencer

 A device or program that records and plays back user-determined sets of music performance commands, usually in the form of MIDI data. Most sequencers also allow the data to be edited in various ways and stored on disk.