Open Source RNN designed for text generation is capable of composing music similar to Baroque composers

(1) The Walker School

https://doi.org/10.59720/20-080
Cover photo for Open Source RNN designed for text generation is capable of composing music similar to Baroque composers

Recurrent neural networks (RNNs) are useful for text generation since they can generate outputs in the context of previous ones. Baroque music and language are similar, as every word or note exists in context with others, and they both follow strict rules. We hypothesized that if we represent music in a text format, an RNN designed to generate language could train on it and create music structurally similar to Bach’s. We used an RNN designed for text generation and trained it on 107 Bach pieces. Unlike previously implemented algorithms, such as Bachbot, this algorithm trained on all types of Bach’s music-both his instrumental/orchestral pieces and chorales. Since the dataset used in this study is more diverse than that of previous algorithms, we predicted that the present algorithm’s output will have a structure that is more reflective of all of Bach’s music. We compared the Attacks/Spaces and the Spaces/ (Attacks+Spaces) ratios of both Bachbot’s and this experiment’s outputs and found that Bachbot’s Attacks/Spaces ratios were significantly lower than this experiment’s outputs (p < 0.001), and their Spaces/ (Attacks+Spaces) ratios were significantly higher (p < 0.001). Overall, we found that the music generated by our RNN shared a similar structure with Bach’s music in the input dataset, while Bachbot’s outputs are significantly different from this experiment’s outputs and thus are less similar to Bach’s repertoire compared to our algorithm. Therefore, it is plausible that an RNN designed for text generation could create Baroque music.

Download Full Article as PDF

This article has been tagged with: