Automatic Melody Composition Using Enhanced GAN
Abstract
:1. Introduction
- This research utilizes bars to compose melody instead of notes so that the system can more accurately learn the complex and varied melody features of music.
- To ensure the rationality of the internal construction of the high dimensional matrix that represented the features of the bar, a CNN-based discriminator is utilized.
- When evaluating the quality of the composed melody, pitch is selected as a feature; by using the TFIDF algorithm to compare the composed melody with the real melody, the melody composed with the proposed method was proven to be more similar to the real melody.
2. Related Literature
2.1. Deep-Learning-Based Music Composition Methods
2.2. Comparison of Deep Learning-Based Music Generation Methods
3. Enhanced GAN-Based Melody Composition System
3.1. The Generator
3.2. The Two Discriminators
3.3. Model Training
Algorithm 1. Enhanced GAN model training algorithm. |
FUNCTION BackPropagation(, ) BEGIN Initialize generator , discriminator , discriminator Initialize FOR ←1 to SIZE(number of iterations) FOR ←1 to SIZE(number of batchsize) from update by (, ) update by (, ) update by (, , ) END FOR END FOR END |
4. Experiments and Results
4.1. Experimental Objectives
4.2. Experimental Environment
4.3. Experimental Data
4.4. Experimental Results
5. Discussion
5.1. Loss Analysis of the Enhanced GAN Model
5.2. Analysis of TFIDF-Based MIDI File Quality Verification
6. Conclusions
Author Contributions
Acknowledgments
Conflicts of Interest
References
- Cope, D. Experiments in musical intelligence (EMI): Non-Linear linguistic-based composition. J. New Music Res. 1989, 18, 117–139. [Google Scholar] [CrossRef]
- Sandred, O.; Laurson, M.; Kuuskankare, M. Revisiting the Illiac Suite—A rule-Based approach to stochastic processes. Sonic Ideas/Ideas Sonicas 2009, 2, 42–46. [Google Scholar]
- Magenta. Available online: https://magenta.tensorflow.org (accessed on 22 July 2019).
- DeepJazz. Available online: https://deepjazz.io (accessed on 22 July 2019).
- BachBot. Available online: https://bachbot.com (accessed on 22 July 2019).
- FlowMachines. Available online: https://www.flow-machines.com (accessed on 22 July 2019).
- WaveNet. Available online: https://deepmind.com (accessed on 22 July 2019).
- Mozer, M.C. Neural network music composition by prediction: Exploring the benefits of psychoacoustic constraints and multi-Scale processing. Connect. Sci. 1994, 6, 247–280. [Google Scholar] [CrossRef]
- Hadjeres, G.; Pachet, F.; Nielsen, F. Deepbach: A steerable model for bach chorales generation. In Proceedings of the 34th International Conference on Machine Learning, Sydney, Australia, 6–11 August 2017; pp. 1362–1371. [Google Scholar]
- Chu, H.; Urtasun, R.; Fidler, S. Song from PI: A musically plausible network for pop music generation. ICLR 2017. under review. [Google Scholar]
- Mogren, O. C-RNN-GAN: Continuous recurrent neural networks with adversarial training. Constructive Mach. Learn. Workshop 2016. accepted. [Google Scholar]
- Pedro, J.; De León, P.; Pérez-Sancho, C.; Inesta, J.M. A shallow description framework for musical style recognition. In Proceedings of the Joint IAPR International Workshops on Statistical Techniques in Pattern Recognition (SPR) and Structural and Syntactic Pattern Recognition (SSPR), Lisbon, Portugal, 18–20 August 2004; pp. 876–884. [Google Scholar]
- Briot, J.P.; Hadjeres, G.; Pachet, F. Deep learning techniques for music generation-a survey. arXiv 2017, arXiv:1709.01620. [Google Scholar]
- Yang, L.C.; Chou, S.Y.; Yang, Y.H. MidiNet: A convolutional generative adversarial network for symbolic-Domain music generation. In Proceedings of the 2017 International Society of Music Information Retrieval Conference (ISMIR), Suzhou, China, 24–27 October 2017. [Google Scholar]
- Dong, H.W.; Hsiao, W.Y.; Yang, L.C.; Yang, Y.H. MuseGAN: Multi-Track sequential generative adversarial networks for symbolic music generation and accompaniment. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018; pp. 34–41. [Google Scholar]
- Trieu, N.; Keller, R.M. JazzGAN: Improvising with Generative Adversarial Networks. In Proceedings of the 6th International Workshop on Musical Metacreation (MUME), Salamanca, Spain, 25–26 June 2018. [Google Scholar]
- Trstenjak, B.; Mikac, S.; Donko, D. KNN with TF-IDF based framework for text categorization. Procedia Eng. 2014, 69, 1356–1364. [Google Scholar] [CrossRef]
CONCERT | Deep Bach | Song from PI | C-RNN-GAN | MidiNet | Muse GAN | Proposed Method | |
---|---|---|---|---|---|---|---|
Model | - | - | - | GAN | Conditional GAN | GAN | GAN |
Neural Network | RNN | LSTM | LSTM | LTSM; Bi-LSTM | CNN | CNN | LSTM; Bi-LSTM; CNN |
Parameter Name | Proposed | C-RNN-GAN |
---|---|---|
keep_prob | 0.5 | 0.5 |
batch_size | 20 | 20 |
pretraining_epochs | 5 | 5 |
learning_rate | 0.1 | 0.1 |
songlength | 4 | 16 |
hidden_size_g | 100 | 100 |
hidden_size_d | - | 100 |
hidden_size_d_rnn | 100 | - |
kernal_size_d_cnn | 5 | - |
Proposed Model | C-RNN-GAN | |
---|---|---|
Epoch | 150 | 150 |
Training Time | 45 min | 270 min |
Loss of Generator | 2.699 | 15.714 |
Loss of Discriminator | 1.570 | 4.617 |
Index | Random | C-RNN-GAN | Proposed System | Real |
---|---|---|---|---|
Average | 1.569 | 0.099 | 0.049 | 0.053 |
STD | 1.500 | 0.083 | 0.007 | 0.015 |
© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, S.; Jang, S.; Sung, Y. Automatic Melody Composition Using Enhanced GAN. Mathematics 2019, 7, 883. https://doi.org/10.3390/math7100883
Li S, Jang S, Sung Y. Automatic Melody Composition Using Enhanced GAN. Mathematics. 2019; 7(10):883. https://doi.org/10.3390/math7100883
Chicago/Turabian StyleLi, Shuyu, Sejun Jang, and Yunsick Sung. 2019. "Automatic Melody Composition Using Enhanced GAN" Mathematics 7, no. 10: 883. https://doi.org/10.3390/math7100883
APA StyleLi, S., Jang, S., & Sung, Y. (2019). Automatic Melody Composition Using Enhanced GAN. Mathematics, 7(10), 883. https://doi.org/10.3390/math7100883