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

Adjust pedalmarkins end #209

Merged
merged 5 commits into from
Jun 28, 2024
Merged

Adjust pedalmarkins end #209

merged 5 commits into from
Jun 28, 2024

Conversation

rvilarl
Copy link
Collaborator

@rvilarl rvilarl commented Jun 10, 2024

fixes #204

Changes the pedal markins brackets ends to include the area behind the note. Either to the next note in its voice or the end of the stave.

@mscuthbert is this a right approach?
@jaredjj3 does this fix the vexml issue?

Differences

current
canvas_PedalMarking Custom_Text_2 Bravura_current
reference
canvas_PedalMarking Custom_Text_2 Bravura_reference
current
canvas_PedalMarking Release_and_Depress_on_Same_Note_1 Bravura_current
reference
canvas_PedalMarking Release_and_Depress_on_Same_Note_1 Bravura_reference
current
canvas_PedalMarking Release_and_Depress_on_Same_Note_2 Bravura_current
reference
canvas_PedalMarking Release_and_Depress_on_Same_Note_2 Bravura_reference
current
canvas_PedalMarking Simple_Pedal_2 Bravura_current
reference
canvas_PedalMarking Simple_Pedal_2 Bravura_reference
current
canvas_PedalMarking Simple_Pedal_3 Bravura_current
reference
canvas_PedalMarking Simple_Pedal_3 Bravura_reference

@rvilarl rvilarl requested a review from mscuthbert June 10, 2024 05:56
@mscuthbert
Copy link
Collaborator

Whatever the last note specified in the bracket should be included but it's hard to see how this interacts with the pedal up mark when both are used together.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Jun 10, 2024

Whatever the last note specified in the bracket should be included but it's hard to see how this interacts with the pedal up mark when both are used together.

Do you mean in the images above or in the code?
Are the images better now?

@jaredjj3
Copy link

@rvilarl, in the example in 0xfe/vexflow#1611, there are two voices. Would you make sure it works when there's another voice that causes additional area behind the last note the pedal is attached to?

image

@rvilarl
Copy link
Collaborator Author

rvilarl commented Jun 10, 2024

@jaredjj3 tests with two voices added :)

canvas_PedalMarking Simple_Pedal_1b Bravura
canvas_PedalMarking Simple_Pedal_2b Bravura
canvas_PedalMarking Simple_Pedal_3b Bravura
canvas_PedalMarking Release_and_Depress_on_Same_Note_1b Bravura
canvas_PedalMarking Release_and_Depress_on_Same_Note_2b Bravura

@jaredjj3
Copy link

Wow, that looks so good! LGTM and I agree that would close my issue.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Jun 11, 2024

Whatever the last note specified in the bracket should be included but it's hard to see how this interacts with the pedal up mark when both are used together.

Do you mean in the images above or in the code? Are the images better now?

@mscuthbert what is the meaning of your statement? Should I comment the code?

@mscuthbert
Copy link
Collaborator

When there is a pedal release sign (looks like *) the pedal symbols should end before the note marked with *. Otherwise the symbol should go to the end of the note's "area" but in any case it is better to have the pedal mark extend to the end of some note rather than end with the notehead.

I don't know if Vexflow should be automatically eliding the common case of pedal up and immediately back down. See Gould for examples

@rvilarl
Copy link
Collaborator Author

rvilarl commented Jun 11, 2024

@mscuthbert I have refactored the class to follow fix the alingment. Is that as expected?

canvas_PedalMarking Custom_Text_1 Bravura_current
canvas_PedalMarking Custom_Text_2 Bravura_current
canvas_PedalMarking Simple_Pedal_1 Bravura_current
canvas_PedalMarking Simple_Pedal_2 Bravura_current
canvas_PedalMarking Simple_Pedal_3 Bravura_current
canvas_PedalMarking Release_and_Depress_on_Same_Note_1 Bravura_current
canvas_PedalMarking Release_and_Depress_on_Same_Note_2 Bravura_current
canvas_PedalMarking Simple_Pedal_1b Bravura
canvas_PedalMarking Simple_Pedal_2b Bravura
canvas_PedalMarking Simple_Pedal_3b Bravura
canvas_PedalMarking Release_and_Depress_on_Same_Note_1b Bravura
canvas_PedalMarking Release_and_Depress_on_Same_Note_2b Bravura

@mscuthbert
Copy link
Collaborator

Yes, looks very good -- good enough to merge.

The two-voice(?) on one staff measures are currently non-sensical because of the incorrect stem-directions; I can't really judge how well the pedal marks are being rendered because my eyes can't figure out why 8 quarter notes are in one 4/4 measure.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Jun 13, 2024

@mscuthbert stems adjusted to avoid shift of notes

canvas_PedalMarking Simple_Pedal_1b Bravura
canvas_PedalMarking Simple_Pedal_2b Bravura
canvas_PedalMarking Simple_Pedal_3b Bravura
canvas_PedalMarking Release_and_Depress_on_Same_Note_1b Bravura
canvas_PedalMarking Release_and_Depress_on_Same_Note_2b Bravura

@rvilarl
Copy link
Collaborator Author

rvilarl commented Jun 22, 2024

@mscuthbert is this now fine? look images above

@mscuthbert
Copy link
Collaborator

These look fantastic. I'd suggest clicking the Merge Button!

@rvilarl rvilarl merged commit 21d2e9e into vexflow:main Jun 28, 2024
1 check passed
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.

Make PedalMarking boundaries configurable
3 participants