1. An automatic music composing apparatus comprising: a storage device which stores a plurality of musical piece generation data sets, each set including a reference characteristics data set which represents melody characteristics specifying a reference melody fragment and a melody generation data set which contains 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 characteristics 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; an analyzer which analyzes said supplied melody data to determine melody characteristics of said desired melody fragment and creates characteristics data representing melody characteristics of said desired melody fragment; a detector which compares the characteristics data created by said analyzer with the reference characteristics data sets stored in said storage device and detects a reference characteristics data set which is equal or similar to said created characteristics data in terms of melody characteristics; 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 characteristics 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.