Abstract:
An automatic music performing apparatus comprises a performance memory for storing music performance data of a relative time format including an event group including at least note-on events indicating the note generation start, note-off events indicating the end of the note generation, volume events indicating the volumes of the tone, and tone color events indicating the tone color with the respective events arranged in a music proceeding sequence, and an interval of time interposed between respective two events, wherein the apparatus sequentially reads out the stored music performance data, converts it into note data representing the note generation properties of each note, and stores the note data in a conversion data memory, so that automatic music performance is executed by reading out the stored note data and forming tones corresponding to the note generation properties represented by the read note data.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
   This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2002-138017, filed May 14, 2002, the entire contents of which are incorporated herein by reference. 
   BACKGROUND OF THE INVENTION 
   1. Field of the Invention 
   The present invention relates to an automatic music performing apparatus and an automatic music performance processing program preferably used in electronic musical instruments. 
   2. Description of the Related Art 
   Automatic music performing apparatuses such as sequencers and the like include a sound source having a plurality of sound generation channels capable of simultaneously generating sounds and executing automatic music performance in such a manner that the sound source causes each sound generation channel to generate and mute a sound according to music performance data of an SMF format (MIDI data) that represents the pitch and the sound generation/mute timing of each sound to be performed and further represents the tone, the volume, and the like of a music sound to be generated as well as creates, when a sound is generated, a music sound signal having a designated pitch and volume based on the waveform data of a designated tone. 
   Incidentally, when electronic musical instruments having an automatic music performing function are commercialized as products, mounting a dedicated sound source thereon, which interprets and executes music performance data of the SMF format (MIDI data) as used in conventional automatic music performing apparatuses described above, inevitably results in an increase in a product cost. To achieve the automatic music performing function while realizing a low product cost, it is essential to provide an automatic music performing apparatus capable of automatically performing music according to music performance data of the SMF format without providing a dedicated sound source. 
   BRIEF SUMMARY OF THE INVENTION 
   An object of the present invention, which has been made in view of the above circumstances, is to provide an automatic music performing apparatus capable of executing automatic music performance according to music performance data of an SMF format, without a dedicated sound source. 
   That is, according to one aspect of the present invention, first, the automatic music performing apparatus comprises a music performance data storing means for storing music performance data of a relative time format including an event group, which includes at least note-on events for indicating the start of sound generation of music sounds, note-off events for indicating the end of sound generation of the music sounds, volume events for indicating the volumes of the music sounds, and tone color events for indicating the tone colors of the music sounds with the respective events arranged in a music proceeding sequence, and difference times each interposed between respective events and representing a time interval at which both the events are generated. 
   The music performance data of the relative time format stored in the music performance data storing means is converted into sound data representing the sound generation properties of each sound. 
   Next, automatic music performance is executed by forming music sounds corresponding to the sound generation properties represented by the converted sound data. 
   With the above arrangement, music performance is automatically executed by converting the music performance data of an SMF format, in which the sound generation timing and the events are alternately arranged in the music proceeding sequence, into sound data representing the sound generation properties of each sound and by forming music sounds corresponding to the sound generation properties represented sound data, whereby the music performance can be automatically executed without a dedicated sound source for interpreting and executing the music performance data of the SMF format. 

   
     BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING 
       FIG. 1  is a block diagram showing an arrangement of an embodiment according to the present invention; 
       FIG. 2  is a view showing a memory arrangement of a data ROM  5 ; 
       FIG. 3  is a view showing an arrangement of music performance data PD stored in a music performance data area PDE of a work RAM  6 ; 
       FIG. 4  is a memory map showing an arrangement of a conversion processing work area CWE included in the work RAM  6 ; 
       FIG. 5  is a memory map showing an arrangement of a creation processing work area GWE included in the work RAM  6 ; 
       FIG. 6  is a flowchart showing an operation of a main routine; 
       FIG. 7  is a flowchart showing an operation of conversion processing; 
       FIG. 8  is a flowchart showing an operation of time conversion processing; 
       FIG. 9  is a flowchart showing an operation of poly number restriction processing; 
       FIG. 10  is a flowchart showing an operation of sound conversion processing; 
       FIG. 11  is a flowchart showing an operation of sound conversion processing; 
       FIG. 12  is a flowchart showing an operation of sound conversion processing; 
       FIG. 13  is a flowchart showing an operation of creation processing; 
       FIG. 14  is a flowchart showing an operation of creation processing; and 
       FIG. 15  is a flowchart showing an operation of buffer calculation processing. 
   

   DETAILED DESCRIPTION OF THE INVENTION 
   An automatic music performing apparatus according to the present invention can be applied to so-called DTM apparatuses using a personal computer, in addition to a known electronic musical instruments. An example of an automatic music performing apparatus according to an embodiment of the present invention will be described below with reference to the drawings. 
   (1) Overall Arrangement 
     FIG. 1  is a block diagram showing an arrangement of the embodiment of the present invention. In the figure, reference numeral  1  denotes a panel switch that is composed of various switches disposed on a console panel and creates switch events corresponding to the manipulation of the various switches. Leading switches disposed in the panel switch include, for example, a power switch (not shown), a mode selection switch for selecting operation modes (conversion mode and creation mode that will be described later), and the like. Reference numeral  2  denotes a display unit that is composed of an LCD panel disposed on the console panel and a display driver for controlling the LCD panel according to a display control signal supplied from a CPU  3 . The display unit  2  displays an operating state and a set state according to the manipulation of the panel switch  1 . 
   The CPU  3  executes a control program stored in a program ROM  4  and controls the respective sections of the apparatus according to a selected operation mode. Specifically, when the conversion mode is selected by manipulating the mode selection switch, conversion processing for converting music performance data (MIDI data) of an SMF format into sound data (to be described later). In contrast, when the creation mode is selected, creation processing for creating music sound data based on the converted sound data and automatically performing music is executed. These processing operations will be described later in detail. 
   Reference numeral  5  denotes a data ROM for storing the waveform data and the waveform parameters of various tones. A memory arrangement of the data ROM  5  will be described later. Reference numeral  6  denotes a work RAM including a music performance data area PDE, a conversion processing work area CWE, and a creation processing work area GWE, and a memory arrangement of the work RAM  6  will be described later. Reference numeral  7  denotes a D/A converter (hereinafter, abbreviated as DAC) for converting the music sound data created by the CPU  3  into a music sound waveform of an analog format and outputting it. Reference numeral  8  denotes a sound generation circuit for amplifying the music sound waveform output from the DAC  7  and generating a music sound therefrom through a speaker. 
   (2) Arrangement of Data ROM  5   
   Next, the arrangement of the data ROM  5  will be explained with reference to FIG.  2 . The data ROM  5  includes a waveform data area WDA and a waveform parameter area WPA. The waveform data area WDA stores the waveform data ( 1 ) to (n) of the various tones. The waveform parameter area WPA stores waveform parameters ( 1 ) to (n) corresponding to the waveform data ( 1 ) to (n) of the various tones. Each waveform parameter represents waveform properties that are referred to when the waveform data of a tone color corresponding to the waveform parameter is read out to generate a music sound. Specifically, the waveform parameter is composed of a waveform start address, a waveform loop width, and a waveform end address. 
   Accordingly, when, for example, the waveform data ( 1 ) is read out, the waveform data ( 1 ) starts to be read by referring to the waveform start address stored in the waveform parameter ( 1 ) corresponding to the tone, and when the waveform end address stored therein is reached, the waveform data ( 1 ) is repeatedly read out according to the waveform loop width. 
   (3) Arrangement of Work RAM  6   
   Next, the memory arrangement of the work RAM  6  will be described with reference to  FIGS. 3  to  5 . The work RAM  6  is composed of the music performance data area PDE, the conversion processing work area CWE, and the creation processing work area GWE, as described above. 
   The music performance data area PDE stores music performance data PD of the SMF format input externally through, for example, a MIDI interface (not shown). When the music performance data PD is formed in a Format  0  type, in which, for example, all the tracks (which correspond to a music performing part) are arranged as one track, music performance data PD includes timing data Δt and events EVT and the they are time sequentially addressed in correspondence to the procession of music as shown in FIG.  3 . The timing data Δt represents timing at which a sound is generated and muted by a difference time to a previous event, each of the events EVT represents the pitch, the tone, and the like of a sound to be generated and to be muted, and the music performance data PD includes END data at the end thereof which indicates the end of the music. 
   As shown in  FIG. 4 , the conversion processing work area CWE is composed of a volume data area VDE, a tone color data area TDE, a conversion data area CDE, and a note register area NRE. 
   The conversion data area CDE stores sound data SD that is obtained by converting the music performance data PD of the SMF format into a sound format through conversion processing (that will be described later). The sound data SD is formed of a series of sound data SD( 1 ) to SD(n) extracted from the respective events EVT constituting the music performance data PD. Each of the sound data SD( 1 ) to SD(n) is composed of a sound generation channel number CH, the difference time Δt, a sound volume VOL, a waveform parameter number WPN, and a sound pitch PIT (frequency number). 
   The volume data area VDE includes volume data registers ( 1 ) to (n) corresponding to sound generation channels. When a volume event in the music performance data PD is converted into the sound data SD, volume data is temporally stored in the volume data register (CH) of the sound generation channel number CH to which the volume event is assigned. 
   The tone color data area TDE includes tone color data registers ( 1 ) to (n) corresponding to sound generation channels similarly to the volume data area VDE. When a tone event in the music performance data PD is converted into the sound data SD, a waveform parameter number WPN is temporally stored in the tone color data register (CH) of the sound generation channel number CH to which the tone event is assigned. 
   The note register area NRE includes sound registers NOTE [ 1 ] to [n] corresponding to the sound generation channels. When the music performance data PD is converted into the sound data SD, a sound generation channel number and a sound number are temporally stored in the note register NOTE [CH] corresponding to the sound generation channel number CH to which a note-on event is assigned. 
   The creation processing work area GWE includes various registers and buffers used in the creation processing for creating a music sound waveform (that will be described later) from the sound data SD described above. The contents of leading registers and buffers disposed in the creation processing work area GWE will be explained here with reference to FIG.  5 . Reference numeral R 1  denotes a present sampling register for cumulating the number of sampled waveforms read from waveform data. In this embodiment, a cycle, in which the 16 lower significant bits of the present sampling register R 1  are set to “0”, is timing at which music is caused to proceed. Reference numeral R 2  denotes a music performance present time register for holding a present music performance time. Reference numeral R 3  denotes a music performance calculated time register, and R 4  denotes a music performance data pointer for holding a pointer value indicating sound data SD that is being processed at present. 
   BUF denotes a waveform calculation buffer disposed to each of the sound generation channels. In this embodiment, since 16 sounds are generated at maximum, there are provided waveform calculation buffers ( 1 ) to ( 16 ). Each waveform calculation buffer BUF temporarily stores the respective values of a present waveform address, a waveform loop width, a waveform end address, a pitch register, a volume register, and a channel output register. What is intended by the respective values will be described when the operation of the creation processing is explained later. 
   An output register OR holds the result obtained by cumulating the values of the channel output registers of the waveform calculation buffers ( 1 ) to ( 16 ), that is, the result obtained by cumulating the music sound data created for each sound generation channel. The value of the output register OR is supplied to the DAC  7 . 
   (4) Operations: 
   Next, operations of the embodiment arranged as described above will be explained with reference to  FIGS. 6  to  15 . An operation of a main routine will be described first, and subsequently, operations of various types of processing called from the main routine will be described. 
   (a) Operation of Main Routine (Overall Operation): 
   When power is supplied to the embodiment arranged as described above, the CPU  3  loads a control program from the program ROM  4  and executes the main routine shown in  FIG. 6 , in which processing in step SA 1  is executed. In step SA 1 , initializing is executed to reset various registers and flags disposed in the work RAM  6  or to set initial values to them. 
   Subsequently, in step SA 2 , it is determined whether the conversion mode is selected or the creation mode is selected by the mode selection switch in the panel switch  1 . When the conversion mode is selected, the conversion processing is executed in step SA 3  so that the music performance data (MIDI data) of the SMF format is converted into the sound data SD. In contrast, when the creation mode is selected, the creation processing is executed in step SA 4 , thereby automatic musical performance is executed by creating music sound data based on the sound data SD. 
   (b) Operation of Conversion Processing: 
   Next, the operation of the conversion processing will be explained with reference to FIG.  7 . When the conversion mode is selected by manipulating the mode selection switch, CPU  3  goes to processing in step SB 1 , at which the conversion processing shown in  FIG. 7  is executed, through step SA 3 . In step SB 1 , time conversion processing is executed to convert the timing data Δt of a relative time format defined in the music performance data PD into an absolute time format in which the timing data is represented by an elapsed time from a start of music performance. 
   Subsequently, in step SB 2 , poly number restriction processing is executed to adapt the number of simultaneous sound generating channels (hereinafter, referred to as “poly number”) to the specification of the apparatus. Next, in step SB 3 , note conversion processing is executed to convert the music performance data PD into the sound data SD. 
   (1) Operation of Time Conversion Processing: 
   Next, the operation of the time conversion processing will be explained with reference to FIG.  8 . When the time conversion processing is executed through step SB 1  described above, the CPU  3  executes processing in step SC 1  shown in  FIG. 8  to reset address pointers AD 0  and AD 1  to zero. The address pointer AD 0  is a register that temporarily stores an address for reading out the timing data Δt from the music performance data PD stored in the music performance data area PDE of the work RAM  6  (refer to FIG.  3 ). In contrast, the address pointer AD 1  is a register that temporarily stores a write address used when the music performance data PD, in which the timing data Δt is converted from the relative time format into the absolute time format, is stored again in the music performance data area PDE of the work RAM  6 . 
   When the address pointers AD 0  and AD 1  are reset to zero, the CPU  3  executes processing in step SC 2  in which a register TIME is reset to zero. Subsequently, in step SC 3 , it is determined whether a type of data MEM [AD 0 ], which is read from the music performance data area PDE of the work RAM  6  according to the address pointer AD 0 , is the timing data Δt or an event EVT. 
   (a) When Data MEM [AD 0 ] is Timing Data Δt: 
   When the data MEM [AD 0 ] is read out just after the address pointer AD 0  is reset to zero, the timing data Δt, which is addressed at the leading end of the music performance data PD, is read out. Thus, the CPU  3  executes processing at SC 4  at which the read timing data Δt is added to the register TIME. 
   Next, in step SC 5 , the address pointer AD 0  is incremented and advanced. When the CPU  3  goes to step SC 6 , it is determined whether or not the END data is read out from the music performance data area PDE of the work RAM  6  according to the advanced address pointer AD 0 , that is, it is determined whether or not the end of an music piece is reached. When the end of the music piece is reached, the result of determination is “YES”, and this processing is finished. Otherwise, the result of determination is “NO”, and the CPU  3  returns to the processing in step SC 3  at which the type of read data is determined again. 
   In steps SC 3  to SC 6 , the timing data Δt is added to the register TIME each time it is read out from the music performance data area PDE of the work RAM  6  according to the advancement of the address pointer AD 0 . As a result, the value of the register TIME is converted into an elapsed time obtained by cumulating the timing data Δt of the relative time format representing the difference time to a previous event, that is, the value of the register TIME is converted into the absolute time format in which a music start point is set to “0”. 
   (b) When Data MEM [AD 0 ] is Event EVT: 
   When the data read out from the music performance data area PDE of the work RAM  6  according to the advancement of the address pointer AD 0  is the event EVT, the CPU  3  executes processing in step SC 7 . In step SC 7 , the read event EVT (MEM [AD 0 ]) is written to the music performance data area PDE of the work RAM  6  according to the address pointer AD 1 . 
   Next, in step SC 8 , the address pointer AD 1  is advanced, and, in subsequent step SC 9 , the timing value of the absolute time format stored in the register TIME is written to the music performance data area PDE of the work RAM  6  according to the advanced address pointer AD 1 . Then, in step SC 10 , after the address pointer AD 1  is further advanced, the CPU  3  executes the processing in step SC 5  described above. 
   As described above, when the event EVT is read out from the music performance data area PDE of the work RAM  6  according to the advancement of the address pointer in steps SC 7  to SC 10 , the event EVT is stored again in the music performance data area PDE of the work RAM  6  according to the address pointer AD 1 , and subsequently the timing value of the absolute time format stored in the register TIME is written to the music performance data area PDE of the work RAM  6  according to the advanced address pointer AD 1 . 
   As a result, the music performance data PD of the relative time format stored in the sequence of Δt→EVT→Δt→EVT . . . is converted into the music performance data PD of the absolute time format stored in the sequence of EVT→TIME→EVT→TIME . . . . 
   (2) Operation of Poly Number Restriction Processing: 
   Next, the operation of the poly number restriction processing will be explained with reference to FIG.  9 . When this processing is executed through step SB 2  described above (refer to FIG.  7 ), the CPU  3  executes processing in step SD 1  shown in FIG.  9 . In step SD 1 , after the address pointer AD 1  is reset to zero, a register M for counting a sound generation poly number is reset to zero in step SD 2 . In steps SD 3  and SD 4 , it is determined whether data MEM [AD 1 ] read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1  is a note-on event, a note-off event or an event other then the note-on/off events. 
   The Operation will be explained below as to each of the cases in which the data MEM [AD 1 ] read out according to the address pointer AD 1  is “the note-on event”, “the note-off event” and “the event other than the note-on/off events”. 
   (a) In the Case of Event Other than Note-On/Off Events 
   In this case, since any of the results of determination in steps SD 3  and SD 4  is “NO”, the CPU  3  goes to step SD 5 . In step SD 5 , the address pointer AD 1  is incremented and advanced. In step SD 6 , it is determined whether or not the data MEM [AD 1 ] read out from the music performance data area PDE of the work RAM  6  according to the advanced address pointer AD 0  is END data, that is, it is determined whether or not the end of music is reached. When the end of music is reached, the result of determination is “YES”, and the processing is finished. Otherwise, the result of determination is “NO”, and the CPU  3  returns to the processing in step SD 3  described above. 
   (b) In the Case of Note-On Event: 
   In this case, the result of determination in step SD 3  is “YES”, and the CPU  3  goes to step SD 7 . In step SD 7 , it is determined whether the value of the register M reaches a predetermined poly number, that is, whether or not an empty channel exists. Note that the term “predetermined empty channel” used here means the sound generation poly number (the number of simultaneously sound generating channels) specified in the automatic music performing apparatus. 
   When one or more empty channels exist, the result of determination is “NO, and the CPU  3  executes processing in step SD 8  in which the register M is incremented and advanced, and then the CPU  3  executes the processing in step SD 5  and the subsequent steps to thereby read out a next event EVT. 
   In contrast, when the value of the register M reaches the predetermined poly number and no empty channel exists, the result of determination is “YES”, and the CPU  3  goes to step SD 9 . In step SD 9 , the sound generation channel number included in the note-on event is stored in a register CH, and the note number included in the note-on event is stored in a register NOTE in subsequent step SD 10 . 
   When the sound generation channel number and the note number of the note-on event, to which sound generation cannot be assigned, are temporarily stored, the CPU  3  goes to step SD 11  at which a stop code is written to the data MEM [AD 1 ], which is read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1 , to indicate that the event is ineffective. 
   Next, in steps SD 12  to SD 17 , the sound generation channel number and the note number, which are temporarily stored in steps SD 9  and SD 10  and to which sound generation cannot be allocated, are referred to, and a note-off event corresponding to the note-on event is found from the music performance data area PDE of the work RAM  6 , and the stop code is written to the note-off event to indicate that the event is ineffective. 
   That is, an initial value “1” is set to a register m that holds a search point in step SD 12 , and it is determined in subsequent step SD 13  whether or not data MEM [AD 1 +1], which is read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1  to which the value of the register m (search pointer) is added, is a note-off event. 
   When the data MEM [AD 1 +1] is not the note-off event, the result of determination is “NO”, and the CPU  3  goes to step SD 14  at which the search pointer stored in the register m is advanced. Then, the CPU  3  returns to step SD 13  again at which it is determined whether or not the data MEM [AD 1 +m], which is read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1  to which the advanced search point is added, is a note-off event. 
   Then, when the data MEM [AD 1 +m] is the note-off event, the result of determination is “YES”, and the CPU  3  executes processing in step SD 15  in which it is determined whether or not the sound generation channel number included in the note-off event agrees with the sound generation channel number stored in the register CH. When they are not agree with each other, the result of determination is “NO”. Then, the CPU  3  executes processing in step SD 14  in which the search pointer is advanced, and then the CPU  3  returns to the processing in step SD 13 . 
   In contrast, when the sound generation channel number included in the note-off event agrees with the sound generation channel number stored in the register CH, the result of determination is “YES”, and the CPU  3  goes to step SD 16 . In step SD 16 , it is determined whether or not the note number included in the note-off event agrees with the note number stored in the register NOTE, that is, it is determined whether or not the note-off event is a note-off event corresponding to the note-on event to which sound generation cannot be assigned. 
   When the note-off event is not the note-off event corresponding to the note-on event to which the sound generation cannot be assigned, the result of determination is “NO”, and the CPU  3  executes the processing in step SD 14 . Otherwise, the result of determination is “YES”, and the CPU  3  goes to step SD 17 . In step SD 17 , the stop code is written to the data MEM [AD 1 +m], which is read from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1  to which the value of the register m (search pointer) is added to indicate that the event ineffective. 
   As described above, when the sound generation poly number defined by the music performance data PD exceeds the specification of the apparatus, the sound generation poly number can be restricted to a sound generation poly number that is in agreement with the specification of the apparatus because the note-on/off events in the music performance data PD, to which the sound generation cannot be assigned, are rewritten to the stop code which indicates that the events are ineffective. 
   (c) In the Case of Note-Off Event: 
   In this case, the result of determination in step SD 4  is “YES”, the CPU  3  goes to step SD 18  at which the sound generation poly number stored in the register M is decremented. Then, the CPU  3  goes to step SD 5  at which the address pointer AD 1  is incremented and advanced, and it is determined whether or not the end of music is reached in subsequent step SD 6 . When the end of music is reached, the result of determination is “YES”, and this routine is finished. When the end of music is not reached, the result of determination is “NO”, and the CPU  3  returns to the processing in step SD 3  described above. 
   (3) Operation of Sound Conversion Processing: 
   Next, an operation of sound conversion processing will be explained with reference to  FIGS. 10  to  12 . When this processing is executed through step SB 3  (refer to FIG.  7 ), the CPU  3  executes processing in step SE 1  shown in FIG.  10 . In step SE 1 , the address pointer AD 1  and an address pointer AD 2  are reset to zero. The address pointer AD 2  is a register for temporarily storing a write address when the sound data SD converted from the music performance data PD is stored in the conversion data area CDE of the work RAM  6 . 
   Subsequently, in steps SE 2  and SE 3 , registers TIME 1  and N and the register CH are reset to zero, respectively. Next, in step SE 4 , it is determined whether or not the data MEM [AD 1 ], which is read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1 , is an event EVT. 
   In the following description, the operation will explained as to a case in which the data MEM [AD 1 ] read out from the music performance data area PDE of the work RAM  6  is the event EVT and as to a case in which it is timing data TIME. 
   Note that the data MEM [AD 1 ], which is read out from the music performance data area PDE of the work RAM  6 , is music performance data PD that is converted into the absolute time format in the time conversion processing (refer to  FIG. 8 ) described above and stored again in the sequence of EVT→TIME→EVE→TIME . . . . 
   (a) In the Case of Timing Data TIME: 
   When the timing data TIME represented by the absolute time format is read out, the result of determination in step SE 4  is “NO”, and the CPU  3  goes to step SE 11  at which the address pointer AD 1  is incremented and advanced. In step SE 12 , it is determined whether or not the data MEM [AD 1 ], which is read out from the music performance data area PDE of the work RAM  6  according to the advanced address pointer AD 1 , is the END data representing the end of music. When the end of music is reached, the result of determination is “YES” and the processing is finished. When, however, the end of music is not reached, the result of determination is “NO”, and the CPU  3  returns to the processing in step SE 4  described above. 
   (b) In the Case of Event EVT: 
   When the event EVT is read out, processing will be executed according to the type of event. In the following description, the respective operations of cases in which the event EVT is “a volume event”, “a tone event”, “a note-on event” and “a note-off event” will be explained. 
   a. In the Case of Volume Event: 
   When the data MEM [AD 1 ], which is read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1 , is a volume event, the result of determination in step SE 5  is “YES”, and the CPU  3  executes processing at step SE 6 . In step SE 6 , the sound generation channel number included in the volume event is stored in the register CH, the volume data stored in the volume event is stored in a volume data register [CH] in subsequent step SE 7 , and then the CPU  3  executes the processing in step SE 11  described above. 
   Note that the volume data register [CH] referred to here indicates a register corresponding to the sound generation channel number stored in the register CH of the volume data registers ( 1 ) to (n) disposed in the volume data area VDE of the work RAM  6  (refer to FIG.  4 ). 
   b. In the Case of Tone Color Event: 
   When the data MEM [AD 1 ], which is read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1 , is the tone event, the result of determination in step SE 8  is “YES”, and the CPU  3  executes processing at the SE 9 . In step SE 9 , the sound generation channel number included in the tone color event is stored in the register CH, the tone color data (waveform parameter number WPN) included in the tone color event is stored in a tone color data register [CH] in subsequent step SE 10 , and then the CPU  3  executes the processing in step SE  11  described above. 
   Note that the tone color data register [CH] referred to here indicates a register corresponding to the sound generation channel number stored in the register CH of the tone color data registers ( 1 ) to (n) disposed in the tone color data area TDE of the work RAM  6  (refer to FIG.  4 ). 
   c. In the Case of Note-On Event: 
   When the data MEM [AD 1 ], which is read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1 , is the note-on event, the result of determination in step SE 13  shown in  FIG. 11  is “YES”, and the CPU  3  executes processing in step SE 14 . In steps SE 14  to SE 16 , an empty channel to which no sound generation is assigned is searched. 
   That is, after an initial value “1” is stored in a pointer register n for searching the empty channel in step SE 14 , the CPU  3  goes to step SE 15 , at which it is determined whether or not a note register NOTE [n] corresponding to the pointer register n is the empty channel to which no sound generation is assigned. 
   When the note register NOTE [n] is not the empty channel, the result of determination is “NO”, the point register n is advanced, and the CPU  3  is returned to the processing in step S 15  at which it is determined whether or not the note register NOTE [n] corresponding to the advanced point register n is the empty channel. 
   As described above, when the empty channel is searched according to the advance of the point register n and the empty channel is found, the result of determination in step S 15  is “YES”, and the CPU  3  executes processing in step SE 17 . In step SE 17 , the note number and the sound generation channel number included in the note-on event is stored in the note register NOTE [n] of the empty channel. Next, in step SE 18 , a sound generation pitch PIT corresponding to the note number stored in the note register NOTE [n] is created. The sound pitch PIT referred to here is a frequency number showing a phase when waveform data is read out from the waveform data area WDA of the data ROM  5  (refer to FIG.  2 ). 
   When the CPU  3  goes to step SE 19 , the sound generation channel number is stored in the register CH, and tone color data (waveform parameter number WPN) is read out from the tone color data register [CH] corresponding to the sound generation channel number stored in the register CH in subsequent step SE 20 . In step SE 21 , a sound generation volume VOL is calculated by multiplying the volume data read out from the volume data register [CH] by the velocity included in the note-on event. 
   Next, the CPU  3  goes to step SE 22  at which data MEM [AD 2 +1], which is read out from the music performance data area PDE of the work RAM  6  according to an address pointer AD 2 +1, that is, a timing value of the absolute time format is stored in a register TIME 2 . Subsequently, in step SE 23 , the difference time Δt is generated by subtracting the value of the register TIME 1  from the value of the register TIME 2 . 
   As described above, when the sound generation channel number CH, the difference time Δt, the sound generation volume VOL, the waveform parameter number WPN, and the sound pitch PIT are obtained from the note-on event through steps SE 18  to SE 23 , the CPU  3  goes to step SE 24  at which they are stored as sound data SD (refer to  FIG. 4 ) in the conversion data area CDE of the work RAM  6  according to the address pointer AD 2 . 
   In step SE 25 , to calculate a relative time to a next note event, the value of the register TIME 2  is stored in the register TIME 1 , the address pointer AD 2  is advanced in subsequent step SE 26 , and then the CPU  3  returns to the processing in step SE  11  described above (refer to FIG.  10 ). 
   d. In the Case of Note-Off Event: 
   When the data MEM [AD 1 ], which is read out from the music performance data area PDE of the work RAM  6  according to the address pointer AD 1 , is the note-off event, the result of determination in step SE 27  shown in  FIG. 12  is “YES”, and the CPU  3  executes processing in step SE 28 . In step SE 28 , the sound generation channel number of the note-off event is stored in the register CH, and a note-turned-off note number is stored in a register NOTE in subsequent step SE 29 . 
   In steps SE 30  to SE 35 , a note register NOTE, in which the sound generation channel number and the note number that correspond to the note-off are temporarily stored, is searched from note registers NOTE [ 1 ] to [ 16 ] for 16 sound generation channels, and the note register NOTE found is set as an empty channel. 
   That is, after an initial value “1” is stored in a pointer register m in step  30 , the CPU  3  goes to step SE 31  at which it is determined whether or not the sound generation channel number stored in the note register NOTE [m] corresponding to the pointer register m agrees with the sound generation channel number stored in the register CH. When they do not agree with each other, the result of determination is “NO”, and the CPU  3  goes to step SE 34  at which the pointer register m is incremented and advanced. Next, in step SE 35 , it is determined whether or not the value of the advanced pointer register m exceeds “16”, that is, it is determined whether or not all the note registers NOTE [ 1 ] to [ 16 ] have been searched. 
   When they have not been searched, the result of determination is “NO”, and the CPU  3  returns to the processing in step SE 31  described above. In step SE 31 , it is determined again whether or not the sound generation channel number of the note register NOTE [m] agrees with the sound generation channel number of the register CH according to the value of the advanced pointer register m. When they agree with each other, the result of determination is “YES”, and the CPU  3  goes to next step SE 32  at which it is determined whether or not the note number stored in the note register NOTE [m] agrees with the note number stored in the register NOTE. When they do not agree with each other, the result of determination is “NO”, the CPU  3  executes the processing in step SE 34  described above at which the pointer register m is advanced again, and then the CPU  3  returns to the processing in step SE 31 . 
   When the note register NOTE [m], in which the sound generation channel number and the note number that correspond to the note-off are stored, is found according to the advance of the pointer register m, the results of determination in steps SE 31  and SE 32  are “YES”, and the CPU  3  goes to step SE 33  at which the note register NOTE [m] found is set as the empty channel and returns to the processing in step SE 11  described above (refer to FIG.  10 ). 
   (c) Operation of Creation Processing: 
   Next, the operation of the creation processing will be explained with reference to  FIGS. 13  to  15 . When the creation mode is selected by manipulating the mode selection switch, the CPU  3  executes the creation processing shown in FIG.  13  through step SA 4  described above (refer to  FIG. 6 ) and executes processing in step SF 1 . In step SF 1 , initializing is executed to reset the various registers and the flags disposed in the work RAM  6  or to set initial values to them. Next, in step SF 2 , the present sampling register R 1  for cumulating the number of sampled waveforms is incremented, and it is determined in subsequent step SF 3  whether or not the lower significant 16 bits of the advanced present sampling register R 1  is “0”, that is, it is determined whether or not the operation is at the music performance proceeding timing. 
   When the operation is at the music performance proceeding timing, the result of determination is “YES”, and the CPU  3  goes to next step SF 4 , at which the music performance present time register R 2  for holding a present music performance time is incremented, and goes to step SF 5 . 
   In contrast, when the lower significant 16 bits are not at the music proceeding timing, the result of determination in step SF 3  is “NO”, and the CPU  3  goes to step SF 5 . In step SF 5 , it is determined whether or not the value of the music performance present time register R 2  is larger than the value of the music performance calculated time register R 3 , that is, it is determined whether or not the value of the music performance present time register R 2  is at timing when a music performance calculation is executed to replay next sound data SD. 
   When the music performance calculation is already executed, the result of determination is “NO”, and the CPU  3  executes processing in step SF 13  (refer to  FIG. 14 ) that will be described later. When, however, the value of the music performance present time register R 2  is at the timing when the music performance calculation is executed, the result of determination is “YES”, and the CPU  3  executes processing in step SF 6 . 
   In step SF 6 , sound data SD is designated from the conversion data area CDE of the work RAM  6  according to the music performance data pointer R 4 . Next, when the sound generation channel number of the designated sound data SD is denoted by n, the sound generation pitch PIT and the sound generation volume VOL of the sound data SD are set to the pitch register and the volume register in a waveform calculation buffer (n) disposed in the creation processing work area GWE of the work RAM  6 , respectively in step SF 7 . 
   Subsequently, in step SF 8 , the waveform parameter number WPN of the designated sound data SD is read out. In step SF 9 , a corresponding waveform parameter (waveform start address, waveform loop width, and waveform end address) is stored in the waveform calculation buffer (n) from the data ROM  5  based on the read waveform parameter number WPN. 
   Next, in step SF 10  shown in  FIG. 14 , the difference time Δt of the designated sound data SD is read out, and the read difference time Δt is added to the music performance calculated time register R 3  in subsequent step SF 11 . 
   When preparation for replaying the designated sound data SD is finished as described above, the CPU  3  executes processing in step SF 12  in which the music performance data pointer R 4  is incremented. In steps SF 13  to SF 17 , waveforms are created for respective sound generation channels according to the waveform parameters, the sound generation volumes, and the sound generation pitches that are stored in the waveform calculation buffers ( 1 ) to ( 16 ), respectively, and music sound data corresponding to the sound data SD is generated by cumulating the waveforms. 
   That is, in steps SF 13  and SF 14 , an initial value “1” is set to a pointer register N, and the content of the output register OR is reset to zero. In step SF 15 , buffer calculation processing for creating music sound data for the respective sound generation channels is executed based on the waveform parameters, the sound generation volumes, and the sound generation pitches that are stored in the waveform calculation buffers ( 1 ) to ( 16 ). 
   When the buffer calculation processing is executed, the CPU  3  executes processing in step SF 15 - 1  shown in  FIG. 15  in which the value of the pitch register in the waveform calculation buffer (N) corresponding to the pointer register N is added to the present waveform address of the waveform calculation buffer (N). Next, the CPU  3  goes to step SF 15 - 2  at which it is determined whether or not the present waveform address, to which the value of the pitch register is added, exceeds the waveform end address. When the present waveform address does not exceed the waveform end address, the result of determination is “NO”, and the CPU  3  goes to step SF 15 - 4 . Whereas, when the present waveform address exceeds the waveform end address, the result of determination is “YES”, and the CPU  3  goes to next step SF 15 - 3 . 
   In step SF 15 - 3 , a result obtained by subtracting the waveform loop width from the present waveform address is set to a new present address waveform address. When the CPU  3  goes to step SF 15 - 4 , the waveform data of a tone color designated by the waveform parameter is read out from the data ROM  5  according to the present waveform address. 
   Next, in step SF 15 - 5 , music sound data is created by multiplying the read waveform data by the value of the volume register. Subsequently, in step SF 15 - 6 , the music sound data is stored in the channel output register of the waveform calculation buffer (N). Thereafter, the CPU  3  goes to step SF 15 - 7  at which the music sound data stored in the channel output register is added to an output register OB. 
   When the buffer calculation processing is finished as described above, the CPU  3  executes processing in step SF 16  shown in  FIG. 14  in which the pointer register N is incremented and advanced, and it is determined whether or not the advanced pointer register N exceeds “16”, that is, it is determined whether or not the music sound data has been created as to all the sound generation channels in subsequent step SF 17 . When the music sound data is still being created, the result of determination is “NO”, and the CPU  3  returns to the processing in step SF 15 , and repeats the processing in step SF 15  to SF 17  until the music sound data has been created for all the sound generation channels. 
   When the music sound data has been created for all the sound generation channels, the result of determination in step SF 17  is “YES”, and the CPU  3  goes to step SF 18 . In step SF 18 , the content of the output register OR, which cumulates the music sound data of the respective sound generation channels in the buffer calculation processing (refer to  FIG. 15 ) described above and holds the cumulated music sound data, is output to the DAC  7 . Thereafter, the CPU  3  returns to the processing in step SF 2  (refer to  FIG. 13 ) described above. 
   As described above, in the creation processing, the music performance present time register R is advanced each music procession timing, and when the value of the music performance present time register R 2  is larger than the value of the music performance calculated time register R 3 , that is, when timing, at which a music performance calculation is executed to replay the sound data SD, is reached, automatic music performance is caused to proceed by creating music sound data according to the sound data SD designated by the music performance data pointer R 4 . 
   As described above, according to this embodiment, automatic music performance is executed by converting the music performance data PD of the SMF format into the sound data SD by the CPU  3  and by generating music sound data corresponding to the converted sound data SD. Therefore, the automatic music performance can be executed according to the music performance data of the SMF format without a dedicated sound source for interpreting and executing the music performance data PD of the SMF format. 
   It should be noted that, in the embodiment described above, after the music performance data PD of the SMF format supplied externally is stored once in the music performance data area PDE of the work RAM  6 , the music performance data PD read out from the music performance data area PDE is converted into the sound data SD, and the automatic music performance is executed according to the sound data SD. However, the embodiment is not limited thereto, and the sound data SD may be read out while converting the music performance data PD of the SMF format supplied from a MIDI interface into the sound data SD in real time. With this arrangement, it is also possible to realize a MIDI musical instrument without a dedicated sound source.