During the development of music,computer technology has played an important role.It is computer technology that digitizes music so that music can spread throughout the world and into thousands of households.With the rapid development of computer science,artificial intelligence algorithms have been applied in various scenarios in life.However,the application of intelligence algorithms in music is slightly thin.Because the structure of the music is more complex than the common text,and the artistry behind music is more difficult to quantify,it is difficult for the algorithm to understand.The lyrics and the main melody are the two most important elements in music.The lyrics generation task is mainly regarded as a real-life application of the natural language generation task,which has strong practical significance.The lyrics and the main melody in the song are often strongly related.There are often occasions that lyrics are created firstly,and its corresponding melody is composed secondly in the real life.If the artificial intelligence algorithm can compose melody based on given lyrics,it will make help and inspiration for music lovers.Therefore,this paper conducts researches on the lyrics generation task and the melody generation task.The main research work and contribution of this paper are as follows:(1)This paper proposes a text generation algorithm REGAN based on the combination of generative adversarial networks and evolutionary computation.We use the relational memory core containing self-attention mechanism as a generator,which can better model the memory of the time domain in text data.The idea of evolutionary computing actively explores strategies more suitable for the generator,so as to grasp the trade-off between generation quality and diversity,and alleviate the mode collapse problem.Experiments on both English and Chinese corpus prove that algorithms can achieve high-quality and relatively high diversity.Subsequently,this algorithm is applied into the lyrics generation task,and the model is improved as REGAN-lyrics according to the characteristics of the lyric task,making it more suitable for the lyrics generation scene.Experiments on lyrics prove its effectiveness.(2)This paper proposes a lyrics-conditional melody generation algorithm RCGAN based on conditional generative adversarial networks.The algorithm takes the word embedding of lyrics as the input condition,and makes the generator to generate the corresponding melody.The discriminator judges both the musicality of generated melody and the correspondence between lyrics and melody.The result of discriminator will be transferred back to generator for guiding.Subsequently,experiments based on real music corpora are conducted.Results are analyzed from multiple points of view: automatic evaluation indicators,descriptive statistical indicators and Music-BLEU,which is defined based on music theory rules by us.It is proved that compared with the baseline model,the proposed algorithm can generate the music melody data with the best comprehensive effect. |