I made a music generation neural network using my own MIDI parser and LSTM. Recently, there is a project like Magenta, and it seems to be the nth brew, but when I modified the sampling method from the output probability distribution, a little interesting result was obtained. I got it, so I'll share it.
Demo (* Note the volume for immediate playback) Repository
LSTM It is a kind of neural network that can learn the context of sequential data. For details, I will leave it to the many good articles. The following is detailed.
-Unreasonable effectiveness of recurrent neural networks (translation) --An article by Andrej Karpathy, who recently became the director of Tesla's AI and Autopilot Vision. There are many examples and it is easy to understand. -Overview of LSTM network --Details on the calculation process.
MIDI(SMF) This format expresses performance data as a sequence of chunks with pitch, volume, time information, etc. Use (part of) this sequence as LSTM input.
When we tried to output elements with a low probability of occurrence at a certain frequency, a song with a slightly arranged original song was generated.
The self-made MIDI parser is currently quite simple, and there are chunks and information that have not been processed, so if you make a little more, the quality of the output will improve.