[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Randomness in layout
From: |
Thomas Morley |
Subject: |
Re: Randomness in layout |
Date: |
Sat, 22 Aug 2015 00:30:54 +0200 |
2015-08-21 21:37 GMT+02:00 David Kastrup <address@hidden>:
> tisimst <address@hidden> writes:
>
>> On 8/21/2015 5:40 AM, Andrew Bernard [via Lilypond] wrote:
>>> ...
>>> I am sorry this is not the technical answer you require, but part of
>>> your answer is that lilypond can't irregularise (I am going to make
>>> this a new word) scores, out of the box, as it stands now.
>>
>> Andrew and Sharon, et al,
>>
>> To say that it can't do this "out of the box" is definitely true. To say
>> that it just plain "can't" is definitely NOT true. I created a
>> stylesheet that applied the irregularization (ha! I created a new word
>> based on yours!) to just about everything--clefs, noteheads, stems,
>> flags, slurs, etc--to give it that human-touched feel. It worked pretty
>> well. There was one oddity I encountered in the process, though. When I
>> irregularized the flags, I noticed that a flag is printed for EVERY note
>> within the same chord! Crazy, I know. Sounds like an unnecessary thing
>> if you ask me.
>
> Sounds like an undiscovered bug if you ask me.
>
>> that is where you see the glyph multiplicity. Under "normal" usage,
>> this isn't a problem. But still, it seems like something that isn't
>> needed.
>
> If nothing else, it is costly. And it messes up antialiasing in PDF
> previewers if you overprint material repeatedly (it gets fatter). And
> likely increases PDF size.
>
> --
> David Kastrup
Looks like an unwanted/unnoticed problem with
https://code.google.com/p/lilypond/issues/detail?id=1843
https://codereview.appspot.com/4922042/#ps11001
To make it visible I wrote the following code for 2.14.2 (before
patch) and 2.16.2+ (after patch)
Switch between them by commenting the other part to compare.
2.16.2-version works up to now
Obviously, for the 2.14.2-version you need a working 2.14.2 (or trust me) ;)
pngs attached
%%%%%%%%%%%%
%% "2.19.25"
%%%%%%%%%%%%
%%{
\version "2.16.2" %% and higher
{
\override Staff.StaffSymbol #'after-line-breaking =
#(lambda (grob)
(let ((flags
(filter
(lambda (f) (grob::has-interface f 'flag-interface))
(ly:grob-array->list
(ly:grob-object
(ly:grob-system grob)
'all-elements)))))
(display flags)
(for-each
(lambda (f e-o c)
(ly:grob-set-property! f 'extra-offset (cons e-o e-o))
(ly:grob-set-property! f 'color c))
flags
(iota 5 0.5 0.5)
(list red green cyan yellow))))
<
c'
e'
g'
c''
>8
_\markup #(lilypond-version)
}
%}
%%%%%%%%%%%%
%% "2.14.2"
%%%%%%%%%%%%
%{
\version "2.14.2"
lyV = #(lilypond-version)
{
\override Staff.StaffSymbol #'after-line-breaking =
#(lambda (grob)
(let* ((stems
(filter
(lambda (f) (grob::has-interface f 'stem-interface))
(ly:grob-array->list
(ly:grob-object
(ly:grob-system grob)
'all-elements))))
(flags (map (lambda (g) (ly:grob-property g 'flag)) stems)))
(display flags)
(for-each
(lambda (st e-o c)
(set!
(ly:grob-property st 'flag)
(stencil-with-color
(ly:stencil-translate
(ly:grob-property st 'flag)
(cons e-o e-o))
c)))
stems
(iota 5 0.5 0.5)
(list red green cyan yellow))))
<
c'
e'
g'
c''
>8
_\markup { \lyV }
}
%}
I'd call it a bug, thus cc-ing bug-list.
Cheers,
Harm
P.S. I forgot how cumbersome this was back in 2.14.2 (and before) ...
I refused to test 2.12.3. Not likely to find anything different from
2.14.2 in this regard and even `ly:grob-array->list' wasn't defined in
the Bronze Age.
flag-bug-2-16-2.png
Description: PNG image
flag-bug-2-14-2.png
Description: PNG image
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Randomness in layout,
Thomas Morley <=