Re: \cadenzaOn: clefs, key signatures on line breaks

2018-05-13 Thread Robert Kubosz
Hi Thomas!

I added the post via web page with use of  markup. It looks like the mail
engine ignored it. Nevermind, I repost the example:

\version "2.19.81"

\relative f' {
\clef treble
\key f \major
\repeat unfold 10 f4
\break
\repeat unfold 10 g4
\cadenzaOff
}
\layout {
\context {
\Staff
\remove Time_signature_engraver
\remove Bar_engraver
}
}

@foxfanfare, your snippet showed me, that I needlessly removed bar engraver
and it was the problem. Silly me. Thanks!
Still I have question refering the breaks: is there any other method for
line breaking (preferably auto-breaking)?
Say, I have a snippet:
\version "2.19.81"

\version "2.19.81"

\relative f' {
\clef treble
\key f \major
\cadenzaOn

\repeat unfold 9 {
f4 f f f
\bar"|"
}
\cadenzaOff
}
And it will produce a line with tightly packed notes. Is there some hack,
that it will break automatically the line in cadenza mode, like it happens
in normal mode?





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \cadenzaOn: clefs, key signatures on line breaks

2018-05-13 Thread Thomas Morley
2018-05-13 18:30 GMT+02:00 Robert Kubosz :
> The example below

Hello,

there is no code visible for me in your mail.
Neither here:
https://lists.gnu.org/archive/html/lilypond-user/2018-05/msg00317.html

Please provide plain text mails or attach a file or a link to it.

Thanks,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \cadenzaOn: clefs, key signatures on line breaks

2018-05-13 Thread foxfanfare
Robert Kubosz wrote
> Hello!
> I write a music piece with \cadenzaOn and \cadenzaOff. The example below
> produces output without the clef and key signature after line break. Is
> there a possibility to display them? 
> Also, I have second question: can the lines auto break in cadenza mode?
> 
> With best regards
> Robert

Hi Robert. I don't understand your problem, cadenzaOn will produce the clefs
and time signature after line breaks by default! 
I think your exemple is missing the "cadenzaOn" btw.

\version "2.19.81"

\relative f' {
\cadenzaOn
\clef treble
\key f \major
\repeat unfold 20 f4
\bar "" \break
\repeat unfold 20 g4
\cadenzaOff
}

For the lines, they don't break automatically. You'll have to write an
invisible bar before making the break (see above).

All the best.



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trouble with notation fonts when resizing

2018-05-13 Thread David Sumbler
On Sun, 2018-05-13 at 05:32 -0700, Torsten Hämmerle wrote:
> David Sumbler wrote
> > 
> > [...] whilst \abs-fontsize changes the size of the font, it doesn't
> > apparently alter its spacing.  Perhaps it should, because I can't
> > imagine
> > that anyone would ever find that particular characteristic very
> > useful.
> 
> Hi David,
> 
> Now I see what you mean and this shouldn't happen and I'd call it a
> bug.
> 
> As usual, a minimal (compilable) example would have helped
> enormously.
> Here it is:
> 
> %
> \version "2.19.81"
> 
> \header {
>   title = \markup \abs-fontsize #20 "Absolute Font Size"
> }
> 
> #(set-global-staff-size 18)
>  \book { { b'1 } }
> 
> 
> #(set-global-staff-size 14)
>  \book { { b'1 } }
> 
> 
> #(set-global-staff-size 26)
>  \book { { b'1 } }
> %
> 
> 
>  m.png> 
> 
> \abs-fontsize tries to get all kinds of scaling information via
> ly:output-def-lookup, but apparently not enough for working correctly
> under
> these circumstances.
> 
> All the best,
> Torsten
> 
> All the best,
> Torsten

My apologies for not including my file (similar to yours above) which
illustrated the problem with \abs-fontsize.

Just to complete the circle, as it were, I have now discovered a
downside to using \magnifyStaff.  In the (hopefully) attached image,
you will see that the tenor clef sign in the 1st cello has an enormous
space after it.  I cannot produce a minimal example to illustrate this
problem, because weirdly the size of the space seems to depend on the
number of other staves on the page!  If I remove all the other staves,
the space is still a little big, but not nearly as much as this.  Every
such in-staff change of clef produces a similar result.

Changing back to set-global-staff-size has cured this problem.

Back to the drawing board now for my title pages etc.

David___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


\cadenzaOn: clefs, key signatures on line breaks

2018-05-13 Thread Robert Kubosz
Hello!
I write a music piece with \cadenzaOn and \cadenzaOff. The example below
produces output without the clef and key signature after line break. Is
there a possibility to display them? 
Also, I have second question: can the lines auto break in cadenza mode?

With best regards
Robert





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trouble with notation fonts when resizing

2018-05-13 Thread Torsten Hämmerle
David Sumbler wrote
> [...] whilst \abs-fontsize changes the size of the font, it doesn't
> apparently alter its spacing.  Perhaps it should, because I can't imagine
> that anyone would ever find that particular characteristic very useful.


Hi David,

Now I see what you mean and this shouldn't happen and I'd call it a bug.

As usual, a minimal (compilable) example would have helped enormously.
Here it is:

%
\version "2.19.81"

\header {
  title = \markup \abs-fontsize #20 "Absolute Font Size"
}

#(set-global-staff-size 18)
 \book { { b'1 } }


#(set-global-staff-size 14)
 \book { { b'1 } }


#(set-global-staff-size 26)
 \book { { b'1 } }
%


 

\abs-fontsize tries to get all kinds of scaling information via
ly:output-def-lookup, but apparently not enough for working correctly under
these circumstances.

All the best,
Torsten

All the best,
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trouble with notation fonts when resizing

2018-05-13 Thread David Sumbler
On Sun, 2018-05-13 at 00:59 -0600, Abraham Lee wrote:
> Hi, David!
> 
> On Sat, May 12, 2018 at 10:57 AM, David Sumbler 
> wrote:
> > On Sat, 2018-05-12 at 03:45 -0700, Torsten Hämmerle wrote:
> > > David Sumbler wrote
> > > > 
> > > > set-global-staff-size seems to be very buggy, and the newer
> > > > magnify-
> > > > staff (see Notation Ref. section 4.2.2) is recommended
> > > Hi David,
> > > 
> > > I wouldn't call set-global-staff-size buggy, it's still the way
> > to go
> > > if you
> > > want to change the global stave size.
> > > 
> > > \magnifyStaff is inteded to be used for scaling single staves
> > within
> > > a score
> > > and spacing will behave accordingly.
> > > 
> > > The problem Brent ran into is neither new nor does it come
> > > unexpected: When
> > > using custom fonts (no difference between text and music fonts
> > here),
> > > you'll
> > > have to tell LilyPond which size to use, and consequently you
> > always
> > > had to
> > > scaling factors.
> > > 
> > > Examples:
> > > When changing a document's default fonts by using pango-make-
> > font-
> > > tree,
> > > there should alway be a scaling factor such as
> > > (/ staff-height pt 20)
> > > if you want to use non-standard stave-sizes (i.e. stave-sizes
> > other
> > > than 20
> > > pt)
> > > 
> > > The same holds true for music fonts.
> > > 
> > > Therefore, Andrew's approach is the way to go.
> > > There is a nice  essay on alternative notations fonts
> > >  > lily
> > > pond/>  
> > > by Urs Liska, giving an example:
> > > 
> > > \paper {
> > >   #(define fonts
> > > (set-global-fonts
> > >   #:music "emmentaler"
> > >   #:brace "emmentaler"
> > >   #:roman "Century Schoolbook L"
> > >   #:sans "sans-serif"
> > >   #:typewriter "monospace"
> > >   #:factor (/ staff-height pt 20)
> > >   ))
> > > }
> > > 
> > > In Brent's original post, this #:factor entry was missing and
> > that's
> > > the
> > > reason why the gonville font wasn't properly sized.
> > > 
> > > All the best,
> > > Torsten
> > 
> > The problem I found over a year ago, and rediscovered yesterday is
> > that, even without changing any fonts from the default, using set-
> > global-staff-size more than once in the same input file (but
> > relating
> > to separate output files) causes huge problems with the layout of
> > text
> > in the second (or later) output file.  It is as if using this
> > command
> > sets various parameters, but then using it a second time (for a
> > different output file) does not set those parameters correctly.  I
> > would certainly call that buggy, particularly as the documentation
> > implies that it ought to be set-able independently for every
> > individual
> > \book section in an output file.
> What Torsten says is correct. And while the functionality is
> inconvenient due to its restricted outermost scope, it *does* work
> for every individual \book section with the appropriate order of
> events. What you need to realize is that you need to be explicit
> about this. For example, if I have an input file that has multiple
> \score blocks, but no explicit \book blocks, like this:
> 
> #(set-global-staff-size 16)
> \score { ...}
> 
> #(set-global-staff-size 18)
> \score {...}
> 
> then yes, only the final call to set-global-staff-size will be in
> effect because a \score block is *not* a \book block, so all \score
> blocks are affected and any previous call to set-global-staff-size is
> basically undone by the last one.  
> 
> Now, if you explicitly call \book like this:
> 
> #(set-global-staff-size 16)
> \book {
>   \score { ... }
> }
> 
> #(set-global-staff-size 18)
> \book {
>   \score { ... }
> }
> 
> then you will find that each \score gets the appropriate scaling, the
> first at 16pt and the second at 18pt. Just remember that the last
> call to set-global-staff-size resets both the main staff size and ALL
> the font choices and remains in effect from that point on until re-
> called before another \book block. The downside here is that calling
> a new \book block generates a new output file. So, if you want to
> have each \score inside the same file, you need to be ok with the
> other scaling mechanisms (like \magnifyStaff, etc.). As explained in
> section 4.2.2 of the NR, there's also this option:
> 
> \score {
>   
>   \layout {
>     #(layout-set-staff-size 16)
>   }
> }
> 
> which is supposed to set the staff size for that particular score,
> but I've noticed that some of the horizontal spacing still acts like
> it is using glyphs at the global staff size. See the attached image,
> which has the first \score at the default 20pt and the second at 14pt
> and the third at 26pt. Notice, in particular, the space between the
> clef and key signature and between the key signature and the time
> signature. I'd really love it if this were addressed properly via the
> layout-set-staff-size function. This isn't the only time I've seen
> spacing no

Re: Trouble with notation fonts when resizing

2018-05-13 Thread Abraham Lee
Hi, David!

On Sat, May 12, 2018 at 10:57 AM, David Sumbler  wrote:

> On Sat, 2018-05-12 at 03:45 -0700, Torsten Hämmerle wrote:
> > David Sumbler wrote
> > >
> > > set-global-staff-size seems to be very buggy, and the newer
> > > magnify-
> > > staff (see Notation Ref. section 4.2.2) is recommended
> > Hi David,
> >
> > I wouldn't call set-global-staff-size buggy, it's still the way to go
> > if you
> > want to change the global stave size.
> >
> > \magnifyStaff is inteded to be used for scaling single staves within
> > a score
> > and spacing will behave accordingly.
> >
> > The problem Brent ran into is neither new nor does it come
> > unexpected: When
> > using custom fonts (no difference between text and music fonts here),
> > you'll
> > have to tell LilyPond which size to use, and consequently you always
> > had to
> > scaling factors.
> >
> > Examples:
> > When changing a document's default fonts by using pango-make-font-
> > tree,
> > there should alway be a scaling factor such as
> > (/ staff-height pt 20)
> > if you want to use non-standard stave-sizes (i.e. stave-sizes other
> > than 20
> > pt)
> >
> > The same holds true for music fonts.
> >
> > Therefore, Andrew's approach is the way to go.
> > There is a nice  essay on alternative notations fonts
> >  > pond/>
> > by Urs Liska, giving an example:
> >
> > \paper {
> >   #(define fonts
> > (set-global-fonts
> >   #:music "emmentaler"
> >   #:brace "emmentaler"
> >   #:roman "Century Schoolbook L"
> >   #:sans "sans-serif"
> >   #:typewriter "monospace"
> >   #:factor (/ staff-height pt 20)
> >   ))
> > }
> >
> > In Brent's original post, this #:factor entry was missing and that's
> > the
> > reason why the gonville font wasn't properly sized.
> >
> > All the best,
> > Torsten
>
> The problem I found over a year ago, and rediscovered yesterday is
> that, even without changing any fonts from the default, using set-
> global-staff-size more than once in the same input file (but relating
> to separate output files) causes huge problems with the layout of text
> in the second (or later) output file.  It is as if using this command
> sets various parameters, but then using it a second time (for a
> different output file) does not set those parameters correctly.  I
> would certainly call that buggy, particularly as the documentation
> implies that it ought to be set-able independently for every individual
> \book section in an output file.
>

What Torsten says is correct. And while the functionality is inconvenient
due to its restricted outermost scope, it *does* work for every individual
\book section with the appropriate order of events. What you need to
realize is that you need to be explicit about this. For example, if I have
an input file that has multiple \score blocks, but no explicit \book
blocks, like this:

#(set-global-staff-size 16)
\score { ...}

#(set-global-staff-size 18)
\score {...}

then yes, only the final call to set-global-staff-size will be in effect
because a \score block is *not* a \book block, so all \score blocks are
affected and any previous call to set-global-staff-size is basically undone
by the last one.

Now, if you explicitly call \book like this:

#(set-global-staff-size 16)
\book {
  \score { ... }
}

#(set-global-staff-size 18)
\book {
  \score { ... }
}

then you will find that each \score gets the appropriate scaling, the first
at 16pt and the second at 18pt. Just remember that the last call to
set-global-staff-size resets both the main staff size and ALL the font
choices and remains in effect from that point on until re-called before
another \book block. The downside here is that calling a new \book block
generates a new output file. So, if you want to have each \score inside the
same file, you need to be ok with the other scaling mechanisms (like
\magnifyStaff, etc.). As explained in section 4.2.2 of the NR, there's also
this option:

\score {
  
  \layout {
#(layout-set-staff-size 16)
  }
}

which is supposed to set the staff size for that particular score, but I've
noticed that some of the horizontal spacing still acts like it is using
glyphs at the global staff size. See the attached image, which has the
first \score at the default 20pt and the second at 14pt and the third at
26pt. Notice, in particular, the space between the clef and key signature
and between the key signature and the time signature. I'd really love it if
this were addressed properly via the layout-set-staff-size function. This
isn't the only time I've seen spacing not being honored when the font is
changed to something non-default, but that's for another thread.


> I haven't looked at the source code, and probably wouldn't be able to
> fathom it if I did, but I wonder if set-global-staff-size alters some
> parameters on the assumption that they are at their default values,
> which of course can give a wrong result after a previous cal