Learning to compose music from MIDI files using an LSTM neural network in deeplearning4j,

by Don Smith

Composing from MIDI using LSTM Deep Learning

Starting November 2020, I'm using a new algorithm for producing music strings. It models not just two part harmonies but also chords and multiple parts. Also, I varied the deep learning architecture. (It intermixes one ore more DenseLayers with LSTM layers.) Details will follow... I think the music has a better rhythmic structure (beat) than the previous results. The program learns from a directory of midi files, extracting musical information, and modeling it in a neural network.

bach-bigger-pitch-range-2020-11-03e.mp3
hymns-33-64a.mp3 (trained on 981 hymns; score was low, indicating it was easy to learn)
bach-bigger-pitch-range-2020-11-03b.mp3
bach-bigger-pitch-range-2020-11-03c.mp3
bach-bigger-pitch-range-2020-11-03d.mp3
bach-bigger-pitch-range-2020-11-04-TwoDenseLayers_a.mp3
bach-bigger-pitch-range-2020-11-04-TwoDenseLayers_b.mp3
bach-bigger-pitch-range-2020-11-04-TwoDenseLayers_c.mp3 ★
bach-2020-11-01a3.mp3 ★
bach-2020-11-01b3.mp3
bach-more-pitches--fewer-durations-2020-11-05-a.mp3
bach-more-pitches--fewer-durations-2020-11-05-b.mp3
bach-more-pitches--fewer-durations-2020-11-05-c.mp3
bach-more-pitches--fewer-durations-2020-11-05-d.mp3
classicalguitar-more-pitches--fewer-durations-2020-11-05-a.mp3
classicalguitar-more-pitches--fewer-durations-2020-11-05-b.mp3
classicalguitar-more-pitches--fewer-durations-2020-11-05-c.mp3
classicalguitar-2020-11-02a.mp3
classicalguitar-2020-11-02b.mp3
classicalguitar-2020-11-02c.mp3
classicalguitar-2020-11-02d.mp3
classicalguitar-2020-11-02e.mp3
classicalguitar-2020-11-02f.mp3
mozart-2020-11-02a.mp3
mozart-2020-11-02b.mp3
mozart-2020-11-02c.mp3
abba-2020-11-02a.mp3
abba-2020-11-02b.mp3
abba-2020-11-02c.mp3
early-music-2020-11-02a.mp3
early-music-2020-11-02b.mp3
jazz-2020-11-02a.mp3
jazz-2020-11-02b.mp3
jazz-2020-11-02c.mp3 ★
jazz-2020-11-02d.mp3

Old examples and explanation from 2018