Closed binary-person closed 4 years ago
Hi,
The network as it is on the master branch only supports a mono track. If you'd like to support 2 tracks you can try using a multi-input multi-output network where the inputs/outputs are notes/duration/offset. That should allow you to have as many tracks as you want.
Additionally, you can try using something like MuseGAN to create multi-track files.
But it doesn’t make sense. It is obvious that a piano has two tracks and this repo’s name is self explanatory. Anyway, which branch has multi track support??
It does make sense. This is a single-track implementation. It only produces one note/chord for each offset so it would be difficult for it to be multi-track.
The multi-track support isn't ready. But it uses the multi-in/out method I detailed above.
@binary-person you can merge the midi tracks into one single track using this: https://github.com/jordan-bird/Keras-LSTM-Music-Generator/blob/master/convertmidis.py Then use the new midis as your input to the network
The other way, like @Skuldur said is to have multiple inputs with the functional API but given that many midis have >2 tracks then it would eat resources and likely OOM
The merging seems to provide a good effect on the result. I agree that by using multiple tracks, it would eat resources. I think that this repo should remain as is for the lessened complexity and easier understanding for future peeps.
That's exactly the point of this repo. :)
I've made a more complex version of this project that I've been debating whether to merge into the repo, but I feel like this should remain simple for people that are just getting their feet wet in music generation. I do need to do some refactoring in this repo when I find the time, though 😅
@Skuldur I would love to see your multi-track implementation. Do you have the repo link?
A normal piano midi has 2 tracks. One left and one right. When I trained it on some bach piano pieces, the loss went to around 0.1 and I ran the predict.py with the weights loaded. The results did sound like bach, but its only a mono track that's playing. I fed the network with 2 tracks for the piano. Is there something I didn't do?