In a response to the recent legislative process of the National Anthem Ordinance in Hong Kong, National Anthem is a music based artwork exploring the use of machine learning in media art. The piece used the Google Magenta library to learn over 140 national anthems in the world.
It employed the Long Short-Term Memory (LSTM) neural network to perform the training. The artwork is interactive. Audience can input a sequence of 5 musical notes from a midi keyboard in the exhibition. The custom software will generate a new version of national anthem for the audience with length in 15 seconds.
Here is a video of the screen capture of the performance.
The image below is a typical melody generated from the software with the initial 5 input notes.
Part of the source code for the project can be downloaded from the GitHub repository, NationalAnthem.