The original idea was to get some knowledge about multi-layer Recurrent Neural Network (RNN) and see what happens while attempting to train it in music. Irish tunes were chosen since I am a huge fan of Irish Traditional Music. Plus, ABC format is a real advantage here, since it can be represented as a text file and has not that many “letters” in its language. A better background on char-rnn can be found on this site.
As a source of tunes, the session database was used. Melodies of a certain type (i.e. reels, jigs, slip jigs, etc.) and certain scale (D, G, …) were grabbed using self-written python script into a single file.
To make it easier for RNN to learn all tunes were transposed to the same scale (D). This increased the amount of tunes that sound realistically in about 45-55%. In addition, some tunes were transposed.
As a neural network, I chose the Torch-RNN implementation. To find reasonable training parameters RNN was run several times using 3 parameters as variables (neural network size, dropout, number of layers, see the Figure with bars below).
12 files were then generated containing 50 kB chunks of raw tunes. Each file contained ~150 tunes (the length of tunes was random).
All raw tunes were played, the best ones were collected separately, cleaned up to 50% (some of them were off-scale, with the wrong number of bars, please refer to this post for more deatils). Some parts were composed from scratch to complete the tune. The idea of the DoE was to quantify the output somehow. However, note that the judgment about the tune quality was highly subjective.
The rest of tunes were skipped. Below is an example of a failed one:
The figure below shows the total number of tunes within each file generated with specific parameters. This number includes only these tunes that are playble and do not cause ears bleeding. Also, tunes were checked with the TunePal. The TunePal showed some suggestions but these options were not even close, which is a sign of an “originality”.
The average total number of 10-15 tunes gives approximately 10% of successful tunes. Of course, the learning/generating parameters need to be adjusted to increase this amount.
Some of these tunes are posted here.
Update!!! Please, check the blog. The algorithm is constantly improving.
Update 2: New set of reels
The process of training is in a constant development. So I will update this sections as fast as i can.