MIDI - CSV - Time Series, this repository contains functions for constructing time series of music scores from a given CSV file.
First you need to convert the .mid file to a .csv with midi to csv software freely available here: https://www.fourmilab.ch/webtools/midicsv/
Then open the .csv file:
f = readdlm("File.csv", ',')
If you want to get only the pitch sequences for the piece:
ps = get_pitch_seq(f)
Or the actual time series (with subdivision):
ts = get_time_series(f)
Both outputs would be a vector containing the n voices of the piece.