Skip to content

Commit

Permalink
add Pianoroll test
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosholivan committed Nov 10, 2022
1 parent 0aa9a9f commit 58fb7b2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Empty file.
22 changes: 22 additions & 0 deletions tests/unit/musicaiz/plotters/test_pianorolls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import pytest

from musicaiz.plotters import Pianoroll
from musicaiz.loaders import Musa


@pytest.fixture
def midi_sample(fixture_dir):
return fixture_dir / "tokenizers" / "mmm_tokens.mid"


def test_Pianoroll_plot_instrument(midi_sample):
plot = Pianoroll()
musa_obj = Musa(midi_sample, structure="bars")
plot.plot_instrument(
track=musa_obj.instruments[0].notes,
total_bars=2,
subdivision="quarter",
time_sig=musa_obj.time_sig.time_sig,
print_measure_data=False,
show_bar_labels=False
)

0 comments on commit 58fb7b2

Please sign in to comment.