Approachable Music Composition with Machine Learning at Scale

To make music composition more approachable, we designed the first AI-powered Google Doodle, the Bach Doodle, where users can create their own melody and have it harmonized by a machine learning model Coconet (Huang et al., 2017) in the style of Bach. For users to input melodies, we designed a simplified sheet-music based interface. To support an interactive experience at scale, we re-implemented Coconet in TensorFlow.js (Smilkov et al., 2019) to run in the browser and reduced its runtime from 40s to 2s by adopting dilated depth-wise separable convolutions and fusing operations. We also reduced the model download size to approximately 400KB through post-training weight quantization. We calibrated a speed test based on partial model evaluation time to determine if the harmonization request should be performed locally or sent to remote TPU servers. In three days, people spent 350 years worth of time playing with the Bach Doodle, and Coconet received more than 55 million queries. Users could choose to rate their compositions and contribute them to a public dataset, which we are releasing with this paper. We hope that the community finds this dataset useful for applications ranging from ethnomusicological studies, to music education, to improving machine learning models.

[1]  Gaëtan Hadjeres,et al.  Deep Learning Techniques for Music Generation - A Survey , 2017, ArXiv.

[2]  Kratarth Goel,et al.  Polyphonic Music Generation by Modeling Temporal Dependencies Using a RNN-DBN , 2014, ICANN.

[3]  Perry R. Cook,et al.  Real-time human interaction with supervised learning algorithms for music composition and performance , 2011 .

[4]  M. Casey,et al.  Computers and Musical Style , 1993 .

[5]  Darrell Conklin,et al.  Parallel successions of perfect fifths in the Bach chorales , 2008 .

[6]  Christopher Ariza,et al.  Music21: A Toolkit for Computer-Aided Musicology and Symbolic Music Data , 2010, ISMIR.

[7]  Christopher K. I. Williams,et al.  Harmonising Chorales by Probabilistic Inference , 2004, NIPS.

[8]  Li Yao,et al.  On the Equivalence between Deep NADE and Generative Stochastic Networks , 2014, ECML/PKDD.

[9]  Ching-Hua Chuan,et al.  A Functional Taxonomy of Music Generation Systems , 2017, ACM Comput. Surv..

[10]  Elaine Chew,et al.  A Hybrid System for Automatic Generation of Style-Specific A ccompaniment , 2007 .

[11]  Jose David Fernández-Rodríguez,et al.  AI Methods in Algorithmic Composition: A Comprehensive Survey , 2013 .

[12]  Richard E. Turner,et al.  Sequence Tutor: Conservative Fine-Tuning of Sequence Generation Models with KL-control , 2016, ICML.

[13]  Gaëtan Hadjeres,et al.  Style Imitation and Chord Invention in Polyphonic Music with Exponential Families , 2016, ArXiv.

[14]  Frank Nielsen,et al.  DeepBach: a Steerable Model for Bach Chorales Generation , 2016, ICML.

[15]  Curtis Hawthorne,et al.  Magenta.js: A JavaScript API for Augmenting Creativity with Deep Learning , 2018 .

[16]  François Pachet,et al.  Musical Harmonization with Constraints: A Survey , 2004, Constraints.

[17]  Martin Wattenberg,et al.  TensorFlow.js: Machine Learning for the Web and Beyond , 2019, MLSys.

[18]  Dan Morris,et al.  MySong: automatic accompaniment generation for vocal melodies , 2008, CHI.

[19]  Arne Eigenfeldt,et al.  An Introduction to Musical Metacreation , 2016, CIE.

[20]  François Pachet,et al.  The Continuator: Musical Interaction With Style , 2003, ICMC.

[21]  Douglas Eck,et al.  Counterpoint by Convolution , 2019, ISMIR.

[22]  Hugo Larochelle,et al.  A Deep and Tractable Density Estimator , 2013, ICML.

[23]  Yoshua Bengio,et al.  Modeling Temporal Dependencies in High-Dimensional Sequences: Application to Polyphonic Music Generation and Transcription , 2012, ICML.

[24]  Heiga Zen,et al.  WaveNet: A Generative Model for Raw Audio , 2016, SSW.

[25]  François Chollet,et al.  Xception: Deep Learning with Depthwise Separable Convolutions , 2016, 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[26]  Kenneth Sörensen,et al.  Composing fifth species counterpoint music with a variable neighborhood search algorithm , 2013, Expert Syst. Appl..

[27]  Bernd Schöner,et al.  Analysis and Synthesis of Palestrina-Style Counterpoint Using Markov Chains , 2001, ICMC.

[28]  Kevin Jennings,et al.  Hyperscore: a graphical sketchpad for novice composers , 2004, IEEE Computer Graphics and Applications.

[29]  Shlomo Dubnov,et al.  OMax brothers: a dynamic yopology of agents for improvization learning , 2006, AMCMM '06.

[30]  Douglas Eck,et al.  Towards Mixed-initiative generation of multi-channel sequential structure , 2018, ICLR.

[31]  François Pachet,et al.  Assisted Lead Sheet Composition Using FlowComposer , 2016, CP.

[32]  Bob L. Sturm,et al.  Machine learning research that matters for music creation: A case study , 2018, Journal of New Music Research.

[33]  Geraint A. Wiggins,et al.  AI Methods for Algorithmic Composition: A Survey, a Critical View and Future Prospects , 1999 .

[34]  Hugo Larochelle,et al.  Neural Autoregressive Distribution Estimation , 2016, J. Mach. Learn. Res..