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

Update direction-note association algorithm #209

Merged
merged 3 commits into from
Feb 13, 2024
Merged

Update direction-note association algorithm #209

merged 3 commits into from
Feb 13, 2024

Conversation

jaredjj3
Copy link
Collaborator

Warning

This implementation is not completely correct and is not in its intended final state.

This PR renders part of Prelude_No._1_BWV_846_in_C_Major.mxl from #207 and adds it to the vexml test suite.

The voice creation algorithm (rendering.Chorus) now accounts for the direction's stave and voice. When a direction's voice is not specified, it defaults to the last voice rendered. When the algorithm encounters a new voice, the directions are flushed out and associated with the last encountered voice.

However, when a direction is specified after the note it gets assigned to, it seems to signal that the direction should be applied to the end of the note when applicable, like in vexflow.PedalMarking objects. However, the current vexflow.PedalMarking API does not allow you to specify the leading or trailing edge of the "note duration" (not the graphic), so I would have to create a placeholder note to get it to render properly. I'm wary that this might make formatting more difficult, so I'm going to open an issue against vexflow instead to allow us to specify more drawing information for vexflow.PedalMarking objects.

vexml

image

@jaredjj3 jaredjj3 self-assigned this Feb 13, 2024
@jaredjj3 jaredjj3 merged commit c477af4 into master Feb 13, 2024
1 check passed
@jaredjj3 jaredjj3 deleted the prelude branch February 13, 2024 14:33
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.

1 participant