Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Estimate symbolic duration for Composite durations #352

Merged
merged 13 commits into from
May 27, 2024

Conversation

manoskary
Copy link
Member

This PR addresses a minor improvement on symbolic duration estimation for composite duration, i.e. tied notes or multiple rests.
We make this a standard on the rest infilling function in score.py and we generally make this an option. The PR includes some improved documentation.

@manoskary manoskary added the enhancement New feature or request label Mar 15, 2024
@manoskary manoskary requested a review from fosfrancesco March 15, 2024 16:39
@manoskary manoskary self-assigned this Mar 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 16.21622% with 62 lines in your changes are missing coverage. Please review.

Project coverage is 83.02%. Comparing base (3cd1e41) to head (711b5c3).
Report is 1 commits behind head on develop.

Files Patch % Lines
partitura/score.py 0.00% 37 Missing ⚠️
partitura/io/exportmei.py 4.16% 23 Missing ⚠️
partitura/io/importmusicxml.py 50.00% 1 Missing ⚠️
partitura/utils/music.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #352      +/-   ##
===========================================
- Coverage    84.11%   83.02%   -1.10%     
===========================================
  Files           82       82              
  Lines        14506    14562      +56     
===========================================
- Hits         12202    12090     -112     
- Misses        2304     2472     +168     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

)
continue
# Skip if start and end notes are in different voices or staves
if start_note.voice != end_note.voice or start_note.staff != end_note.staff:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why should we skip if we are changing staff? This could be a staff crossing voice once we fix the modeling problem of partitura with these things.
I would allow it, unless it creates problems with the actual version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true. However, it created some problems with the export. This is quite tricky. The issue comes from the Tuplet objects which should have tests implemented on them. Well, I can either comment out the staff and add a NOTE that this might create errors or add it as a flag on the function (i.e. cross_staff_in_tuplets=True).

partitura/utils/music.py Show resolved Hide resolved
partitura/utils/music.py Show resolved Hide resolved
partitura/utils/music.py Show resolved Hide resolved
@fosfrancesco fosfrancesco merged commit b18cf3c into develop May 27, 2024
3 checks passed
@manoskary manoskary mentioned this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants