Use ML to compose music (polyphonic, multitrack, midi input)
Magic Piano : play 32 notes, the piano answers...
python Magic_Piano_from_midi_keyboard.py or python Magic_Piano_from_file.py [MIDIFILE]
Warning, you can only put 32 notes in the file... To do so, you can use this service, fill every note and save your song to a midi file : https://musiclab.chromeexperiments.com/Song-Maker
For each track, for each note, chord or rest, we used the pitch, duration, offset and velocity as "one-hot encoded" values.
We generate a note/chord or rest based on the seq_len (32) last notes/chords or rests. Long chunks of music are generated by sliding the window over time.
[A3, C5, [C2, E2, A2], rest, ...] == (seq_len notes) -> prediction -> predicted note