Generating beats and melodies with LSTMs using Python and Tensorflow

Kumar Abhijeet (~kumar80)




Music is mainly an artistic act of inspired creation and is unlike some of the traditional math problems. But, a sequence of specific chords and notes can be observed when we listen to music. With the recent advancements of the AI tech, sequence models are used invariably in innumerous fields, one such sequence model, LSTM( Long Short Term Memory Networks) can be used to generate melodies and beats.

So, this talk is about how deep learning models, specifically LSTMs were used to produce music - catering particularly to the Electronic Dance Music Industry.


  • Learning how LSTMs help in generating music, and the concepts behind it.
  • Preprocessing the MIDI data for the melodies and beats using MIDI packages created by the Python community.
  • Building the LSTM network using Keras with Tensorflow as backend and understanding it.
  • Train the network with the melodical data to create the LSTM network for melodies and same thing for beats.
  • Generating melodies and beats(using pretrained model) and combining the two to create different type of genres of music.

I am including a piece of music generated by an MIT alumnus, but I will be explaining the steps from scratch.

Generated Techno Beats


Tensorflow, Keras, Recurrent Networks and a Good taste in music ;)

Speaker Info:

I am Kumar Abhijeet, a sophomore from RV College of Engineering, Bengaluru and an AI enthusiast. I am a budding EDM producer and a python programmer as well(no doubt in that). I have worked with small AI startups in building their frameworks.

I am an open source contributor and a GSOC aspirant. I have always loved the idea of mixing technology with regular phenomena, which I will be doing with music. I love going to meetups and meet different kinds of communities to learn from them.

Speaker Links:

LinkedIn ID

Github Link

Section: Others
Type: Talks
Target Audience: Beginner
Last Updated:

The comment is marked as spam.


Looks original and interesting.

Anand B Pillai (~pythonhacker)
The comment is marked as spam.

Stephanie Jackson (~stephanie42)

@stephanie42 That's what the AI takes care of... If the previous melodies moved by the way of step, then learning from the data. It will take the most desirable route,i.e. maybe taking leaps on the previous routes or something else. At the end,it all depends on the data fed into the algorithm.

Thanks for the suggestion, would be delighted to talk with you about this in detail.

Kumar Abhijeet (~kumar80)
The comment is marked as spam.

Sourav Singh (~sourav)
The comment is marked as spam.

The comment is marked as spam.

Anna Howze (~anna71)
The comment is marked as spam.


Login to add a new comment.