Machine learning has shown a successful component of methods for automatic music composition. Considering music as a sequence of events with multiple complex dependencies on various levels of a composition, the long short-term memory-based (LSTM) architectures have been proven to be very efficient in learning and reproducing musical styles. The “rampant force” of these architectures, however, makes them hardly useful for tasks that incorporate human input or generally constraints. Such an example is the generation of drums’ rhythms under a given metric structure (potentially combining different time signatures), with a given instrumentation (e.g. bass and guitar notes). This paper presents a solution that harnesses the LSTM sequence learner with a feed-forward (FF) part which is called the “Conditional Layer”. The LSTM and the FF layers influence (are merged into) a single layer making the final decision about the next drums’ event, given previous events (LSTM layer) and current constraints (FF layer). The resulting architecture is called the conditional neural sequence learner (CNSL). Results on drums’ rhythm sequences are presented indicating that the CNSL architecture is effective in producing drums’ sequences that resemble a learnt style, while at the same time conform to given constraints; impressively, the CNSL is able to compose drums’ rhythms in time signatures it has not encountered during training (e.g. 17/16), which resemble the characteristics of the rhythms in the original data.
This is a preview of subscription content, access via your institution.
Buy single article
Instant access to the full article PDF.
Tax calculation will be finalised during checkout.
Panel Discussion in the ICMC ’93.
Papadopoulos and Wiggins  collected an extensive such use list, dating back to 1992.
Features are not extracted from the entire piece to make sure that the results are not influenced by the length of the pieces; longer pieces move further away from the seed sentence, potentially accumulating more errors during their life-span.
Abadi M, Barham P, Chen J, Chen Z, Davis A, Dean J, Devin M, Ghemawat S, Irving G, Isard M (2016) Tensorflow: a system for large-scale machine learning. OSDI 16:265–283
Allan M, Williams C (2005) Harmonising chorales by probabilistic inference. In: Advances in neural information processing systems, pp 25–32
Briot JP, Hadjeres G, Pachet F (2017) Deep learning techniques for music generation—a survey. arXiv preprint arXiv:1709.01620
Cardoso A, Veale T, Wiggins GA (2009) Converging on the divergent: the history (and future) of the international joint workshops in computational creativity. AI Mag 30(3):15
Choi K, Fazekas G, Sandler M (2016) Text-based LSTM networks for automatic music composition. arXiv preprint arXiv:1604.05358
Chollet F et al (2015) Keras
Cunha US, Ramalho G (1999) An intelligent hybrid model for chord prediction. Organ Sound 4(2):115–119
Deliège I, Wiggins GA (2006) Musical creativity: multidisciplinary research in theory and practice. Psychology Press, London
Eck D, Schmidhuber J. (2002). A first look at music composition using LSTM recurrent neural networks. Istituto Dalle Molle Di Studi Sull Intelligenza Artificiale, vol 103
Edwards M (2011) Algorithmic composition: computational thinking in music. Commun ACM 54(7):58–67
Fernández JD, Vico F (2013) AI methods in algorithmic composition: a comprehensive survey. J Artif Intell Res 48:513–582
Hadjeres G, Pachet F (2016) Deepbach: a steerable model for Bach Chorales generation. arXiv preprint arXiv:1612.01010
Hild H, Feulner J, Menzel W (1992) Harmonet: a neural net for harmonizing Chorales in the style of J. S. Bach. In: Advances in neural information processing systems, pp 267–274
Hiller LA, Isaacson LM (1959) Experimental music; composition with an electronic computer. McGraw-Hill, London
Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780
Hutchings P (2017) Talking drums: generating drum grooves with neural networks. arXiv preprint arXiv:1706.09558
Jacob BL (1996) Algorithmic composition as a model of creativity. Organ Sound 1(03):157–165
Kaliakatsos-Papakostas M (2018) Generating drum rhythms through data-driven conceptual blending of features and genetic algorithms. In: International conference on computational intelligence in music, sound, art and design. Springer, Berlin, pp 145–160
Kaliakatsos-Papakostas M, Floros A, Vrahatis MN (2013) Evodrummer: deriving rhythmic patterns through interactive genetic algorithms. In: International conference on evolutionary and biologically inspired music and art. Springer, Berlin, pp 25–36
Kalingeri V, Grandhe S (2016) Music generation with deep learning. arXiv preprint arXiv:1612.04928
Kingma DP, Ba J (2014) Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980
Leach J, Fitch J (1995) Nature, music, and algorithmic composition. Comput Music J 19(2):23–33
Lewis J (1989) Algorithms for music composition by neural nets: improved CBR paradigms. Michigan Publishing, University of Michigan Library, Ann Arbor
Liang F (2016) Bachbot: automatic composition in the style of Bach Chorales. PhD thesis, Masters thesis, University of Cambridge
Makris D, Kaliakatsos-Papakostas M, Karydis I, Kermanidis KL (2017) Combining LSTM and feed forward neural networks for conditional rhythm composition. In: International conference on engineering applications of neural networks. Springer, Berlin, pp 570–582
Merker BH (2006) Layered constraints on the multiple creativities of music. In: Musical creativity: multidisciplinary research in theory and practice, pp 25–41
Mozer MC (1999) Neural network music composition by prediction: exploring the benefits of psychoacoustic constraints and multiscale processing. In: Musical networks: parallel distributed perception and performance, vol 227
Nierhaus G (2009) Algorithmic composition: paradigms of automated music generation. Springer, Berlin
Pachet F, Roy P (2001) Musical harmonization with constraints: a survey. Constraints 6(1):7–19
Palmer C, Krumhansl CL (1990) Mental representations for musical meter. J Exp Psychol Hum Percept Perform 16(4):728–741
Papadopoulos G, Wiggins G (1999) AI methods for algorithmic composition: a survey, a critical view and future prospects. In: AISB symposium on musical creativity. Edinburgh, UK, pp 110–117
Sioros G, Guedes C (2011) Complexity driven recombination of midi loops. In: Proceedings of the 12th international society for music information retrieval conference (ISMIR). University of Miami, Miami, USA, pp 381–386
Sturm B, Santos JaF, Korshunova I (2015) Folk music style modelling by recurrent neural networks with long short term memory units. In: 16th international society for music information retrieval conference (ISMIR)
Supper M (2001) A few remarks on algorithmic composition. Comput Music J 25(1):48–53
Wiggins GA, Pearce MT, Müllensiefen D et al (2009) Computational modeling of music cognition and musical creativity. Oxford University Press, Oxford
Zaremba W, Sutskever I, Vinyals O (2014) Recurrent neural network regularization. arXiv preprint arXiv:1409.2329
Conflict of interest
The authors declare that they have no conflict of interest.
This research has been financially supported by General Secretariat for Research and Technology (GSRT) and the Hellenic Foundation for Research and Innovation (HFRI) (Scholarship Code: 953).
About this article
Cite this article
Makris, D., Kaliakatsos-Papakostas, M., Karydis, I. et al. Conditional neural sequence learners for generating drums’ rhythms. Neural Comput & Applic 31, 1793–1804 (2019). https://doi.org/10.1007/s00521-018-3708-6
- Neural networks
- Deep learning
- Rhythm composition
- Music information research