August 2017
Intermediate to advanced
288 pages
8h 6m
English
In this recipe, we will read a repository of Musical Instrument Digital Interface (MIDI) files and preprocess them into a suitable format for an RBM. MIDI is one of the formats of storing musical notes, which can be converted to other formats such as .wav, .mp3, .mp4, and so on. MIDI file formats store various kinds of events such as Note-on, Note-off, Tempo, Time Signature, End of track, and so on. However, we will primarily be focusing on the type of note--when it was turned on, and when it was turned off.
Each song is encoded into a binary matrix, where rows represent time, and columns represent both turned on and turned off notes. At each time, a note is turned on and the same note is turned ...