See the .mid files in the samples folder for examples of artificial music generated by our model.
Requirements:
- TensorFlow
- Keras
- Python MIDI: pip install python-midi
- h5py: conda install h5py
Every input vector x is 66-dimensional and structured as follows:
- x[0]: relative event time from previous input (tick)
- x[1]: BPM
- x[2-5]: Channel 1: font, note, velocity, duration
- x[6-9]: Channel 2
- ...
- x[62-65]: Channel 16
In MIDI, an event is characterized by the following features:
- Font: Integer in [0,127]
- Note: Integer in [0,127]
- Velocity: Integer in [0,127]
- Duration: Integer in (0,infinity)
Notes:
- We use a -1 in all features to indicate a silenced channel.
- The 16 channel font features are fixed for the full duration of a single track.
- The BPM is fixed for the full duration of a single track.