Support for Fingering Annotations and Markings. #403
Merged
+139
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to enhance the handling of technical notations, specifically fingering, across various modules. The most important changes include adding support for technical notations in the export and import functions, and updating type annotations for better code clarity.
Score BASE module updates:
partitura/score.py
: Addedtechnical
attribute toGenericNote
class to support technical notations such as fingering.Import functions updates:
partitura/io/importmatch.py
: Addedtechnical
attribute handling inpart_from_matchfile
and introducedfingering_pattern
for parsing fingering notations.partitura/io/importmusicxml.py
: Added functionsget_technical_notations
andparse_fingering
to parse technical notations, and updated_handle_note
to includetechnical
attribute.Export functions updates:
partitura/io/exportmatch.py
: Added handling fortechnical
attribute and processing ofFingering
elements in thematchfile_from_alignment
function.partitura/io/exportmei.py
: Introduced_handle_fingering
method and added calls to this method in relevant places to handle fingering notations.partitura/io/exportmusicxml.py
: Added processing fortechnical
attribute in themake_note_el
function.Type annotations and code improvements:
partitura/io/exportmei.py
: Updated type annotations for several methods to improve code clarity.partitura/musicanalysis/performance_codec.py
: Enhanced theto_matched_score
function to handlenp.ndarray
types forscore
andperformance
parameters.