Solid hooks with custom dashed lines

• Apr 17, 2019 - 22:19
Reported version
P2 - Medium
S5 - Suggestion

When a custom line is defined with large gaps between dashes (eg, gap 20, dash 5), then the hooks are barely visible. The need for such custom lines arises with ottavas that encompass a large number of bars. It would be very helpful to have the option of specifying a continuous hook for use with a dashed line.


Priority P2 - Medium

It is of course possible to add a new setting for this, but older versions wouldn't read it. I wonder if maybe it's better to just ignore the custom line style setting for the hook? Or do some calculation to take hook length into consideration? Would be nice to see some real world published examples to get a sense of what established practice is.

Hmm, I see the change, but it doesn't quite work. It partially works in the specific case where there is start and and end hook - the end hook will be drawn solid, but the start will not. And if there is an end but no start, or start but no end, neither gets drawn solid.

Without an option to keep the current behavior, this is a problem at the other extreme from not being able to see the hook due to too much spacing. I've never seen solid hooks.

Could you elaborate on what you mean by not being able to see the hook due to too much spacing? Also aren't the two examples above examples of solid hooks and dashed lines? And let ring and palm mute are lines I usually always see with solid hooks. In any case it shouldn't be too difficult to allow dashed hooks too, but I have never seen dashed hooks before so I thought we could save on the clutter since the Text Line inspector is already really full. Thank you for the feedback though!

Ottavas always have dashed lines and dashed hooks. Every time I've seen a dashed line it has a dashed hook. The problem I'm aware of is that if you set the spacing too wide, no hook is often shown.

Looking at the examples here as well as checking Gould and my own score library, what I see is many ottavas have wide enough dashes and a short enough hook that there is no difference between solid and dashed. That is, the length of the hook is the length of the dash. But others do have longer hooks, and those are dashed. Gould doesn't specify a length, but hers are in that so-short-there-is-no-difference category does specifically say to use a right angle at the end - the last dash of the line should connect to the hook. That's a detail we currently don't worry about.

The issue with the hook not being visible if you have short dashes and spacing wider than your hook length seems like a case of you getting what you ask for. I'm not convinced we should do anything special here. I guess we could always draw a second dash even the spacing indicates we shouldn't.

I think you you enforced the vertical dash being connected to the horizontal line and started there to decide if you want another line on the hook or just draw a default 5/5 custom dashed line from there it would be sufficient. To be clear, I would try to draw the other line, then if there was nothing significant drawn (a 2 pixel line would be an example of insignificant), I would revert to the default hook.

My proposal is to not get too fancy. For the built-in line types, just draw the hooks same as the lines. For custom style, the simplest answer could be to just use a regular dashed style for the hooks. I'm wondering if there real world situations where people really need the custom spacing for the hook? If so, maybe play with the calculation of the gap length, doing whatever math is needed to make sure the line gets drawn in a way that results in the final dash ending at the hook end point. In fact, that's not a bad idea even for the regular line. That is, for gaps larger than the default, maybe we should reduce them by whatever amount is required to make the last dash end at the end point? Really, this is an issue sometimes as it is - it's quite possible with a wide gap specified, the line will end well short of where it should.

Wait can I get an example of hooks not being visible? I have submitted a new "improvement", but it's not really much different than how line drawing works on master. Other than start hooks, I can't really find an issue of hooks being almost invisible. Is it just these start hooks?

Right. The point is you'll always get the first dash, but then if the gap is so wide that you never get a second dash, the hook is practically non-existent. That's why I'm saying a solution could be, when using custom dashed lines, to always force the final dash, perhaps scaling the gaps accordingly. And as I said, really, we should be doing this for the line too, not just the hook.

Alright I'm working on that now, it's a bit messy as it is since 90 degree hooks are drawn solid, hooks are drawn each with their adjusted dashed line, and lines are drawn also with their own adjusted dashed line.

I have completed a solution that I think works well and creates a consistent look for different custom patterns. The only issue is that it's a lot of code for the calculations, but it behaves well based on my tests so far.

Fix version