Converts a pretty midi sequence to a boket plot
Project description
Visual MIDI
Converts a pretty midi sequence to a bokeh plot.
Installation
pip install visual_midi
Usage
Python
from visual_midi import Plotter
from pretty_midi import PrettyMIDI
pm = PrettyMIDI()
plotter = Plotter()
plotter.show(pm, "out.html")
Command line
visual_midi "midi_file_01.mid" "midi_file_02.mid"
Examples
from visual_midi import Plotter
from pretty_midi import PrettyMIDI
from pretty_midi import Instrument
from pretty_midi import Note
plotter = Plotter(plot_max_length_bar=4)
pm = PrettyMIDI()
pm.instruments.append(Instrument(0))
notes = [Note(100, 36, 1.5, 1.7),
Note(100, 37, 1.5, 1.7),
Note(100, 38, 3.5, 4.1),
Note(100, 39, 5.5, 6.0),
Note(100, 40, 6.0, 7.0),
Note(100, 41, 7.0, 8.0),
Note(100, 36, 9.0, 10.5),
Note(100, 37, 9.5, 10.0),
Note(100, 37, 10.0, 10.5),
Note(100, 37, 10.5, 11.0)]
[pm.instruments[0].append(note) for note in notes]
plotter.plot(pm)
plotter.show(pm, "output.html")
Contributing
Development
# Installs the library, dependencies, and command line scripts
python setup.py install
# Installs the python library (necessary for python imports)
python setup.py install_lib
Guidelines
Use this code style.
TODO
See TODO.
License
See MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Visual_MIDI-0.0.1-py3.7.egg
(18.9 kB
view hashes)