Closed PeterGardas closed 5 years ago
The code you are posting is plotting notes between MIDI note 56 and 70. If the MIDI file you are trying to plot has no notes in that range, you will not see anything in the piano note diagram. You can change this name via the start_pitch and end_pitch arguments to plot_piano_roll.
Checked it, has notes. My problem is that the plot is not showing (not even empty). Is there any problem with Ubuntu 18.04 LTS?
Oh, maybe you don't have the notebook backend for matplotlib installed or something. Does a notebook which just has one cell which contains
import matplotlib.pyplot as plt
%matplotlib inline
plt.plot()
show anything? If not you need to sort out your matplotlib installation, and I'm afraid I can't help you with that.
So, I want to use pretty-midi for my ML project, but I am having trouble with the examples at the Jupyter notebook. My code:
But, for some unknown reason it doesn't show the plot. Also the piano roll array seems to be all 0 which means according to the code that it didn't detected any notes when in fact the midi is valid and playable.
I am completely lost. Thanks for help.
Peter Gardas