6. An automatic music composing apparatus according to claim 5, wherein said melody generation data set includes either of or both of: a melody characteristics data set defining melody characteristics which specifies an amount of melody for generating a melody to constitute a musical piece, and a melody data set specifying an amount of melody for generating a melody to constitute a musical piece.
5. An automatic music composing apparatus comprising: a storage device which stores a plurality of musical piece generation data sets, each set including a reference melody data set which specifies a reference melody fragment and a melody generation data set which contains a melody specifying data of an amount for a piece of music so as to be used for generating a melody to constitute a musical piece, said reference melody data set included in each said musical piece generation data set typifying said melody generation data set included in said same musical piece generation data set; a supply device for supplying melody data which defines a desired melody fragment; a detector which compares the melody data supplied by said supply device with the reference melody data sets stored in said storage device and detects reference melody data which is equal or similar to said supplied melody data; a read out device which reads out from said storage device a melody generation data set included in the musical piece generation data set of which the reference melody data set is detected by said detector; and a melody generator which generates melody data representing a musical piece based on the melody generation data set as read out from said storage device.