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

wrap pitch access in try/catch #1652

Conversation

jhansen317
Copy link

This was failing with

'PercussionChord/Unpitched' object has no attribute 'pitch'

when calling chordify() on, say, orchestral scores with timpani, etc.

@mscuthbert
Copy link
Member

conditionalAdd is typed as requiring note.Note -- could you shift the guard to be at the point where conditionalAdd is being called? Thanks

mscuthbert added a commit that referenced this pull request Jan 3, 2024
Make Verticality.makeElement aware of unpitched objects.

Supersedes #1652 -- which pointed out an important bug but didn't put the onus on type-safety on the calling attribute.
@mscuthbert
Copy link
Member

Closing in favor of #1678 which implements the same safety but in a more type-aware manner. Thanks for the great idea.

@mscuthbert mscuthbert closed this Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants