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

One-line (etc.) staves have unusual line configuration #1431

Open
mscuthbert opened this issue Aug 30, 2022 · 2 comments
Open

One-line (etc.) staves have unusual line configuration #1431

mscuthbert opened this issue Aug 30, 2022 · 2 comments
Labels

Comments

@mscuthbert
Copy link
Collaborator

Generally a one-line staff is thought of as having the middle line shown, not the lowest or the highest. (This way it goes through the center of the alto or percussion clef). Here is how music21j configures non-5-line staves in Vexflow:

            if (rendOp.staffLines === 0) {
                vexflowStave.setNumLines(0);
            } else if (rendOp.staffLines === 1) {
                // Vex.Flow.Stave.setNumLines hides all but the top line.
                // this is better
                vexflowStave.setConfigForLines([
                    { visible: false },
                    { visible: false },
                    { visible: true },  // show middle
                    { visible: false },
                    { visible: false },
                ]);
            } else if (rendOp.staffLines === 2) {
                vexflowStave.setConfigForLines([
                    { visible: false },
                    { visible: false },
                    { visible: true },  // show offset middle
                    { visible: true },
                    { visible: false },
                ]);
            } else if (rendOp.staffLines === 3) {
                vexflowStave.setConfigForLines([
                    { visible: false },
                    { visible: true },
                    { visible: true },  // show 3 middle
                    { visible: true },
                    { visible: false },
                ]);
            } else {
                vexflowStave.setNumLines(rendOp.staffLines);
            }

There would be some backwards incompatibility, I imagine, but it would create a much better experience.

@rvilarl
Copy link
Collaborator

rvilarl commented Dec 25, 2022

@mscuthbert do you want me to change that? I only use 5 lines staves.

@mscuthbert
Copy link
Collaborator Author

I think so, but it's pretty backwards incompatible, so I'd put it in a 5.0 branch. But yes, people expect a one-line staff to be the middle line (and a 2 line staff to be the middle and one adjacent line -- probably middle and below?; a 3-line staff to be the three middle lines. A four-line staff though should probably be the four lowest lines, since people tend to count from the lowest in chant notation.

@rvilarl rvilarl added the 5.0 label Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants