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

Beaming - Slope #1579

Open
mscuthbert opened this issue Jun 24, 2023 · 2 comments
Open

Beaming - Slope #1579

mscuthbert opened this issue Jun 24, 2023 · 2 comments

Comments

@mscuthbert
Copy link
Collaborator

Beams applied to notes that are far apart and require stem extensions end up sloping in the wrong direction:

Screenshot 2023-06-23 at 19 09 11 Screenshot 2023-06-23 at 19 09 34

the problem gets worse the farther the notes are off the staff or apart.

I spent about an hour trying to diagnose the problem today, but ran into wall after wall, until a "pre-problem" hit me and that's where I stopped today:

Beam.slope is backwards (regardless of stem direction) -- a positive Beam.slope value slopes DOWNWARD from left to right, while a negative Beam.slope value slopes UPWARDS! This explained why I couldn't diagnose the problem -- all the outputs from various routines kept looking sane, until I realized at the end that the slopes are pointing in the wrong direction.

This misuse of "slope" is probably where the bug crept in -- someone (could've been me...) notices a problem in a particular case and fixes it not realizing that the slope is backwards from what it should be.

I'm willing to work on the problem since it affects my software, but first wondering: for Vexflow 5, can I switch slope so that positive slopes slant upwards and negatives slant downwards? This will likely help me find the bug.

Most use of slope is on private or protected variables, but there are a few places where slope is exposed.

Myke

@AaronDavidNewman
Copy link
Collaborator

I think it makes sense to have beam slope terminology follow the stem in terms of which way is up (higher on the screen). It's always confusing because 'up is down' in many logical ways (y coordinate for instance).

@mscuthbert
Copy link
Collaborator Author

Ah that does make sense. Maybe it just needs a comment on various places.

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

No branches or pull requests

2 participants