musicaiz.plotters.Pianoroll¶
- class musicaiz.plotters.Pianoroll(musa: Optional[musicaiz.loaders.Musa] = None, dark: bool = False)[source]¶
Examples
>>> from pathlib import Path >>> file = Path("tests/fixtures/tokenizers/mmm_tokens.mid") >>> musa_obj = musicaiz.loaders.Musa(file, structure="instruments") >>> plot = musicaiz.plotters.Pianoroll() >>> plot.plot_instrument( track=musa_obj.instruments[0].notes, total_bars=3, subdivision="eight" )
- __init__(musa: Optional[musicaiz.loaders.Musa] = None, dark: bool = False)[source]¶
Methods
__init__
([musa, dark])plot_grid
(subdivisions)plot_instruments
(program, bar_start, bar_end)