CPJKU / partitura

A python package for handling modern staff notation of music
https://partitura.readthedocs.io
Apache License 2.0
228 stars 15 forks source link

Token export #263

Closed fosfrancesco closed 1 year ago

fosfrancesco commented 1 year ago

Allows to produce tokens from a partitura part with miditok. (All limitations imposed by the specific tokenizers, e.g. only 4/4 are still to be taken into account since no error will be raised on partitura)

Corrects a bug on midi export with a pickup measure with the modality "pad_bar" which was not setting correctly the bar position.

Introduces a new modality for midi_export where the time signature is changed, to ensure correct beat positions for incomplete measures in the middle of the piece.

manoskary commented 1 year ago

closes #214

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 86.72% and project coverage change: +0.14 :tada:

Comparison is base (181b6d2) 85.54% compared to head (07f0a60) 85.68%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #263 +/- ## =========================================== + Coverage 85.54% 85.68% +0.14% =========================================== Files 74 75 +1 Lines 12810 12953 +143 =========================================== + Hits 10958 11099 +141 - Misses 1852 1854 +2 ``` | [Impacted Files](https://app.codecov.io/gh/CPJKU/partitura/pull/263?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CPJKU) | Coverage Δ | | |---|---|---| | [partitura/utils/music.py](https://app.codecov.io/gh/CPJKU/partitura/pull/263?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CPJKU#diff-cGFydGl0dXJhL3V0aWxzL211c2ljLnB5) | `74.72% <71.42%> (-0.08%)` | :arrow_down: | | [tests/test\_utils.py](https://app.codecov.io/gh/CPJKU/partitura/pull/263?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CPJKU#diff-dGVzdHMvdGVzdF91dGlscy5weQ==) | `95.12% <75.00%> (-3.02%)` | :arrow_down: | | [partitura/io/exportmidi.py](https://app.codecov.io/gh/CPJKU/partitura/pull/263?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CPJKU#diff-cGFydGl0dXJhL2lvL2V4cG9ydG1pZGkucHk=) | `90.90% <96.00%> (+1.51%)` | :arrow_up: | | [tests/\_\_init\_\_.py](https://app.codecov.io/gh/CPJKU/partitura/pull/263?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CPJKU#diff-dGVzdHMvX19pbml0X18ucHk=) | `100.00% <100.00%> (ø)` | | | [tests/test\_midi\_export.py](https://app.codecov.io/gh/CPJKU/partitura/pull/263?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CPJKU#diff-dGVzdHMvdGVzdF9taWRpX2V4cG9ydC5weQ==) | `95.39% <100.00%> (+0.54%)` | :arrow_up: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/CPJKU/partitura/pull/263/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CPJKU)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.