-
Notifications
You must be signed in to change notification settings - Fork 51
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
ABC scores - last line scaled larger #428
Comments
Can you try _026? |
Have you pushed it to github? Latest seems to be _025. |
It's _027 now. |
_027 seems to fix last line scaling, but with changed behaviour overall. It looks like the first line/s are now scaled up to be the same size as the last line: Wichita_Lineman_027.pdf Previously, I think the last line was scaled down to match the preceding lines. Testing this against a few other songs confirms that scores now occupy more space than previously. For example: from:
|
This is getting tough... Image assets like ABC are processed into PDF objects at the beginning of the PDF output phase of the song. Some image assets (like ABC) are processed to a specific page width. On A4 paper with 40pt margins the page width is 515pt. If you place the diagrams to the right, the effective page width gets smaller, 449pt for a single column of keyboard diagrams. Smaller output with ABC generally means you get more staves with less measures. But imagine the same asset to be used on the first 439pt page and on another 515pt page... In dev_027 I changed to using the smaller width for processing the assets. I think a better approach is to use the normal page width and apply an additional scale (in this case 449/515 = 87%) to assets on the first page. |
Ah, that makes sense. I can see how ABC processing of a narrower page width (with _027) would force the score on to more lines. Personally, I'm usually squeezing a short riff or motif score into a small space on a single-page sheet so, the more compact, the better (within reason) for my usage. I'd certainly welcome what you suggest (ABC layout for wider page, then scale down), which I guess was the previous approach. That would save me some time-consuming re-tweaking of ABC layout parameters and |
Can you try dev_029? I hope I didn't break other images (fingers crossed...). |
Great. _029 behaving almost as previously/expected. One observation: there's more space between staves than previously, although I can restore previous behaviour by including However, it does mean that multi-page score are now spaced (vertically) more loosely than previously: I can see in the second (_029) that p2 stave height is a little greater than p1, because images are scaled up to full page width. However, it looks like the stave-to-stave spacing is the same on both p1 and p2, which means p1 stave spacing is greater than previously, and disproportionately large. As it runs over two pages, the I'm guessing it's maybe a need to reflect the scaling factor in vertical positioning/spacing measurements when the score is scaled down to fit alongside diagrams? |
True. I'll take a look. You are aware that if you have a song with one staff on the first page and the other staff on the next page, the staffs will have different sizes? Do we want that? |
I noticed that larger p2 scaling with the Don't Get Around Much (_029) example, but it's just a test sample. Nearly all my scores are short motifs that fit within one page, so I don't have a strong view, but maybe err toward consistent scaling, even if narrower. There may be other users who use longer scores and have views on this. Two possible arguments for continuation pages having the same scaling as the first page (I think that's current 6.060 behaviour):
On the other hand, maybe there are established standards for readable score sizes? Although that's already compromised if p1 is scaled smaller. I doubt it's worth the effort of achieving both consistent scaling and full-width continuation pages, when it's limited to the |
I'm not sure if this is related, but I noticed with dev_029 that a Lilypond score now seems to have more space beneath it. Running the song source with default configs and Comparing the two side-by-side, I notice that the comment below the score has the same vertical positioning in each case. That maybe suggests that the scaled-down score (diagrams right) is still being allocated the same amount of vertical space as the unscaled one (diagrams bottom), rather than also scaling down the vertical size of the score area. Having figured that out, it does now seem quite similar behaviour to the extra spacing between split ABC staves on pages with diagrams right. |
One of the recent changes (I suspect the "Centered chord" commit) introduced an error in the vertical spacing. I'll look into it. |
Another, possibly related behaviour change is alignment of the 'horizontal rule' in these examples: It's created using code adapted from your '1-pixel image':
With release version, it's been 100% of available width (excluding diagrams on right) and so it's irrelevant whether it's aligned left or centre (because it's 100% width). With dev_029 we seem to have the odd situation that it scales correctly to 100% of available width (i.e. excluding diagrams), but then seems to be centred within page body width (margin to margin). For my own practical purposes, I can easily fix this by adding |
OK, so assuming these are two different ways of interpreting Personally, it's not a case that's arisen for me, and I'd be inclined to put chords at the bottom of the page, but guess that's simply the Rationale For a 'playing' approach, I assume readers probably know the chords, but not the song, so better to get straight into the song, but still making chord diagrams available for reference (e.g. at bottom). With chord diagrams appearing between score image and song body layout (left), it seems to serve neither of those aims. Also, it creates a bit of cognitive friction, because the chord diagrams create an 'obstruction' between the later verse lyrics and the score, so it's just a little harder to flick the eye back up to the melody from verse 2/3. In essence, I think there's a logic in keeping 'what you play' as one coherent body, and placing the 'how to play it' (e.g. diagrams) somewhere else, such as top or bottom. I've noticed discussion of a top/centred diagrams feature, and think the right example (6.05) might also fit better with that aesthetic. |
Thanks. As usual, your opinions and rationales are very valuable. |
Hi Alyn, I've been busy with other things (GUI redesign) so it took a while. I've fixed several problems w.r.t. the images. Can you please try _054 to see if it improved? |
No problem. I'm using release version for songbook updates, so can (properly) treat dev version as only for testing. Initial testing (with _057) suggests that extra space between staves is now gone, so matches release behaviour again. I had a few other instances of unexpected scaling behaviour (some described above), so I'll work through those today/tomorrow. |
OK, looking over a collection of songs with short scores for riffs/motifs, some scale smaller (for same
It seems like stave height output with dev _057 is about 86% of height from release version. That seems to correspond roughly to the ratio of available width to full page width. This seems to relate to earlier discussion. These purely largely testing observations, rather than an issue. If this is the logical consequence of your work to produce more robust score scaling, I can easily work through my scores to change the scaling factor. An interesting, but maybe unrelated observation: I'd been using |
One more interesting case... Release output: Don_t_Get_Around_Much_Anymore_release.pdf However, if I cut out the early verses, so there's plenty of space for the score, both versions produce identical output, with the score mid-way up the page. So it seems like the score's being wrongly judged too big for the remaining space. My hypothesis: The score has However, it seems I can work around this. If I set So, as an experiment (with That is, it seems like the fourth line's height it assessed based on full-width scaling, not as scaled down to fit alongside diagrams right, and the unscaled line is judged too high for the remaining space. That seems to confirm my hypothesis. |
Given that the last case mentioned involves a very specific set of conditions (including my various settings) that leave only just enough space at the bottom of the page, I've created a version that demonstrates the behaviour with simpler config settings. That might make it easier for you to reproduce the behaviour.
|
Thanks for the testing. I'm glad it works out nice. As for the veritcal alignment of inline ABC phrases: The intention is that the lowest line of the staff is considered baseline.
will yields what one intuitively would expect (regardless of scale). Unfortunately there was a bug in the abc2svg that shipped with 6.060 that prevented this from working so the images were aligned to the bottom. |
In fact, I detect that the line after scaling is >= the width, so I leave it left aligned.
Good.
I think this is best. Consider a score on the 1st page with a full line shifted to page 2. Page 2 also contains another score with full lines. Then it is either (--- is page break) different scalings on the same page:
or different scaling after page break but consistent on the page:
Correct. |
It's not that hard to reproduce. One more lyrics line and it shifts to the next page. Initially still scaled ☺ so I needed to fix that, too. _058 should do better. |
Sorry for slow response on this. Multi-line scores now seems to work more nicely, and don't split across pages when they don't need to. I still get short scores scaling smaller in dev _060 compared to release version, as mentioned above. Can you confirm this is now intended behaviour, and follows from scaling principles for diagrams on right? If so, I can revise scaling values for my various score snippets, but will hold off if this change isn't yet stable. Current dev behaviour does seem to make sense. I can see from this set of outputs |
In _065, the extra scaling is only applied if necessary. Is this better? |
Thanks Johan. I didn't have a strong view personally, but this saves me re-scaling many short scores. It's maybe a preferable approach because it's both consistent with release behaviour, and means that shorter scores will stay the same size regardless of diagrams' position. Now, I see only one other behavioural change from release, but it seems to be a useful one that's worth keeping... A few longer scores now scale larger with _065 than release version. They'd normally run close to available page width (excl. diagrams), and also have manual If I adjust the scaling to bring their sizes back in line with release version (and same stave height as other scores), I find that needs So, I think ChordPro is doing something quite smart and useful: maybe it's taking my manual scaling into account before assessing the the image size in relation to the available width. If my scaling already means the image will fit, no need to apply any further, automatic scaling. I don't know if that reasoning is correct, but the practical implication is very useful: I can now apply the same |
My apologies, I've only just spotted that the original issue seems to have returned, I think with dev _065 (and now _067). I tried to make testing more methodical, so I think these examples cover the main scenarios. Main issue now seems to be example D), last line scaling larger. It goes away if I use the Maybe this is a side-effect of the 'smart' scaling feature: the first three lines are page-with so get auto-scaled, but the last line fits available space, so doesn't get scaled. Also, example B) is an interesting consequence of 'smart' scaling, but a logical consequence of the principles, so I don't think it's a problem. |
Behaviour is reminiscent of an earlier issue.
Wichita_Lineman.cho.txt,
processed with
-X --define pdf.kbdiagrams.show=right --config keyboard
gives meWichita_Lineman_kbdiag_right.pdf
It's clear that the second line is scaled larger than the first. The
split=0
workaround, used previously, also works here.The issue also goes away if I have diagrams at the bottom (default): Wichita_Lineman_kbdiag_default.pdf
So, I wonder if the width of the diagrams column on the right is somehow affecting scaling calculations?
Behaviour observed with both release version 6.060 and dev _003.
The text was updated successfully, but these errors were encountered: