Getting ready

Let's look at the prerequisites to preprocess MIDI files:

  1. Download the MIDI song repository:

https://github.com/dshieble/Music_RBM/tree/master/Pop_Music_Midi

  1. Download the Python codes to manipulate MIDI songs:

https://github.com/dshieble/Music_RBM/blob/master/midi_manipulation.py

  1. Install the "reticulate" package, which provides the R interface to Python:
Install.packages("reticulate") 
  1. Import Python libraries:
use_condaenv("python27") 
midi <- import_from_path("midi",path="C:/ProgramData/Anaconda2/Lib/site-packages") 
np <- import("numpy") 
msgpack <- import_from_path("msgpack",path="C:/ProgramData/Anaconda2/Lib/site-packages") 
psys <- import("sys") 
tqdm <- import_from_path("tqdm",path="C:/ProgramData/Anaconda2/Lib/site-packages") 
midi_manipulation_updated <- import_from_path("midi_manipulation_updated",path="C:/Music_RBM") 
glob <- import("glob") 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset