An electronic musical instrument comprising: a plurality of playing keys to be operated by a user for generating a real time sound generation event to be outputted from the musical instrument in real time; a first memory adapted to store a plurality of waveforms to be used in automatic performance that is outputted by the musical instrument in accordance with automatic performance data so as to accompany the real time sound generation event; a second memory having faster access speed than the first memory, the second memory including an event buffer for storing data for the real time sound generation event specified by the user operation of the playing keys and data for the automatic performance, the second memory further including a plurality of waveform buffers for retaining data for waveforms to be used in sound production; and at least one processor, wherein the at least one processor is configured to perform the following: causing the automatic performance data to be generated, the automatic performance data including an identifier to specify a waveform used in the automatic performance, data that specifies events included in the automatic performance, and data that indicates a playback timing of each of said events in the automatic performance; searching the plurality of waveform buffers in the second memory to determine whether any of the plurality of waveform buffers retains the waveform specified by the identifier in the automatic performance data; if the searching determines that none of the plurality of waveform buffers retain the specified waveform, accessing the first memory, retrieving the specified waveform from the first memory, and causing the specified waveform to be retained in one of the plurality of waveform buffers in the second memory that is available or is caused to be available characterised in the processor being adapted for further causing the playback timing of each of said events in the automatic performance data to be delayed by a prescribed delay time to generate delayed automatic performance data that include said events with the delayed playback timings, and causing the delayed automatic performance data to be stored in the event buffer, the prescribed delay time being such that the transfer and retention of the specific waveform from the first memory to the second memory are completed during the prescribed delay time; and accessing the event buffer to retrieve said data for the real time sound generation event and said delayed automatic performance data and causing a sound corresponding to the user operation of the playing keys and a sound of the automatic performance to be generated and outputted from the musical instrument in accordance with the retrieved data for the real time sound generation event and the retrieved delayed automatic performance data. a plurality of playing keys to be operated by a user for generating a real time sound generation event to be outputted from the musical instrument in real time; a first memory adapted to store a plurality of waveforms to be used in automatic performance that is outputted by the musical instrument in accordance with automatic performance data so as to accompany the real time sound generation event; a second memory having faster access speed than the first memory, the second memory including an event buffer for storing data for the real time sound generation event specified by the user operation of the playing keys and data for the automatic performance, the second memory further including a plurality of waveform buffers for retaining data for waveforms to be used in sound production; and at least one processor, wherein the at least one processor is configured to perform the following: causing the automatic performance data to be generated, the automatic performance data including an identifier to specify a waveform used in the automatic performance, data that specifies events included in the automatic performance, and data that indicates a playback timing of each of said events in the automatic performance; searching the plurality of waveform buffers in the second memory to determine whether any of the plurality of waveform buffers retains the waveform specified by the identifier in the automatic performance data; if the searching determines that none of the plurality of waveform buffers retain the specified waveform, accessing the first memory, retrieving the specified waveform from the first memory, and causing the specified waveform to be retained in one of the plurality of waveform buffers in the second memory that is available or is caused to be available characterised in the processor being adapted for further causing the playback timing of each of said events in the automatic performance data to be delayed by a prescribed delay time to generate delayed automatic performance data that include said events with the delayed playback timings, and causing the delayed automatic performance data to be stored in the event buffer, the prescribed delay time being such that the transfer and retention of the specific waveform from the first memory to the second memory are completed during the prescribed delay time; and accessing the event buffer to retrieve said data for the real time sound generation event and said delayed automatic performance data and causing a sound corresponding to the user operation of the playing keys and a sound of the automatic performance to be generated and outputted from the musical instrument in accordance with the retrieved data for the real time sound generation event and the retrieved delayed automatic performance data.