Piano Music Generation with LSTM in the Style of Chopin

Hi all,

I have really enjoyed putting my first web application together using Streamlit. I love Streamlit because it allows someone like me (with no front-end development experience) to create a great-looking application. I use a pre-trained Long Short-Term Memory (LSTM) neural network to perform the music generation. I have also made use of the function by @GokulNC to download the MIDI files created. Thank you! In order to listen to the files you will need a MIDI player.

The link below provides links to the source code for the application as well as model training for interested users. I appreciate any feedback!



Hi @msgilmer

Super nice, and code is well organized and documented which is awesome :)! Now we need to create a Streamlit component to play MIDI notes in the browser !

EDIT: or just use normal Python packages like pretty-midi ^^"

EDIT 2: this was harder than expected but here is a Streamlit MIDI player if you want to take some of my source code to play piano chopin XD https://share.streamlit.io/andfanilo/streamlit-midi-to-wav/main/app.py


Hi @andfanilo,

Thanks so much! It would be great to create a Streamlit component to play MIDI in the browser. I will certainly let you know if I have any success in that regard.

Like you, I also could not correctly install fluidsynth on my machine, but it deployed fine. The new version of the app using your code is here.

Edit: I decided to replace the original app with the new version so the above URL no longer exists.

1 Like

My congratulations! Really very nice!

1 Like