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

Voice cross stave support in System #1434

Merged
merged 3 commits into from
Oct 16, 2022
Merged

Voice cross stave support in System #1434

merged 3 commits into from
Oct 16, 2022

Conversation

rvilarl
Copy link
Collaborator

@rvilarl rvilarl commented Sep 4, 2022

fixes #1373
ready for review now with more focus. It includes the tests from @AaronDavidNewman

@rvilarl
Copy link
Collaborator Author

rvilarl commented Sep 4, 2022

CrossBeam Single_clef_mixed_1 Bravura
CrossBeam Single_clef_mixed_2 Bravura
CrossBeam Mixed_clef_voice_middle Bravura
CrossBeam Vertical_alignment___cross_stave__beam_down1_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_down2_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_down3_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_down4_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_middle1_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_middle2_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_middle3_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_middle4_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_up1_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_up2_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_up3_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_up4_ Bravura

@rvilarl rvilarl marked this pull request as draft September 4, 2022 08:36
@rvilarl
Copy link
Collaborator Author

rvilarl commented Sep 4, 2022

Ready for review

@rvilarl rvilarl marked this pull request as ready for review September 4, 2022 08:39
@0xfe
Copy link
Owner

0xfe commented Sep 9, 2022

Thanks Rodrigo. This is good start. Re: the first two examples, are they intentionally off?

@AaronDavidNewman
Copy link
Collaborator

I wouldn't say 'intentionally' :) But this is the state of mixed-direction beam currently. Vex flow has always allowed mixed direction on a single staff, but there are no test cases for it. It seems logical to include them with the cross-beam stuff.

Additional bugs/PRs can be opened against the those issues. I would expect more than one change will be required.

@sschmidTU
Copy link
Contributor

sschmidTU commented Sep 9, 2022

@0xfe Rodrigo mentioned in an earlier PR that these stem mismatch issues are outside the scope of the PR, they already existed before and will be handled separately.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Sep 9, 2022

This is right. The aim of this PR is simply to allow System to work with a Voice whose Notes are located on different Staves. The tests are there to show the issues related with the representation of these Voices. These issues will have to be solved in future PRs.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Sep 11, 2022

Thanks Rodrigo. This is good start.

@0xfe Well this is not really a start, this started 5mo ago with #1373 there was also anther previous PR. It would be nice to get it through. I am happy to make changes if required.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Sep 24, 2022

Let us progress with this one this weekend 💪 and make a new release 🥳 !

src/voice.ts Show resolved Hide resolved
@rvilarl
Copy link
Collaborator Author

rvilarl commented Sep 27, 2022

I decided to make a minimal change to Beam based on the work done by @Silverwolf90 in #97 to get a better representation of the cross beams. I hope that this improves the acceptance of this PR :)

@rvilarl
Copy link
Collaborator Author

rvilarl commented Sep 27, 2022

Current output with the beam code change:
CrossBeam Single_clef_mixed_1 Bravura
CrossBeam Single_clef_mixed_2 Bravura
CrossBeam Mixed_clef_voice_middle Bravura
CrossBeam Vertical_alignment___cross_stave__beam_up1_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_up2_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_up3_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_up4_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_down1_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_down2_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_down3_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_down4_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_middle1_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_middle2_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_middle3_ Bravura
CrossBeam Vertical_alignment___cross_stave__beam_middle4_ Bravura

@rvilarl
Copy link
Collaborator Author

rvilarl commented Sep 27, 2022

Ready for review :)
@AaronDavidNewman #97 has some test cases that you might want to add to crossbeams tests

@rvilarl rvilarl requested a review from ronyeh September 27, 2022 18:45
@rvilarl
Copy link
Collaborator Author

rvilarl commented Oct 5, 2022

@AaronDavidNewman I believe that you have tested already the system.ts related changes of this PR. Any issues? Did you realise that I also changed beam.ts fixing the stem related rendering problems? See outputs above.

@AaronDavidNewman
Copy link
Collaborator

no I haven't been paying attention. I'll try to add some of the cases from the other issue, if that's what you need. Def. looks better with the beaming change.

I haven't spent any additional time with system.ts but I haven't been able to find a better way to do it with a single structure. We need to keep track of which notes are on which stave somehow.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Oct 6, 2022

no I haven't been paying attention. I'll try to add some of the cases from the other issue, if that's what you need. Def. looks better with the beaming change.

Hi Aaron, just add additional tests, if you think that they would help to find issues.

I haven't spent any additional time with system.ts but I haven't been able to find a better way to do it with a single structure. We need to keep track of which notes are on which stave somehow.

What else do we need? The notes already store the stave that they are connected to.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Oct 9, 2022

@0xfe is there a problem with this PR? I have the feeling that I have not been able to explain properly its aim. I also fixes the beams 🙂

@AaronDavidNewman
Copy link
Collaborator

@0xfe I think we should merge it. It doesn't break anything, it gives us some additional capabilities. I don't think it introduces any unnecessary complexity in the code or the interface. So....why not?

I've already merged the change into Smoosic branch, but I haven't figured out how to work x-stave in the Smoosic UI yet.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Oct 16, 2022

@AaronDavidNewman I contacted Mohit by email and he confirmed that with your go I can merge, let us do it!

@rvilarl rvilarl merged commit 6792351 into 0xfe:master Oct 16, 2022
@rvilarl rvilarl deleted the refactor/system3 branch December 27, 2022 08:11
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.

Design issue: Notes in a voice cannot be placed on different staves (using System)
5 participants