Re: \bookparts and scaling (Karlin High)

2018-07-01 Thread David Kastrup
Torsten Hämmerle  writes:

> This being said, I agree with you that we need something that lets us
> create differently-sized scores within a \bookpart that look as if
> #(set-global-staffsize …) was used. Ideally, layout-set-staff-size
> would be able to accomplish this, which isn't the case yet and
> therefore, to me, the current layout-set-staff-size doesn't make too
> much sense.

I am not sure: it might make sense for score markups inside of a score
since they similarly might have to match the spacing of the surrounding
score.  However, this could now be considered the problem of \staffSize
and it might make more sense to use layout-set-staff-size for the
complete deal.

I don't think that, whatever its original intent was, it is being used
significantly for anything these days.

-- 
David Kastrup

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


Re: \bookparts and scaling (Karlin High)

2018-07-01 Thread Torsten Hämmerle
Karlin High wrote
> The effect of that \staffSize function looks slightly different than 
> using layout-staff-size. But for me it still shows the same problem: it 
> makes things smaller, but doesn't change the layout like 
> set-global-staff-size does.


Hi Karlin,

The proposed function \staffSize just basically does what the standard
procedure for changing all font sizes (by \set fontSize) changing
staff-space did before \magnifyStaff came up.

The intention behind it was to create differently-sized (usually smaller)
*single* staves within a score, as for example a piano score with a solo
instrument stave in smaller print.
In this case, it's not a bug at all to not alter the overall spacing, since
the smaller-sized notes, clefs, time signatures, key signatures, etc. have
to be horizontally aligned to the rest of the standard-size staves.
The main staves of the score, so to say, will still determine the overall
spacing, and that ist correct and expected behaviour.

Therefore, we need to differentiate between scaling up/down singular staves
in a score and up-/downscaling a complete score with bag and baggage.

This being said, I agree with you that we need something that lets us create
differently-sized scores within a \bookpart that look as if
#(set-global-staffsize …) was used. Ideally, layout-set-staff-size would be
able to accomplish this, which isn't the case yet and therefore, to me, the
current layout-set-staff-size doesn't make too much sense.

All the proposals made so far actually do scale the staves, but don't get
the overall spacing right (both vertically and horizontally).

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:\bookparts and scaling (Karlin High)

2018-06-30 Thread Cynthia Karl

> 
> Message: 2
> Date: Fri, 29 Jun 2018 13:18:18 -0500
> From: Karlin High 
> To: lilypond-user@gnu.org, David Wright ,
>   crimsonsunr...@protonmail.com
> Cc: torsten.haemme...@web.de, David Kastrup 
> Subject: Re: \bookparts and scaling
> Message-ID: 
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> On 6/29/2018 10:46 AM, David Wright wrote:
>> software is more like a work of art that has to be sculpted into perfection,
>> which takes time, trouble and effort.
> 
> Okay, moving in that direction.
> 
> The documentation could be updated to better reflect the current state 
> of these staff-size commands.
> 
> Or, would it be possible to have a command that does what the OP 
> expects? Namely, applying the effect of set-global-staff-size to 
> bookparts individually and independently, whether via 
> layout-set-staff-size or something else.
> 
> I can poke around some more at that 
> layout-set-absolute-staff-size-in-module thing in paper.scm, but it 
> would be nice to have some input from someone who actually understands 
> these internals, about whether that approach is likely to succeed.

Unfortunately, I cannot claim to be that someone who actually understands these 
internals.  However, ever since someone posted a scheme function called 
“staffSize”, I have no problems with staff sizes.

Here is the staffSize function:

% Define staves, e.g., so:  \new Staff \with {\staffSize #4 } 

staffSize = #(define-music-function (new-size) (number?)
#{
  \set fontSize = #new-size
  \override StaffSymbol #'staff-space = #(magstep new-size)
  \override StaffSymbol #'thickness = #(magstep new-size)
#})

An example of its usage:

music = { … }

\score {
  new StaffGroup \with { \staffSize #0 } <<
\new Staff \with { \staffSize #4 } \music
\new Staff \music
\new Staff \with { \staffSize #-4 } \music
  <<
}

This score block will produce a pdf with a group of three staves, the first one
at 24 pts, the second one at the default 20 pts (inherited from the StaffGroup 
\with
block), and the third one at 16 pts.

It appears that each occurrence of \score in a book resets the staff size to 
the default 20 pts.



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


Re: \bookparts and scaling

2018-06-29 Thread Karlin High

On 6/29/2018 10:46 AM, David Wright wrote:

software is more like a work of art that has to be sculpted into perfection,
which takes time, trouble and effort.


Okay, moving in that direction.

The documentation could be updated to better reflect the current state 
of these staff-size commands.


Or, would it be possible to have a command that does what the OP 
expects? Namely, applying the effect of set-global-staff-size to 
bookparts individually and independently, whether via 
layout-set-staff-size or something else.


I can poke around some more at that 
layout-set-absolute-staff-size-in-module thing in paper.scm, but it 
would be nice to have some input from someone who actually understands 
these internals, about whether that approach is likely to succeed.

--
Karlin High
Missouri, USA

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


Re:\bookparts and scaling

2018-06-29 Thread Flaming Hakama by Elaine
> -- Forwarded message --
> From: crimsonsunr...@protonmail.com
> To: torsten.haemme...@web.de, "lilypond-user@gnu.org" <
> lilypond-user@gnu.org>
> Cc:
> Bcc:
> Date: Thu, 28 Jun 2018 20:24:17 -0400
> Subject: Re: \bookparts and scaling
>  Mensagem Original 
> Ativo 28 de jun de 2018 19:15, Torsten Hämmerle < torsten.haemme...@web.de>
> escreveu:
>
> Flaming Hakama by Elaine wrote
> > I was unfamiliar with the next one, which might do the trick:
> >
> > To set the staff size for a single score within a book, use
> > layout-set-staff-size inside that score’s \layout block:
> >
> > \score {
> > …
> > \layout {
> > #(layout-set-staff-size 14)
> > }
> > }
>
>
> Hi Elaine,
>
> Yes, that's the way it should be done according to the documentation, but
> the general concern is that this will considerably change the overall
> spacing, see attached image:
>
>
>
> All the best,
> Torsten
>
> 
>
> If you combine both, say, you do global-set-staff-size, then try to change
> the size using layout-staff-size in something like a different book part,
> that will only enlarge the fonts, notes, articulations and text. The staff
> size will remain the same as what was set by global-set-staff-size.
>

Good point, I did not notice that issue.

In terms of a workaround,
It seems like if only the book-level set-global-staff-size works,
then the approach I'd suggest is to just build three books
then use another tool to combine them, like the python-based PyPDF2.


% File: example.ly

\version "2.19.81"

#(set-default-paper-size "a6")

fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }

\book {
  \bookOutputSuffix "Score"
  \header { instrument = "Full Score" }
  \score {
\new StaffGroup <<
  \new Staff \with { instrumentName = "Fl. 1" } \fluteI
  \new Staff \with { instrumentName = "Fl. 2" } \fluteII
>>
  }
}


\book {
  \bookOutputSuffix "Flute-1"
  \header { instrument = "Flute 1" }
  \score {
\new Staff \fluteI
  }
}


\book {
  \bookOutputSuffix "Flute-2"
  \header { instrument = "Flute 2" }
  \score {
\new Staff \fluteII
  }
}



%{

% Install python if you don't already have it...
% Install PyPDF2 from https://github.com/mstamy2/PyPDF2
% let's assume at ~/PyPDF2

% From the command line, first run lilypond on your source file example.ly,
$ lilypond example.ly

% then run the pdfcat utiltity to combine the files
$ python ~/PyPDF2/Scripts/pdfcat -o example.pdf example-Score.pdf
example-Flute-1.pdf example-Flute-2.pdf

%}



HTH,

Elaine Alt
415 . 341 .4954   "Confusion is
highly underrated"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-29 Thread David Wright
On Fri 29 Jun 2018 at 09:02:12 (-0400), crimsonsunr...@protonmail.com wrote:
> Ativo 29 de jun de 2018 06:55, Torsten Hämmerle escreveu:
> The documentation, unfortunately, has not been updated yet and still claims
> that the distance between lines didn't change:
> "*Known issues and warnings*
> layout-set-staff-size does not change the distance between the staff lines."

> Which is why I stated before that the documentation lies to the user.

It's not very productive to say that any documentation that goes out
of date (as so much does) is "lying". That word implies a deliberate
attempt to deceive.

> Moreso, these functions shouldn't even have similar names. As that single 
> line at the end states, layout-staff-size doesn't change the distance between 
> staff lines, so you're not resizing the staff completely. Why that is the 
> case and why it was implemented that way is anybody's guess.

That's why the line appears under the heading "Known issues and warnings".

You seem to think that a large software project should just
miraculously appear, fully formed and perfect, with precise,
comprehensive documentation. Unfortunately, software is more
like a work of art that has to be sculpted into perfection,
which takes time, trouble and effort.

Cheers,
David.

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


Re: \bookparts and scaling

2018-06-29 Thread crimsonsunrise
 Mensagem Original 
Ativo 29 de jun de 2018 06:55, Torsten Hämmerle escreveu:

crimsonsunrise wrote
> If you combine both, say, you do global-set-staff-size, then try to change
> the size using layout-staff-size in something like a different book part,
> that will only enlarge the fonts, notes, articulations and text. The staff
> size will remain the same as what was set by global-set-staff-size.

Hi Elaine,

This is no longer true for the current LilyPond unstable versions and the
new soon-to-come 2.20 stable version. That's why it's always important to
mention the version (and I've included the verison statement \version
"2.19.81" in my minimal example).

When you look at my images or at Karlin's PDFs, it is clearly visible that
the saff-size actually changes.

The documentation, unfortunately, has not been updated yet and still claims
that the distance between lines didn't change:
"*Known issues and warnings*
layout-set-staff-size does not change the distance between the staff lines.
"

The documentations should be updated in that respect.

All the best,
Torsten

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

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

=

Which is why I stated before that the documentation lies to the user. If the 
user is looking for something like global-set-staff-size but for single staves 
like I was, he will search for that, see that the manual (for both stable and 
unstable) that states effectively that layout-staff-size does the same thing as 
the former but for individual scores when it doesn't, ignore the single line 
that talks about the staff lines at the very end of the page, then sit there 
confused because what he expected to happen is not what the manual said it 
would.

Moreso, these functions shouldn't even have similar names. As that single line 
at the end states, layout-staff-size doesn't change the distance between staff 
lines, so you're not resizing the staff completely. Why that is the case and 
why it was implemented that way is anybody's guess.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-29 Thread Torsten Hämmerle
crimsonsunrise wrote
> If you combine both, say, you do global-set-staff-size, then try to change
> the size using layout-staff-size in something like a different book part,
> that will only enlarge the fonts, notes, articulations and text. The staff
> size will remain the same as what was set by global-set-staff-size.

Hi Elaine,

This is no longer true for the current LilyPond unstable versions and the
new soon-to-come 2.20 stable version. That's why it's always important to
mention the version (and I've included the verison statement \version
"2.19.81" in my minimal example).

When you look at my images or at Karlin's PDFs, it is clearly visible that
the saff-size actually changes.

The documentation, unfortunately, has not been updated yet and still claims
that the distance between lines didn't change:
"*Known issues and warnings*
layout-set-staff-size does not change the distance between the staff lines.
"

The documentations should be updated in that respect.

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: \bookparts and scaling

2018-06-28 Thread crimsonsunrise
 Mensagem Original 
Ativo 28 de jun de 2018 19:15, Torsten Hämmerle escreveu:

Flaming Hakama by Elaine wrote
> I was unfamiliar with the next one, which might do the trick:
>
> To set the staff size for a single score within a book, use
> layout-set-staff-size inside that score’s \layout block:
>
> \score {
> …
> \layout {
> #(layout-set-staff-size 14)
> }
> }

Hi Elaine,

Yes, that's the way it should be done according to the documentation, but
the general concern is that this will considerably change the overall
spacing, see attached image:

All the best,
Torsten



If you combine both, say, you do global-set-staff-size, then try to change the 
size using layout-staff-size in something like a different book part, that will 
only enlarge the fonts, notes, articulations and text. The staff size will 
remain the same as what was set by global-set-staff-size.

--
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___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-28 Thread Torsten Hämmerle
Flaming Hakama by Elaine wrote
> I was unfamiliar with the next one, which might do the trick:
> 
> To set the staff size for a single score within a book, use
> layout-set-staff-size inside that score’s \layout block:
> 
> \score {
>   …
>   \layout {
> #(layout-set-staff-size 14)
>   }
> }


Hi Elaine,

Yes, that's the way it should be done according to the documentation, but
the general concern is that this will considerably change the overall
spacing, see attached image:


 

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: \bookparts and scaling

2018-06-28 Thread crimsonsunrise
Ativo 28 de jun de 2018 16:15, Flaming Hakama by Elaine escreveu:

On Thu, Jun 28, 2018 at 11:32 AM Karlin High  wrote:

On 6/27/2018 4:57 PM, crimsonsunr...@protonmail.com wrote:
> It could help if we knew what #(set-global-staff-size) does exactly.
> It's not in the manual or at least I couldn't find it.

I've watched people on the list refer to the source code when manuals
failed them. I'm not as skilled as those people, but here goes. This is
only an attempt to locate the code, with little expectations of
understanding it. I don't know Scheme very well at all.

In my LilyDev VM, I run the command...

git grep set-global-staff-size

...and it finds lots of instances where the command is being used in
documentation and such, instead of where it's defined. But this file
looks promising for the definition:

$LILYPOND_GIT/scm/paper.scm
106 (define-safe-public (set-global-staff-size sz)
107 "Set the default staff size, where SZ is thought to be in PT."

The code following those lines seems to refer to this one:

69 (define-public (layout-set-absolute-staff-size-in-module module staff-height)

That one does not seem to have any comments with explanations for it.

[CAUTION: Now entering cargo-cult mode]

Based on how that layout-set-absolute-staff-size-in-module seems set up,
it does look like adding this to each \bookpart \score block will
change their staff sizes individually.

\layout {
  #(layout-set-absolute-staff-size-in-module
(current-module) (* 10 (eval 'pt (current-module
}

The value 10 could be set to other values as desired. To show how it's
working, I modified the example posted by Torsten Hämmerle at

and attached the source code and resulting pdf.

Again, this is total cargo-cult code, awaiting corrections or
contra-advice from LilyPond experts. And I'm sure there's a way to
properly format this code at the beginning of the LY file to pass a
value to it and avoid having to re-enter the whole thing each time.
--
Karlin High
Missouri, USA

The staff sizing commands are described in the docs:

http://lilypond.org/doc/v2.19/Documentation/notation/setting-the-staff-size

Which says:  To set the staff size globally for all scores in a file (or in a 
\book block, to be precise), use set-global-staff-size

From what I recall on list discussion, you can't re-set this once it has been 
set (and expect things to work.)  Which is to say, it is a global setting, so 
it is not a per-staff/per-staffgroup/per-score/etc, but once and done.

I was unfamiliar with the next one, which might do the trick:

To set the staff size for a single score within a book, use 
layout-set-staff-size inside that score’s \layout block:

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

And then there's the magnify-staff approach I mentioned, which is described as 
being used to set the staff size for a single staff within a system.

HTH,

Elaine Alt

415 . 341 .4954   "Confusion is highly 
underrated"

ela...@flaminghakama.com

Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Yes the documentation says that, but it lies to the user. 
#(set-global-staff-size) and #(layout-set-staff-size) do two different things. 
The former scales all the scores evenly, while doing the correct line and 
system to system spacing. The latter only makes the notes and staff smaller 
without changing any of the spacing rules.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-28 Thread Karlin High
On Thu, Jun 28, 2018 at 2:15 PM, Flaming Hakama by Elaine
 wrote:
>
> I was unfamiliar with the next one, which might do the trick:
>
> To set the staff size for a single score within a book, use
> layout-set-staff-size inside that score’s \layout block:
>
> \score {
>   …
>   \layout {
> #(layout-set-staff-size 14)
>   }
> }

I read the OP as saying that layout-set-staff-size wasn't getting the
desired result.



"I found in the documentation that you should use
#(layout-set-staff-size) for individual parts. Problem with that is
that doing this keeps the staff at the same global size and only makes
the other elements of the staff larger."

And on closer examination, it looks like the code I posted is doing
the same thing that layout-set-staff-size does.

layout-set-staff-size
seems to do a conversion on the staff size value passed to it, then pass that to
layout-set-absolute-staff-size
which passes it with the (current-module) to
layout-set-absolute-staff-size-in-module

So if layout-set-staff-size isn't working for the OP, the code I
posted likely won't work either. Crimson Sunrise, could you verify
this? Check the PDF I posted.

That leaves the OP's question: what exactly is set-global-staff-size
doing that the other commands are not? Creating a new top-level \paper
context that supersedes whatever existed before?
-- 
Karlin High
Missouri, USA

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


Re: \bookparts and scaling

2018-06-28 Thread Flaming Hakama by Elaine
On Thu, Jun 28, 2018 at 1:22 PM Karlin High  wrote:

> On Thu, Jun 28, 2018 at 2:15 PM, Flaming Hakama by Elaine
>  wrote:
> >
> > I was unfamiliar with the next one, which might do the trick:
> >
> > To set the staff size for a single score within a book, use
> > layout-set-staff-size inside that score’s \layout block:
> >
> > \score {
> >   …
> >   \layout {
> > #(layout-set-staff-size 14)
> >   }
> > }
>
> I read the OP as saying that layout-set-staff-size wasn't getting the
> desired result.
>
> 
>
> "I found in the documentation that you should use
> #(layout-set-staff-size) for individual parts. Problem with that is
> that doing this keeps the staff at the same global size and only makes
> the other elements of the staff larger."
>
> And on closer examination, it looks like the code I posted is doing
> the same thing that layout-set-staff-size does.
>
> layout-set-staff-size
> seems to do a conversion on the staff size value passed to it, then pass
> that to
> layout-set-absolute-staff-size
> which passes it with the (current-module) to
> layout-set-absolute-staff-size-in-module
>
> So if layout-set-staff-size isn't working for the OP, the code I
> posted likely won't work either. Crimson Sunrise, could you verify
> this? Check the PDF I posted.
>
> That leaves the OP's question: what exactly is set-global-staff-size
> doing that the other commands are not? Creating a new top-level \paper
> context that supersedes whatever existed before?
> --
> Karlin High
> Missouri, USA
>

I'm not sure that the OP ever posted an mwe attempting to use
layout-set-staff-size.
Perhaps the OP didn't quite have the syntax right?

When I tried adding it to the posted mwe, it does seem to do the trick:


\version "2.19.81"

#(set-default-paper-size "a6")

fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }

\bookpart {
\header { instrument = "Full Score" }
\score {
\new StaffGroup <<
\new Staff \with {
instrumentName = "Fl. 1"
} \fluteI
\new Staff \with {
instrumentName = "Fl. 2"
} \fluteII
>>
\layout {
#(layout-set-staff-size 14)
}
}
}

\bookpart {
\header { instrument = "Flute 1" }
\score {
\new Staff \fluteI
}
}

\bookpart {
\header { instrument = "Flute 2" }
\score {
\new Staff \fluteII
}
}



Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-28 Thread Flaming Hakama by Elaine
On Thu, Jun 28, 2018 at 11:32 AM Karlin High  wrote:

> On 6/27/2018 4:57 PM, crimsonsunr...@protonmail.com wrote:
> > It could help if we knew what #(set-global-staff-size) does exactly.
> > It's not in the manual or at least I couldn't find it.
>
> I've watched people on the list refer to the source code when manuals
> failed them. I'm not as skilled as those people, but here goes. This is
> only an attempt to locate the code, with little expectations of
> understanding it. I don't know Scheme very well at all.
>
> In my LilyDev VM, I run the command...
>
> git grep set-global-staff-size
>
> ...and it finds lots of instances where the command is being used in
> documentation and such, instead of where it's defined. But this file
> looks promising for the definition:
>
> $LILYPOND_GIT/scm/paper.scm
> 106 (define-safe-public (set-global-staff-size sz)
> 107 "Set the default staff size, where SZ is thought to be in PT."
>
> The code following those lines seems to refer to this one:
>
> 69 (define-public (layout-set-absolute-staff-size-in-module module
> staff-height)
>
> That one does not seem to have any comments with explanations for it.
>
> [CAUTION: Now entering cargo-cult mode]
>
> Based on how that layout-set-absolute-staff-size-in-module seems set up,
> it does look like adding this to each \bookpart \score block will
> change their staff sizes individually.
>
> \layout {
>   #(layout-set-absolute-staff-size-in-module
> (current-module) (* 10 (eval 'pt (current-module
> }
>
> The value 10 could be set to other values as desired. To show how it's
> working, I modified the example posted by Torsten Hämmerle at
> 
> and attached the source code and resulting pdf.
>
> Again, this is total cargo-cult code, awaiting corrections or
> contra-advice from LilyPond experts. And I'm sure there's a way to
> properly format this code at the beginning of the LY file to pass a
> value to it and avoid having to re-enter the whole thing each time.
> --
> Karlin High
> Missouri, USA
>


The staff sizing commands are described in the docs:
http://lilypond.org/doc/v2.19/Documentation/notation/setting-the-staff-size

Which says:  To set the staff size globally for all scores in a file (or in
a \book block, to be precise), use set-global-staff-size

>From what I recall on list discussion, you can't re-set this once it has
been set (and expect things to work.)  Which is to say, it is a global
setting, so it is not a per-staff/per-staffgroup/per-score/etc, but once
and done.

I was unfamiliar with the next one, which might do the trick:

To set the staff size for a single score within a book, use
layout-set-staff-size inside that score’s \layout block:

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


And then there's the magnify-staff approach I mentioned, which is described
as being used to set the staff size for a single staff within a system.


HTH,

Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-27 Thread crimsonsunrise
 Mensagem Original 
Ativo 27 de jun de 2018 18:43, Flaming Hakama by Elaine escreveu:

Subject: Re: \bookparts and scaling

Hi, Torsten!

On Wed, Jun 27, 2018 at 2:49 AM, Torsten Hämmerle  wrote:

Hi Ralph,

I'm neither Crimson nor Sunrise, but I guess having both full score and
parts together in one PDF is quite a common requirement.

Using smaller print for the full score but using larger print for the parts
while keeping up natural spacing is not easy to achieve in LilyPond, because
set-global-staff-size only works for whole books, i.e. separate output
files.

Here's a minimal example (without any attempt do alter score sizes yet) as a
working basis for the implementation of different approaches:

%%

\version "2.19.81"

#(set-default-paper-size "a6")

fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }

\bookpart {
  \header { instrument = "Full Score" }
  \score {
\new StaffGroup   \new Staff \with { instrumentName = "Fl. 1" } \fluteI
  \new Staff \with { instrumentName = "Fl. 2" } \fluteII
>>
  }
}

\bookpart {
  \header { instrument = "Flute 1" }
  \score {
\new Staff \fluteI
  }
}

\bookpart {
  \header { instrument = "Flute 2" }
  \score {
\new Staff \fluteII
  }
}

%%

First, there is the full score, containing Flute 1 and Flute 2.
This full score should use smaller print, cf. #(set-global-staff-size 10) in
a \book.
The parts, however, should look as if printed with #(set-global-staff-size
20).
And all within one single PDF.

These extreme differences should make spacing problems obvious.

How do you (to the list in general) handle such a case without using
external PDF postprocessing programs?
I'm usually working around the problem by using (at least) two PDF files -
one for the full score and one (or even individual files) for the parts -
for several reasons.

%{

I'm sure there are some many imperfections with using magnifyStaff, but it is 
pretty easy to use and gets you within the ballpark:

%}

\version "2.19.81"

#(set-default-paper-size "a6")

fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }

fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }

\bookpart {

  \header { instrument = "Full Score" }

  \score {

\new StaffGroup
  \new Staff \with {

instrumentName = "Fl. 1"

\magnifyStaff #1/2

  } \fluteI

  \new Staff \with {

instrumentName = "Fl. 2"

\magnifyStaff #1/2

  } \fluteII

>>

  }

}

\bookpart {

  \header { instrument = "Flute 1" }

  \score {

\new Staff \fluteI

  }

}

\bookpart {

  \header { instrument = "Flute 2" }

  \score {

\new Staff \fluteII

  }

}

Elaine Alt

415 . 341 .4954   "Confusion is highly 
underrated"

ela...@flaminghakama.com

Producer ~ Composer ~ Instrumentalist

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 It could help if we knew what #(set-global-staff-size) does exactly. It's not 
in the manual or at least I couldn't find it.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:\bookparts and scaling

2018-06-27 Thread Flaming Hakama by Elaine
> Subject: Re: \bookparts and scaling
> Hi, Torsten!
>
> On Wed, Jun 27, 2018 at 2:49 AM, Torsten Hämmerle <
> torsten.haemme...@web.de> wrote:
>
>> Hi Ralph,
>>
>> I'm neither Crimson nor Sunrise, but I guess having both full score and
>> parts together in one PDF is quite a common requirement.
>>
>> Using smaller print for the full score but using larger print for the
>> parts
>> while keeping up natural spacing is not easy to achieve in LilyPond,
>> because
>> set-global-staff-size only works for whole books, i.e. separate output
>> files.
>>
>>
>> Here's a minimal example (without any attempt do alter score sizes yet)
>> as a
>> working basis for the implementation of different approaches:
>>
>>
>> %%
>>
>> \version "2.19.81"
>>
>> #(set-default-paper-size "a6")
>>
>> fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
>> fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }
>>
>> \bookpart {
>>   \header { instrument = "Full Score" }
>>   \score {
>> \new StaffGroup <<
>>   \new Staff \with { instrumentName = "Fl. 1" } \fluteI
>>   \new Staff \with { instrumentName = "Fl. 2" } \fluteII
>> >>
>>   }
>> }
>>
>> \bookpart {
>>   \header { instrument = "Flute 1" }
>>   \score {
>> \new Staff \fluteI
>>   }
>> }
>>
>> \bookpart {
>>   \header { instrument = "Flute 2" }
>>   \score {
>> \new Staff \fluteII
>>   }
>> }
>>
>> %%
>>
>>
>> First, there is the full score, containing Flute 1 and Flute 2.
>> This full score should use smaller print, cf. #(set-global-staff-size 10)
>> in
>> a \book.
>> The parts, however, should look as if printed with #(set-global-staff-size
>> 20).
>> And all within one single PDF.
>>
>> These extreme differences should make spacing problems obvious.
>>
>> How do you (to the list in general) handle such a case without using
>> external PDF postprocessing programs?
>> I'm usually working around the problem by using (at least) two PDF files -
>> one for the full score and one (or even individual files) for the parts -
>> for several reasons.
>>
>

%{

I'm sure there are some many imperfections with using magnifyStaff, but it
is pretty easy to use and gets you within the ballpark:

%}

\version "2.19.81"

#(set-default-paper-size "a6")

fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }

\bookpart {
  \header { instrument = "Full Score" }
  \score {
\new StaffGroup <<
  \new Staff \with {
instrumentName = "Fl. 1"
\magnifyStaff #1/2
  } \fluteI
  \new Staff \with {
instrumentName = "Fl. 2"
\magnifyStaff #1/2
  } \fluteII
>>
  }
}

\bookpart {
  \header { instrument = "Flute 1" }
  \score {
\new Staff \fluteI
  }
}

\bookpart {
  \header { instrument = "Flute 2" }
  \score {
\new Staff \fluteII
  }
}



Elaine Alt
415 . 341 .4954   "Confusion is
highly underrated"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-27 Thread crimsonsunrise
 Mensagem Original 
Ativo 27 de jun de 2018 05:49, Torsten Hämmerle escreveu:

Hi Ralph,

I'm neither Crimson nor Sunrise, but I guess having both full score and
parts together in one PDF is quite a common requirement.

Using smaller print for the full score but using larger print for the parts
while keeping up natural spacing is not easy to achieve in LilyPond, because
set-global-staff-size only works for whole books, i.e. separate output
files.

Here's a minimal example (without any attempt do alter score sizes yet) as a
working basis for the implementation of different approaches:

%%

\version "2.19.81"

#(set-default-paper-size "a6")

fluteI = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }

\bookpart {
\header { instrument = "Full Score" }
\score {
\new StaffGroup \new Staff \with { instrumentName = "Fl. 1" } \fluteI
\new Staff \with { instrumentName = "Fl. 2" } \fluteII
>>
}
}

\bookpart {
\header { instrument = "Flute 1" }
\score {
\new Staff \fluteI
}
}

\bookpart {
\header { instrument = "Flute 2" }
\score {
\new Staff \fluteII
}
}

%%

First, there is the full score, containing Flute 1 and Flute 2.
This full score should use smaller print, cf. #(set-global-staff-size 10) in
a \book.
The parts, however, should look as if printed with #(set-global-staff-size
20).
And all within one single PDF.

These extreme differences should make spacing problems obvious.

How do you (to the list in general) handle such a case without using
external PDF postprocessing programs?
I'm usually working around the problem by using (at least) two PDF files -
one for the full score and one (or even individual files) for the parts -
for several reasons.

All the best,
Torsten

==

It's also suggested by the manual that #(set-global-staff-size) is limited in 
scope by the \book block. However, if you encase the book part inside one, as 
to limit where the function will scale, Lilypond flat out ignores it or uses 
the scaling setting of the same function if it exists outside the block.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-27 Thread Abraham Lee
Hi, Torsten!

On Wed, Jun 27, 2018 at 2:49 AM, Torsten Hämmerle 
wrote:

> Hi Ralph,
>
> I'm neither Crimson nor Sunrise, but I guess having both full score and
> parts together in one PDF is quite a common requirement.
>
> Using smaller print for the full score but using larger print for the parts
> while keeping up natural spacing is not easy to achieve in LilyPond,
> because
> set-global-staff-size only works for whole books, i.e. separate output
> files.
>
>
> Here's a minimal example (without any attempt do alter score sizes yet) as
> a
> working basis for the implementation of different approaches:
>
>
> %%
>
> \version "2.19.81"
>
> #(set-default-paper-size "a6")
>
> fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
> fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }
>
> \bookpart {
>   \header { instrument = "Full Score" }
>   \score {
> \new StaffGroup <<
>   \new Staff \with { instrumentName = "Fl. 1" } \fluteI
>   \new Staff \with { instrumentName = "Fl. 2" } \fluteII
> >>
>   }
> }
>
> \bookpart {
>   \header { instrument = "Flute 1" }
>   \score {
> \new Staff \fluteI
>   }
> }
>
> \bookpart {
>   \header { instrument = "Flute 2" }
>   \score {
> \new Staff \fluteII
>   }
> }
>
> %%
>
>
> First, there is the full score, containing Flute 1 and Flute 2.
> This full score should use smaller print, cf. #(set-global-staff-size 10)
> in
> a \book.
> The parts, however, should look as if printed with #(set-global-staff-size
> 20).
> And all within one single PDF.
>
> These extreme differences should make spacing problems obvious.
>
> How do you (to the list in general) handle such a case without using
> external PDF postprocessing programs?
> I'm usually working around the problem by using (at least) two PDF files -
> one for the full score and one (or even individual files) for the parts -
> for several reasons.
>

I can see reasons for wanting to do separate PDF files for this, and I've
done it many times myself, but I also have wished the mechanics for this
were better handled for varied staff sizes within a single \book. If I
could voice my deepest desire for this, it would be that it would have
configurable scope all the way down at the \score level, so that each
\score can have its own nominal/global size that is user-settable, and then
allow the individual staves can resize themselves around that if desired. I
can see plenty of reasons why the engraver might want that nominal size to
be different from one \score to the next. Worst case, it would be nice to
have it settable at the \bookpart level so that examples like yours can be
handled the way you describe while taking advantage of \book level
logistics like page numbering, table of contents, etc.

My two cents.

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


Re: \bookparts and scaling

2018-06-27 Thread Torsten Hämmerle
Hi Ralph,

I'm neither Crimson nor Sunrise, but I guess having both full score and
parts together in one PDF is quite a common requirement.

Using smaller print for the full score but using larger print for the parts
while keeping up natural spacing is not easy to achieve in LilyPond, because
set-global-staff-size only works for whole books, i.e. separate output
files.


Here's a minimal example (without any attempt do alter score sizes yet) as a
working basis for the implementation of different approaches:


%%

\version "2.19.81"

#(set-default-paper-size "a6")

fluteI  = { \repeat unfold 20 { c''8 e'' g'' e'' } \bar "|." }
fluteII = { \repeat unfold 20 { c'4 g' } \bar "|." }

\bookpart {
  \header { instrument = "Full Score" }
  \score {
\new StaffGroup <<
  \new Staff \with { instrumentName = "Fl. 1" } \fluteI
  \new Staff \with { instrumentName = "Fl. 2" } \fluteII
>>
  }
}

\bookpart {
  \header { instrument = "Flute 1" }
  \score {
\new Staff \fluteI
  }
}

\bookpart {
  \header { instrument = "Flute 2" }
  \score {
\new Staff \fluteII
  }
}

%%


First, there is the full score, containing Flute 1 and Flute 2.
This full score should use smaller print, cf. #(set-global-staff-size 10) in
a \book.
The parts, however, should look as if printed with #(set-global-staff-size
20).
And all within one single PDF.

These extreme differences should make spacing problems obvious.

How do you (to the list in general) handle such a case without using
external PDF postprocessing programs?
I'm usually working around the problem by using (at least) two PDF files -
one for the full score and one (or even individual files) for the parts -
for several reasons.

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: \bookparts and scaling

2018-06-26 Thread Ralph Palmer
On Tue, Jun 26, 2018 at 2:13 PM  wrote:

> Ativo 26 de jun de 2018 01:25, < crimsonsunr...@protonmail.com> escreveu:
>
> After some searching and some dead ends (due to the fact that the standard
> lilypond snippet site doesn't open in qutebrowser), I can't seem to find a
> way of solving this one. I'm trying to get a single pdf with all different
> parts of the main score and the main score. After some testing done while
> the conductor score was being worked on, I set the global staff size to 11,
> which gives a nice fit for the conductor score. Now, that size is too small
> for the separate parts, making the entire score only take 1/3 of an A4
> sheet. After some searching, I found in the documentation that you should
> use #(layout-set-staff-size) for individual parts. Problem with that is
> that doing this keeps the staff at the same global size and only makes the
> other elements of the staff larger. Also tried doing another
> #(set-global-staff-size) on the different bookpart and that makes the part
> score the correct size...While completely butchering the conductor score.
> Is this because #(set-global-staff-size) overrides everything or because
> what it does it's different than what #(layout-set-staff-size) does?
> There's not much information on the regular documentation apart from what
> boils down to:
>
> - To change the size of everything, you use #(set-global-staff-size)
>
> - Otherwise, use #(layout-set-staff-size) for changing the size of each
> part individually.
>
>
​Hi, crimsonsunrise -

Could you possibly give us an image of what you're trying to do, as well as
a minimum working example ​of your problem? You're much more likely to get
an intelligible response if you do.

All the best,

Ralph


-- 
Ralph Palmer
Brattleboro, VT
USA
palmer.r.vio...@gmail.com
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \bookparts and scaling

2018-06-26 Thread crimsonsunrise
Ativo 26 de jun de 2018 01:25, escreveu:

After some searching and some dead ends (due to the fact that the standard 
lilypond snippet site doesn't open in qutebrowser), I can't seem to find a way 
of solving this one. I'm trying to get a single pdf with all different parts of 
the main score and the main score. After some testing done while the conductor 
score was being worked on, I set the global staff size to 11, which gives a 
nice fit for the conductor score. Now, that size is too small for the separate 
parts, making the entire score only take 1/3 of an A4 sheet. After some 
searching, I found in the documentation that you should use 
#(layout-set-staff-size) for individual parts. Problem with that is that doing 
this keeps the staff at the same global size and only makes the other elements 
of the staff larger. Also tried doing another #(set-global-staff-size) on the 
different bookpart and that makes the part score the correct size...While 
completely butchering the conductor score. Is this because 
#(set-global-staff-size) overrides everything or because what it does it's 
different than what #(layout-set-staff-size) does? There's not much information 
on the regular documentation apart from what boils down to:

- To change the size of everything, you use #(set-global-staff-size)

- Otherwise, use #(layout-set-staff-size) for changing the size of each part 
individually.



After more wrestling with the documentation and snippets, still no clue. None 
of the other methods used or demonstrated produce the same result 
#(set-global-staff-size) does. The fonts are too small, lines too thin, dynamic 
marks and expressions are too far away from the notes... The \book block 
doesn't seem to do anything... And so on.

Is there no other way to do what #(set-global-staff-size) does at a local level?___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


\bookparts and scaling

2018-06-25 Thread crimsonsunrise
After some searching and some dead ends (due to the fact that the standard 
lilypond snippet site doesn't open in qutebrowser), I can't seem to find a way 
of solving this one. I'm trying to get a single pdf with all different parts of 
the main score and the main score. After some testing done while the conductor 
score was being worked on, I set the global staff size to 11, which gives a 
nice fit for the conductor score. Now, that size is too small for the separate 
parts, making the entire score only take 1/3 of an A4 sheet. After some 
searching, I found in the documentation that you should use 
#(layout-set-staff-size) for individual parts. Problem with that is that doing 
this keeps the staff at the same global size and only makes the other elements 
of the staff larger. Also tried doing another #(set-global-staff-size) on the 
different bookpart and that makes the part score the correct size...While 
completely butchering the conductor score. Is this because 
#(set-global-staff-size) overrides everything or because what it does it's 
different than what #(layout-set-staff-size) does? There's not much information 
on the regular documentation apart from what boils down to:

- To change the size of everything, you use #(set-global-staff-size)
- Otherwise, use #(layout-set-staff-size) for changing the size of each part 
individually.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user