kernpy 1.0.1__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kernpy-1.0.1 → kernpy-1.0.3}/PKG-INFO +15 -11
- {kernpy-1.0.1 → kernpy-1.0.3}/README.md +14 -10
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/get-started/tutorial.md +8 -8
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/basic_spine_importer.py +5 -2
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/dynam_spine_importer.py +5 -2
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/exporter.py +2 -2
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/fing_spine_importer.py +5 -2
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/harm_spine_importer.py +5 -2
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/mhxm_spine_importer.py +6 -6
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/text_spine_importer.py +5 -2
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/tokenizers.py +1 -1
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/io/public.py +17 -15
- {kernpy-1.0.1 → kernpy-1.0.3}/pyproject.toml +1 -1
- kernpy-1.0.3/test/resource_dir/samples/nine-voices-score.krn +1127 -0
- kernpy-1.0.3/test/resource_dir/samples/nine-voices-score_normalized.krn +1073 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_exporter.py +1 -1
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_generic.py +18 -1
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_humdrum_importer.py +4 -4
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_spine_imoprter_dynam.py +6 -1
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_tokenizer.py +14 -14
- {kernpy-1.0.1 → kernpy-1.0.3}/.github/workflows/publish-pypi.yml +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/.github/workflows/run-tests.yml +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/.github/workflows/update-docs.yml +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/.gitignore +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/CONTRIBUTING.md +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/License +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/antlr-4.13.1-complete.jar +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/antlr4.sh +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/about.md +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/assets/001.svg +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/assets/book.svg +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/assets/learn.svg +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/assets/meeting.svg +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/assets/running.svg +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/css/extra.css +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/docs_requirements.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/get-started.md +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/how-to-guides.md +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/index.md +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/overrides/partials/footer.html +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/reference.md +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/docs/requirements.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/gen/kernLexer.interp +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/gen/kernLexer.java +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/gen/kernLexer.tokens +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kern/kernSpineLexer.g4 +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kern/kernSpineLexer.tokens +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kern/kernSpineParser.g4 +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kern/kernSpineParser.tokens +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/__init__.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/__main__.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/__init__.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/_io.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/base_antlr_importer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/base_antlr_spine_parser_listener.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/document.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/dyn_importer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/error_listener.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generated/kernSpineLexer.interp +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generated/kernSpineLexer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generated/kernSpineLexer.tokens +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generated/kernSpineParser.interp +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generated/kernSpineParser.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generated/kernSpineParser.tokens +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generated/kernSpineParserListener.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generated/kernSpineParserVisitor.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/generic.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/gkern.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/graphviz_exporter.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/import_humdrum_old.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/importer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/importer_factory.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/kern_spine_importer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/mens_spine_importer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/pitch_models.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/root_spine_importer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/spine_importer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/tokens.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/core/transposer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/io/__init__.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/polish_scores/__init__.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/polish_scores/download_polish_dataset.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/polish_scores/iiif.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/test_grammar.sh +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/util/__init__.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/util/helpers.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/util/store_cache.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/kernpy/visualize_analysis.sh +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/legacy-parsers-not-used/kernLexer.g4 +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/legacy-parsers-not-used/kernParser.g4 +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/mkdocs.yml +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/requirements.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/__init__.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/pytest.ini +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/all.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/all_less_decorators.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/all_less_durations.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/all_less_note_rest.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/all_less_pitches.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/concerto-piano-12-allegro_with_all.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/concerto-piano-12-allegro_without_barlines.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/concerto-piano-12-allegro_without_harmony.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/concerto-piano-12-allegro_without_only_signatures.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/empty.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/only_barlines.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/only_decorators.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/only_durations.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/categories/only_pitches.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_0.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_0_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_1.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_10.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_10_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_11.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_11_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_1_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_2.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_2_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_3.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_3_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_4.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_4_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_5.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_5_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_6.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_7.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_7_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_8.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_8_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_9.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/concat/0_9_merged.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/input/sub/chor001.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/input/sub/chor002.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-1-to-3.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-10-to-12.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-11-to-13.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-12-to-14.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-13-to-15.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-14-to-16.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-15-to-17.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-16-to-18.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-17-to-19.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-18-to-20.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-19-to-21.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-2-to-4.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-20-to-22.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-21-to-23.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-22-to-24.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-3-to-5.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-4-to-6.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-5-to-7.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-6-to-8.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-7-to-9.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-8-to-10.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor001/from-9-to-11.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor002/from-1-to-5.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor002/from-2-to-6.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor002/from-3-to-7.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor002/from-4-to-8.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/fragments/output/chor002/from-5-to-9.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/grandstaff/5901766-m24-to-m28.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/grandstaff/5901766.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/hierarchy/tree.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/kern-scores/beethoven_sonata_12_4.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/base_tuplet.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/base_tuplet.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/base_tuplet_longer.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/base_tuplet_longer_m2-m4.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/base_tuplet_longer_m2-m4.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/base_tuplet_longer_m3-m3.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/base_tuplet_longer_plus_octave.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor001-all_tokens.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor001-m1-to-m3.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor001-metadata-generic.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor001-unique_tokens.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor001-unique_tokens_with_category.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor001-unique_tokens_without_measure_numbers.txt +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor001.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor001.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor009.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/chor048.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide02-example2-1.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide02-example2-1.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide02-example2-2.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide02-example2-3.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide02-example2-3.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide02-example2-4.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide02-example2-4.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide06-example6-1.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide06-example6-1.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide06-example6-2.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/guide06-example6-2.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/kern2ekern.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/kern2ekern.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/spines_lexer.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/spines_lexer.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/spline_split.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/spline_split_piston070.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/legacy/spline_split_piston070.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/metadata/frequency.json +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/mozart/concerto-piano-12-allegro-left-hand.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/mozart/concerto-piano-12-allegro-right-hand-and-dyn.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/mozart/concerto-piano-12-allegro-right-hand.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/mozart/concerto-piano-12-allegro.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/mozart/divertimento-quartet.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pages/10.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pages/10.jpg +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pages/11.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pages/11.jpg +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pages/9.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pages/9.jpg +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m16.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m2.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante-m1-to-m3.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test1/pl-wn--mus-iii-118-771--003_badarzewska-tekla--mazurka-brillante.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test2/pl-wn--mus-iii-123-982--001-004_wieniawski-henryk--l-ecole-moderne-etudes-caprices-pour-violon-seul-op-10-4-le-staccato-m0-to-m1.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test2/pl-wn--mus-iii-123-982--001-004_wieniawski-henryk--l-ecole-moderne-etudes-caprices-pour-violon-seul-op-10-4-le-staccato-m1-to-m2.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test2/pl-wn--mus-iii-123-982--001-004_wieniawski-henryk--l-ecole-moderne-etudes-caprices-pour-violon-seul-op-10-4-le-staccato.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/polish/test3/pl-wn--sd-xvi-qu-273--001-020_gomolka-mikolaj--melodiae-na-psalterz-polski-xx-wsiadaj-z-dobrym-sercem-o-krolu-cnotliwy.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/any_header.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/bach-brandenburg-bwv1050a.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/bach-chorale-chor205.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/corelli-op01n12d.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/harmonized-song-erk052.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/haydn-quartet-op54n2-01.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/haydn-sonate-15_1-original.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/haydn-sonate-15_1-output.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/jazzmus_with_mxhm.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/permutations_of_2.bb-_ .krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/piano-beethoven-sonata21-3.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/piano-chopin-prelude28-17.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/piano-hummel-prelude67-15.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/piano-joplin-bethena.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/piano-mozart-sonata07-3.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/piano-scarlatti-L523K205.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/quartet-beethoven-quartet13-6.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/quartet-mozart-k590-04.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/score_with_dividing_one_spine.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/score_with_dividing_one_spine_m9-m13.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/score_with_dividing_two_spines.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/score_with_dividing_two_spines_m49-m56.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/unaccompanied-songs-nova073.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/unexpected_header.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/wrong_header.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/wrong_number_of_columns.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/samples/wrong_number_of_columns_fixed.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/1.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/2-m2-to-m2.ekrn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/2.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/3.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/4.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/5.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/concerto-piano-12-allegro_only_kern_and_harm.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/non_stacked_ends.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/non_stacked_ends_2.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/spines-from-piano-joplin-bethena-start.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/spines/spines-piano-hummel-prelude67-15.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/accidentals.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/accidentals_alteration_display.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/articulations.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/auto_beaming.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/bars.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/beaming.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/chords.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/clefs.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/headers.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/key.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/key_designation.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/mensurations.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/minimal.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/minimal_incorrect.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/modal.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/octaves.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/ornaments.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/rests.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/rhythm.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/slurs.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/ties.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/resource_dir/unit/time.krn +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_deprecated.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_document.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_download_polish_scores.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_export_options.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_gkern.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_importer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_main_cli_api.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_root_spine_root.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_spine_importer_basic.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_spine_importer_dyn.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_spine_importer_fing.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_spine_importer_harm.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_spine_importer_kern.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_spine_importer_mxhm.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_spine_importer_text.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_token.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_transposer.py +0 -0
- {kernpy-1.0.1 → kernpy-1.0.3}/test/test_util_store_cache.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: kernpy
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.3
|
4
4
|
Summary: Python Humdrum **kern and **mens utilities
|
5
5
|
Project-URL: Homepage, https://github.com/OMR-PRAIG-UA-ES/kernpy
|
6
6
|
Project-URL: Documentation, https://github.com/OMR-PRAIG-UA-ES/kernpy#readme
|
@@ -174,32 +174,36 @@ kp.dump(document, "newfile_custom.krn",
|
|
174
174
|
print(kp.BEKERN_CATEGORIES)
|
175
175
|
```
|
176
176
|
|
177
|
-
- Use `
|
177
|
+
- Use `encoding` to select how the categories are split. By default, the `normalizedKern` encoding is used.
|
178
178
|
|
179
179
|
```python
|
180
180
|
import kernpy as kp
|
181
181
|
|
182
182
|
kp.dump(document, "newfile_normalized.krn",
|
183
|
-
|
183
|
+
encoding=kp.Encoding.normalizedKern) # Default encoding
|
184
184
|
```
|
185
|
-
Select the proper Humdrum **kern
|
185
|
+
Select the proper Humdrum **kern encoding:
|
186
186
|
|
187
|
-
`kernpy` provides different
|
187
|
+
`kernpy` provides different encodings to export the content each symbol in different formats.
|
188
188
|
|
189
|
-
| Encoding |
|
189
|
+
| Encoding | Output | Description |
|
190
190
|
|----------|--------------|----------------------------------------|
|
191
191
|
| kern | 2.bb-_L | Traditional Humdrum **kern encoding |
|
192
192
|
| ekern | 2@.@bb@-·_·L | Extended Humdrum **kern encoding |
|
193
|
+
| bkern | 2.bb- | Basic Humdrum **kern encoding |
|
194
|
+
| bekern | 2@.@bb@- | Basic Extended Humdrum **kern encoding |
|
193
195
|
|
194
|
-
Use the `Encoding` enum class to select the
|
196
|
+
Use the `Encoding` enum class to select the encoding:
|
195
197
|
|
196
198
|
```python
|
197
199
|
import kernpy as kp
|
198
200
|
|
199
201
|
doc, _ = kp.load('resource_dir/legacy/chor048.krn')
|
200
202
|
|
201
|
-
kern_content = kp.dumps(doc,
|
202
|
-
ekern_content = kp.dumps(doc,
|
203
|
+
kern_content = kp.dumps(doc, encoding=kp.Encoding.normalizedKern)
|
204
|
+
ekern_content = kp.dumps(doc, encoding=kp.Encoding.eKern)
|
205
|
+
bkern_content = kp.dumps(doc, encoding=kp.KernTypeExporter.bKern)
|
206
|
+
bekern_content = kp.dumps(doc, encoding=kp.KernTypeExporter.bEkern)
|
203
207
|
```
|
204
208
|
|
205
209
|
- Use `from_measure` and `to_measure` to select the measures to export. By default, all the measures are exported.
|
@@ -236,7 +240,7 @@ kp.dump(document, "newfile.krn",
|
|
236
240
|
spine_types=['**kern'], # Export only the **kern spines
|
237
241
|
include=kp.BEKERN_CATEGORIES, # Token categories to include
|
238
242
|
exclude={kp.TokenCategory.PITCH}, # Token categories to exclude
|
239
|
-
|
243
|
+
encoding=kp.Encoding.eKern, # Kern encoding
|
240
244
|
from_measure=1, # First from measure 1
|
241
245
|
to_measure=10, # Last measure exported
|
242
246
|
spine_ids=[0, 1], # Export only the first and the second spine
|
@@ -339,7 +343,7 @@ for page_label, bounding_box_measure in doc.page_bounding_boxes.items():
|
|
339
343
|
kp.dump(doc, f"foo_{page_label}.ekrn",
|
340
344
|
spine_types=['**kern'],
|
341
345
|
token_categories=kp.BEKERN_CATEGORIES,
|
342
|
-
|
346
|
+
encoding=kp.Encoding.eKern,
|
343
347
|
from_measure=bounding_box_measure.from_measure,
|
344
348
|
to_measure=bounding_box_measure.to_measure - 1 # TODO: Check bounds
|
345
349
|
)
|
@@ -155,32 +155,36 @@ kp.dump(document, "newfile_custom.krn",
|
|
155
155
|
print(kp.BEKERN_CATEGORIES)
|
156
156
|
```
|
157
157
|
|
158
|
-
- Use `
|
158
|
+
- Use `encoding` to select how the categories are split. By default, the `normalizedKern` encoding is used.
|
159
159
|
|
160
160
|
```python
|
161
161
|
import kernpy as kp
|
162
162
|
|
163
163
|
kp.dump(document, "newfile_normalized.krn",
|
164
|
-
|
164
|
+
encoding=kp.Encoding.normalizedKern) # Default encoding
|
165
165
|
```
|
166
|
-
Select the proper Humdrum **kern
|
166
|
+
Select the proper Humdrum **kern encoding:
|
167
167
|
|
168
|
-
`kernpy` provides different
|
168
|
+
`kernpy` provides different encodings to export the content each symbol in different formats.
|
169
169
|
|
170
|
-
| Encoding |
|
170
|
+
| Encoding | Output | Description |
|
171
171
|
|----------|--------------|----------------------------------------|
|
172
172
|
| kern | 2.bb-_L | Traditional Humdrum **kern encoding |
|
173
173
|
| ekern | 2@.@bb@-·_·L | Extended Humdrum **kern encoding |
|
174
|
+
| bkern | 2.bb- | Basic Humdrum **kern encoding |
|
175
|
+
| bekern | 2@.@bb@- | Basic Extended Humdrum **kern encoding |
|
174
176
|
|
175
|
-
Use the `Encoding` enum class to select the
|
177
|
+
Use the `Encoding` enum class to select the encoding:
|
176
178
|
|
177
179
|
```python
|
178
180
|
import kernpy as kp
|
179
181
|
|
180
182
|
doc, _ = kp.load('resource_dir/legacy/chor048.krn')
|
181
183
|
|
182
|
-
kern_content = kp.dumps(doc,
|
183
|
-
ekern_content = kp.dumps(doc,
|
184
|
+
kern_content = kp.dumps(doc, encoding=kp.Encoding.normalizedKern)
|
185
|
+
ekern_content = kp.dumps(doc, encoding=kp.Encoding.eKern)
|
186
|
+
bkern_content = kp.dumps(doc, encoding=kp.KernTypeExporter.bKern)
|
187
|
+
bekern_content = kp.dumps(doc, encoding=kp.KernTypeExporter.bEkern)
|
184
188
|
```
|
185
189
|
|
186
190
|
- Use `from_measure` and `to_measure` to select the measures to export. By default, all the measures are exported.
|
@@ -217,7 +221,7 @@ kp.dump(document, "newfile.krn",
|
|
217
221
|
spine_types=['**kern'], # Export only the **kern spines
|
218
222
|
include=kp.BEKERN_CATEGORIES, # Token categories to include
|
219
223
|
exclude={kp.TokenCategory.PITCH}, # Token categories to exclude
|
220
|
-
|
224
|
+
encoding=kp.Encoding.eKern, # Kern encoding
|
221
225
|
from_measure=1, # First from measure 1
|
222
226
|
to_measure=10, # Last measure exported
|
223
227
|
spine_ids=[0, 1], # Export only the first and the second spine
|
@@ -320,7 +324,7 @@ for page_label, bounding_box_measure in doc.page_bounding_boxes.items():
|
|
320
324
|
kp.dump(doc, f"foo_{page_label}.ekrn",
|
321
325
|
spine_types=['**kern'],
|
322
326
|
token_categories=kp.BEKERN_CATEGORIES,
|
323
|
-
|
327
|
+
encoding=kp.Encoding.eKern,
|
324
328
|
from_measure=bounding_box_measure.from_measure,
|
325
329
|
to_measure=bounding_box_measure.to_measure - 1 # TODO: Check bounds
|
326
330
|
)
|
@@ -117,15 +117,15 @@ kp.dump(document, "newfile_custom.krn",
|
|
117
117
|
exclude={kp.TokenCategory.PITCH})
|
118
118
|
```
|
119
119
|
|
120
|
-
- Use `
|
120
|
+
- Use `encoding` to select how the categories are split. By default, the `normalizedKern` encoding is used.
|
121
121
|
|
122
122
|
```python
|
123
123
|
import kernpy as kp
|
124
124
|
|
125
125
|
kp.dump(document, "newfile_normalized.krn",
|
126
|
-
|
126
|
+
encoding=kp.Encoding.normalizedKern) # Default encoding
|
127
127
|
```
|
128
|
-
Select the proper Humdrum **kern
|
128
|
+
Select the proper Humdrum **kern encoding:
|
129
129
|
|
130
130
|
`kernpy` provides different tokenizers to export the content each symbol in different formats.
|
131
131
|
|
@@ -134,15 +134,15 @@ Select the proper Humdrum **kern tokenizer:
|
|
134
134
|
| kern | 2.bb-_L | Traditional Humdrum **kern encoding |
|
135
135
|
| ekern | 2@.@bb@-·_·L | Extended Humdrum **kern encoding |
|
136
136
|
|
137
|
-
Use the `Encoding` enum class to select the
|
137
|
+
Use the `Encoding` enum class to select the encoding:
|
138
138
|
|
139
139
|
```python
|
140
140
|
import kernpy as kp
|
141
141
|
|
142
142
|
doc, _ = kp.load('resource_dir/legacy/chor048.krn')
|
143
143
|
|
144
|
-
kern_content = kp.dumps(doc,
|
145
|
-
ekern_content = kp.dumps(doc,
|
144
|
+
kern_content = kp.dumps(doc, encoding=kp.Encoding.normalizedKern)
|
145
|
+
ekern_content = kp.dumps(doc, encoding=kp.Encoding.eKern)
|
146
146
|
```
|
147
147
|
|
148
148
|
- Use `from_measure` and `to_measure` to select the measures to export. By default, all the measures are exported.
|
@@ -179,7 +179,7 @@ kp.dump(document, "newfile.krn",
|
|
179
179
|
spine_types=['**kern'], # Export only the **kern spines
|
180
180
|
include=kp.BEKERN_CATEGORIES, # Token categories to include
|
181
181
|
exclude={kp.TokenCategory.PITCH}, # Token categories to exclude
|
182
|
-
|
182
|
+
encoding=kp.Encoding.eKern, # Kern encoding
|
183
183
|
from_measure=1, # First from measure 1
|
184
184
|
to_measure=10, # Last measure exported
|
185
185
|
spine_ids=[0, 1], # Export only the first and the second spine
|
@@ -282,7 +282,7 @@ for page_label, bounding_box_measure in doc.page_bounding_boxes.items():
|
|
282
282
|
kp.dump(doc, f"foo_{page_label}.ekrn",
|
283
283
|
spine_types=['**kern'],
|
284
284
|
token_categories=kp.BEKERN_CATEGORIES,
|
285
|
-
|
285
|
+
encoding=kp.Encoding.eKern,
|
286
286
|
from_measure=bounding_box_measure.from_measure,
|
287
287
|
to_measure=bounding_box_measure.to_measure - 1 # TODO: Check bounds
|
288
288
|
)
|
@@ -24,8 +24,11 @@ class BasicSpineImporter(SpineImporter):
|
|
24
24
|
def import_token(self, encoding: str) -> Token:
|
25
25
|
self._raise_error_if_wrong_input(encoding)
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
try:
|
28
|
+
kern_spine_importer = KernSpineImporter()
|
29
|
+
token = kern_spine_importer.import_token(encoding)
|
30
|
+
except Exception as e:
|
31
|
+
return SimpleToken(encoding, TokenCategory.OTHER)
|
29
32
|
|
30
33
|
ACCEPTED_CATEGORIES = {
|
31
34
|
TokenCategory.STRUCTURAL,
|
@@ -23,8 +23,11 @@ class DynamSpineImporter(SpineImporter):
|
|
23
23
|
def import_token(self, encoding: str) -> Token:
|
24
24
|
self._raise_error_if_wrong_input(encoding)
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
try:
|
27
|
+
kern_spine_importer = KernSpineImporter()
|
28
|
+
token = kern_spine_importer.import_token(encoding)
|
29
|
+
except Exception as e:
|
30
|
+
return SimpleToken(encoding, TokenCategory.DYNAMICS)
|
28
31
|
|
29
32
|
ACCEPTED_CATEGORIES = {
|
30
33
|
TokenCategory.STRUCTURAL,
|
@@ -153,7 +153,7 @@ class HeaderTokenGenerator:
|
|
153
153
|
"""
|
154
154
|
HeaderTokenGenerator class.
|
155
155
|
|
156
|
-
This class is used to translate the HeaderTokens to the specific
|
156
|
+
This class is used to translate the HeaderTokens to the specific encoding format.
|
157
157
|
"""
|
158
158
|
@classmethod
|
159
159
|
def new(cls, *, token: HeaderToken, type: Encoding):
|
@@ -162,7 +162,7 @@ class HeaderTokenGenerator:
|
|
162
162
|
|
163
163
|
Args:
|
164
164
|
token (HeaderToken): The HeaderToken to be translated.
|
165
|
-
type (Encoding): The
|
165
|
+
type (Encoding): The encoding to be used.
|
166
166
|
|
167
167
|
Examples:
|
168
168
|
>>> header = HeaderToken('**kern', 0)
|
@@ -24,8 +24,11 @@ class FingSpineImporter(SpineImporter):
|
|
24
24
|
def import_token(self, encoding: str) -> Token:
|
25
25
|
self._raise_error_if_wrong_input(encoding)
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
try:
|
28
|
+
kern_spine_importer = KernSpineImporter()
|
29
|
+
token = kern_spine_importer.import_token(encoding)
|
30
|
+
except Exception as e:
|
31
|
+
return SimpleToken(encoding, TokenCategory.FINGERING)
|
29
32
|
|
30
33
|
ACCEPTED_CATEGORIES = {
|
31
34
|
TokenCategory.STRUCTURAL,
|
@@ -23,8 +23,11 @@ class HarmSpineImporter(SpineImporter):
|
|
23
23
|
def import_token(self, encoding: str) -> Token:
|
24
24
|
self._raise_error_if_wrong_input(encoding)
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
try:
|
27
|
+
kern_spine_importer = KernSpineImporter()
|
28
|
+
token = kern_spine_importer.import_token(encoding)
|
29
|
+
except Exception as e:
|
30
|
+
return SimpleToken(encoding, TokenCategory.HARMONY)
|
28
31
|
|
29
32
|
ACCEPTED_CATEGORIES = {
|
30
33
|
TokenCategory.STRUCTURAL,
|
@@ -4,7 +4,7 @@ from typing import Optional
|
|
4
4
|
from .kern_spine_importer import KernSpineListener, KernSpineImporter
|
5
5
|
from .base_antlr_spine_parser_listener import BaseANTLRSpineParserListener
|
6
6
|
from .spine_importer import SpineImporter
|
7
|
-
from .tokens import MHXMToken, Token, TokenCategory
|
7
|
+
from .tokens import MHXMToken, Token, TokenCategory, SimpleToken
|
8
8
|
|
9
9
|
|
10
10
|
class MxhmSpineImporter(SpineImporter):
|
@@ -23,8 +23,11 @@ class MxhmSpineImporter(SpineImporter):
|
|
23
23
|
def import_token(self, encoding: str) -> Token:
|
24
24
|
self._raise_error_if_wrong_input(encoding)
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
try:
|
27
|
+
kern_spine_importer = KernSpineImporter()
|
28
|
+
token = kern_spine_importer.import_token(encoding)
|
29
|
+
except Exception as e:
|
30
|
+
return SimpleToken(encoding, TokenCategory.HARMONY)
|
28
31
|
|
29
32
|
ACCEPTED_CATEGORIES = {
|
30
33
|
TokenCategory.STRUCTURAL,
|
@@ -39,6 +42,3 @@ class MxhmSpineImporter(SpineImporter):
|
|
39
42
|
return SimpleToken(encoding, TokenCategory.HARMONY)
|
40
43
|
|
41
44
|
return token
|
42
|
-
|
43
|
-
return MHXMToken(encoding)
|
44
|
-
|
@@ -24,8 +24,11 @@ class TextSpineImporter(SpineImporter):
|
|
24
24
|
def import_token(self, encoding: str) -> Token:
|
25
25
|
self._raise_error_if_wrong_input(encoding)
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
try:
|
28
|
+
kern_spine_importer = KernSpineImporter()
|
29
|
+
token = kern_spine_importer.import_token(encoding)
|
30
|
+
except Exception as e:
|
31
|
+
return SimpleToken(encoding, TokenCategory.LYRICS)
|
29
32
|
|
30
33
|
ACCEPTED_CATEGORIES = {
|
31
34
|
TokenCategory.STRUCTURAL,
|
@@ -18,7 +18,7 @@ class Encoding(Enum): # TODO: Eventually, polymorphism will be used to export d
|
|
18
18
|
>>> doc, _ = kp.load('path/to/file.krn')
|
19
19
|
>>>
|
20
20
|
>>> # Save the file using the specified encoding
|
21
|
-
>>> exported_content = kp.dumps(
|
21
|
+
>>> exported_content = kp.dumps(encoding=kp.Encoding.normalizedKern)
|
22
22
|
"""
|
23
23
|
eKern = 'ekern'
|
24
24
|
normalizedKern = 'kern'
|
@@ -12,7 +12,9 @@ from kernpy import Encoding
|
|
12
12
|
from kernpy.core import (
|
13
13
|
Document, Importer, Exporter, ExportOptions, GraphvizExporter,
|
14
14
|
generic,
|
15
|
-
TokenCategoryHierarchyMapper
|
15
|
+
TokenCategoryHierarchyMapper,
|
16
|
+
TokenCategory,
|
17
|
+
)
|
16
18
|
|
17
19
|
|
18
20
|
def load(fp: Union[str, Path], *, raise_on_errors: Optional[bool] = False, **kwargs) -> (Document, List[str]):
|
@@ -84,13 +86,13 @@ def loads(s, *, raise_on_errors: Optional[bool] = False, **kwargs) -> (Document,
|
|
84
86
|
|
85
87
|
|
86
88
|
def dump(document: Document, fp: Union[str, Path], *,
|
87
|
-
spine_types: [] = None,
|
88
|
-
include: [] = None,
|
89
|
-
exclude: [] = None,
|
89
|
+
spine_types: [str] = None,
|
90
|
+
include: [TokenCategory] = None,
|
91
|
+
exclude: [TokenCategory] = None,
|
90
92
|
from_measure: int = None,
|
91
93
|
to_measure: int = None,
|
92
|
-
|
93
|
-
instruments: [] = None,
|
94
|
+
encoding: Encoding = None,
|
95
|
+
instruments: [str] = None,
|
94
96
|
show_measure_numbers: bool = None,
|
95
97
|
spine_ids: [int] = None
|
96
98
|
) -> None:
|
@@ -104,7 +106,7 @@ def dump(document: Document, fp: Union[str, Path], *,
|
|
104
106
|
exclude (Iterable): The token categories to exclude from the exported file. When None, no token categories will be excluded.
|
105
107
|
from_measure (int): The measure to start exporting. When None, the exporter will start from the beginning of the file. The first measure is 1
|
106
108
|
to_measure (int): The measure to end exporting. When None, the exporter will end at the end of the file.
|
107
|
-
|
109
|
+
encoding (Encoding): The type of the **kern file to export.
|
108
110
|
instruments (Iterable): The instruments to export. If None, all the instruments will be exported.
|
109
111
|
show_measure_numbers (Bool): Show the measure numbers in the exported file.
|
110
112
|
spine_ids (Iterable): The ids of the spines to export. When None, all the spines will be exported. \
|
@@ -130,7 +132,7 @@ def dump(document: Document, fp: Union[str, Path], *,
|
|
130
132
|
exclude=exclude,
|
131
133
|
from_measure=from_measure,
|
132
134
|
to_measure=to_measure,
|
133
|
-
kern_type=
|
135
|
+
kern_type=encoding,
|
134
136
|
instruments=instruments,
|
135
137
|
show_measure_numbers=show_measure_numbers,
|
136
138
|
spine_ids=spine_ids
|
@@ -144,13 +146,13 @@ def dump(document: Document, fp: Union[str, Path], *,
|
|
144
146
|
|
145
147
|
|
146
148
|
def dumps(document: Document, *,
|
147
|
-
spine_types: [] = None,
|
148
|
-
include: [] = None,
|
149
|
-
exclude: [] = None,
|
149
|
+
spine_types: [str] = None,
|
150
|
+
include: [TokenCategory] = None,
|
151
|
+
exclude: [TokenCategory] = None,
|
150
152
|
from_measure: int = None,
|
151
153
|
to_measure: int = None,
|
152
|
-
|
153
|
-
instruments: [] = None,
|
154
|
+
encoding: Encoding = None,
|
155
|
+
instruments: [str] = None,
|
154
156
|
show_measure_numbers: bool = None,
|
155
157
|
spine_ids: [int] = None
|
156
158
|
) -> str:
|
@@ -164,7 +166,7 @@ def dumps(document: Document, *,
|
|
164
166
|
exclude (Iterable): The token categories to exclude from the exported file. When None, no token categories will be excluded.
|
165
167
|
from_measure (int): The measure to start exporting. When None, the exporter will start from the beginning of the file. The first measure is 1
|
166
168
|
to_measure (int): The measure to end exporting. When None, the exporter will end at the end of the file.
|
167
|
-
|
169
|
+
encoding (Encoding): The type of the **kern file to export.
|
168
170
|
instruments (Iterable): The instruments to export. If None, all the instruments will be exported.
|
169
171
|
show_measure_numbers (Bool): Show the measure numbers in the exported file.
|
170
172
|
spine_ids (Iterable): The ids of the spines to export. When None, all the spines will be exported. \
|
@@ -189,7 +191,7 @@ def dumps(document: Document, *,
|
|
189
191
|
exclude=exclude,
|
190
192
|
from_measure=from_measure,
|
191
193
|
to_measure=to_measure,
|
192
|
-
kern_type=
|
194
|
+
kern_type=encoding,
|
193
195
|
instruments=instruments,
|
194
196
|
show_measure_numbers=show_measure_numbers,
|
195
197
|
spine_ids=spine_ids
|