Re: Procedure for set-paper-size in \paper ?

2018-05-18 Thread Aaron Hill

On 2018-05-18 16:03, Thomas Morley wrote:

2018-05-19 0:36 GMT+02:00 Aaron Hill :

On 2018-05-18 14:24, Thomas Morley wrote:



#(define (proc bool x y)
  (if bool x y))


Your `proc` function does not have this behavior, as the arguments 
passed in

will be evaluated before you get to the inner `if`.


Hm, then I should reword my request.
Is there a way to circumvent this behaviour?


Yes, you need to use some form of lazy evaluation.  Perhaps the most 
explicit way is to pass in lambdas:



  \version "2.19.81"
  #(define (proc bool x y) ((if bool x y)))
  \paper {
#(proc #t
  (lambda () (set-paper-size "a8" 'landscape))
  (lambda () (set-paper-size "a8")))
  }
  \markup { "Are we landscape or not?" }


NOTE: There is an extra set of parentheses in the `proc` body in order 
to evaluate the selected parameter.


Another less verbose option is to simply quote the arguments and `eval` 
them as needed:



  #(define (proc bool x y)
(eval (if bool x y) (interaction-environment)))
  \paper {
#(proc #t '(set-paper-size "a8" 'landscape) '(set-paper-size "a8"))
  }


NOTE: Unlike before, we *need* the extra quote for `landscape` in this 
case, so there is a potential gotcha.


-- Aaron Hill

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


Re: Procedure for set-paper-size in \paper ?

2018-05-18 Thread Thomas Morley
2018-05-19 0:36 GMT+02:00 Aaron Hill :
> On 2018-05-18 14:24, Thomas Morley wrote:

>> #(define (proc bool x y)
>>   (if bool x y))

> Your `proc` function does not have this behavior, as the arguments passed in
> will be evaluated before you get to the inner `if`.

Hm, then I should reword my request.
Is there a way to circumvent this behaviour?

I'm finally aiming at a function selecting from different set-whatever!

> Now, `set-paper-size`
> has a side-effect, so the evaluation of that function alone is enough to
> have an impact.  Technically, the function should be named
> `set-paper-size!`, as the convention is to suffix an exclamation to indicate
> such functions.
>
> So, calling `proc` with the two functions results in both being evaluated,
> which is not what you want.

Ok, then another example for this would be:

#(define (proc bool x y)
  (if bool x y))

#(define lst #f)

#(proc #f (set! lst '(1 2)) (set! lst '(3 4)))

#(write lst)

always returns:
'(3 4)

>
> Your `apply` approach is closer to what you want, since you are using `proc`
> as a means of selecting the arguments you want and calling `set-paper-size`
> only once.  This should work, except you have an extra quote.
>
> 
>   #(apply set-paper-size (proc #t '("a8" landscape) '("a8")))
> 
>
> The outer quote for invoking the list shorthand already results in
> `landscape` being a symbol.  The extra quote would put another layer of
> indirection, which `set-paper-size` does not expect.

Ok, it's an overside then.
Thanks for spotting it.

>
> Hope this helps,
>
> -- Aaron Hill

It helped a lot.

Many thanks,
  Harm

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


Re: Procedure for set-paper-size in \paper ?

2018-05-18 Thread Aaron Hill

On 2018-05-18 14:24, Thomas Morley wrote:

Hi all,

(1)
consider the following code (working as expected):

\paper {
  #(if #t (set-paper-size "a8" 'landscape) #(set-paper-size "a8"))
}

\score { { R1 } \layout { ragged-right = ##f } }

Switching from #t to #f results in different paper-size, as desired.

(2)
But trying to put it in a procedure, it always returns the true-case:

#(define (proc bool x y)
  (if bool x y))

\paper {
  #(proc #f (set-paper-size "a8" 'landscape) #(set-paper-size "a8"))
}

\score { { R1 } \layout { ragged-right = ##f } }

Paper-size is always a8-landscape.

(3)
Trying:
#(define (proc bool x y)
  (if bool x y))

\paper {
  #(apply set-paper-size (proc #t '("a8" 'landscape) '("a8")))
}

\score { { R1 } \layout { ragged-right = ##f } }

Paper-size is always a8

-

What's happening here and why?
And how to make a procedure accepting set-paper-size work, with
different settings and an if-condition?


My Scheme is a little rusty over the years, but I will try to explain 
what is going on.


Firstly, `if` has a rule that it only evaluates either the true-value or 
false-value based on the Boolean.  That means exactly one of the two 
expressions will evaluate.


Your `proc` function does not have this behavior, as the arguments 
passed in will be evaluated before you get to the inner `if`.  Now, 
`set-paper-size` has a side-effect, so the evaluation of that function 
alone is enough to have an impact.  Technically, the function should be 
named `set-paper-size!`, as the convention is to suffix an exclamation 
to indicate such functions.


So, calling `proc` with the two functions results in both being 
evaluated, which is not what you want.


Your `apply` approach is closer to what you want, since you are using 
`proc` as a means of selecting the arguments you want and calling 
`set-paper-size` only once.  This should work, except you have an extra 
quote.



  #(apply set-paper-size (proc #t '("a8" landscape) '("a8")))


The outer quote for invoking the list shorthand already results in 
`landscape` being a symbol.  The extra quote would put another layer of 
indirection, which `set-paper-size` does not expect.


Hope this helps,

-- Aaron Hill

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


Procedure for set-paper-size in \paper ?

2018-05-18 Thread Thomas Morley
Hi all,

(1)
consider the following code (working as expected):

\paper {
  #(if #t (set-paper-size "a8" 'landscape) #(set-paper-size "a8"))
}

\score { { R1 } \layout { ragged-right = ##f } }

Switching from #t to #f results in different paper-size, as desired.

(2)
But trying to put it in a procedure, it always returns the true-case:

#(define (proc bool x y)
  (if bool x y))

\paper {
  #(proc #f (set-paper-size "a8" 'landscape) #(set-paper-size "a8"))
}

\score { { R1 } \layout { ragged-right = ##f } }

Paper-size is always a8-landscape.

(3)
Trying:
#(define (proc bool x y)
  (if bool x y))

\paper {
  #(apply set-paper-size (proc #t '("a8" 'landscape) '("a8")))
}

\score { { R1 } \layout { ragged-right = ##f } }

Paper-size is always a8

-

What's happening here and why?
And how to make a procedure accepting set-paper-size work, with
different settings and an if-condition?

Cheers,
  Harm

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


Re: Large Time Signatures Within Staves?

2018-05-18 Thread Lukas-Fabian Moser


When I increase the grob, how (or can?) I adjust it on the fly for 
certain pages if the distance between instruments change for layout 
reasons? Otherwise the grob would look 'off'.


Something like that?

\version "2.19.80"

noTimeSig = { \omit TimeSignature }
largeTimeSig = {
  \numericTimeSignature
  \override Staff.TimeSignature.font-size = 9
}

\new StaffGroup <<
  \new Staff \with \noTimeSig {
    \repeat unfold 25 d''4
  }
  \new Staff \with \largeTimeSig {
    \repeat unfold 24 d''4
    \once\override Staff.TimeSignature.extra-offset = #'(0 . 4)
    d''4

  }
  \new Staff \with \noTimeSig {
    \repeat unfold 25 d''4
  }
  \new Staff \with \noTimeSig {
    \repeat unfold 25 d''4
  }
  \new Staff \with \noTimeSig {
    \repeat unfold 25 d''4
  }
  \new Staff \with \largeTimeSig {
    \repeat unfold 12 d''4
    \once\override Staff.TimeSignature.extra-offset = #'(0 . -4)
    \time 3/2
    \repeat unfold 12 d''4
    \time 4/4
    d''4
  }
  \new Staff \with \noTimeSig {
    \repeat unfold 25 d''4
  }
>>

Best
Lukas

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


Re: Vertical space above ossia

2018-05-18 Thread Walter Garcia-Fontes
* Mats Bengtsson, mats.bengts...@ee.kth.se [18/05/18 16:43]:
> On 2018-05-18 09:43, Walter Garcia-Fontes wrote:
> > Thanks Carl and Ben for your suggestions. Let me provide a summary so
> > far, since the discussion was a little messy. So we start from the
> > example provided for a single ossia, with more code to have the score
> > extend over multiple lines:
> > ...
> > 
> > So this would close this thread unless anybody has a better
> > suggestion.
> Shouldn't it be possible to set the Y-extent of the ossia staff to zero? I
> made some attempts, but it didn't work as I expected. Perhaps somebody else
> is more successful.

Did you try:

\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details
#'((Y-offset . 0))

or something else? 

I tried the above in all possible places in the snippet, and I could
move up the line below the one with the ossia, but not the one with
the ossia.

-- 
Walter Garcia-Fontes
L'Hospitalet de Llobregat

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


Re: Solution to have repeats with upbeat and different alternatives??

2018-05-18 Thread steve

Thats it!!

 thanx - steve

> On 2018-05-17 10:22, st...@linuxsuite.org wrote:
>> I posted a piece of simplified code to illustrate. This is what
>> the default does
>> isnt 'it??
>>
>>
>> https://ln.sync.com/dl/2d42a9350/ukfaa7s8-rpenm7ne-xqxv7mpk-x99vbzbw
>>
>> [ . . . ]
>>
>>   the code below prints an extraneous bar in the second alternative
>> at
>> the end.
>>
>> [ . . . ]
>>
>> test.ly ***
>>
>>  \version "2.18.2"
>>
>> music = \relative c''
>> {
>> \time 3/4
>>
>> \partial 4 a8 a |
>> a4 a a |
>>
>> \repeat volta2
>> {
>>   b4 b b | b4 b b |
>> }
>> \alternative {
>> { b4 b b | }
>> { c4 c }
>> }
>>
>> \repeat volta 2
>> {
>>  d8 d | d4 d d |
>> }
>> \alternative {
>> { d4 d }
>> { e4 e4 e4 }
>> }
>> }
>>
>> \score { \music }
>
> Using the snippet you provided and running against 2.19.81, I do not see
> the barline you are seeing.  (See attachment: upbeat-repeat.preview.png)
>
> It would seem that the newer version handles implicit partial measures
> automatically.
>
> One option is to use \partial explicitly, however LilyPond 2.18.2 warns
> about this practice.  2.19.81 does not:
>
> 
>\repeat volta 2 { d8 d | d4 d d | }
>\alternative {
>  { \partial 2 d4 d }
>  { e4 e4 e4 | }
>}
> 
>
> You could also simply change time signatures secretly:
>
> 
>\repeat volta 2 { d8 d | d4 d d | }
>\alternative {
>  { \omit Score.TimeSignature \time 2/4 d4 d }
>  { \time 3/4 e4 e4 e4 | }
>}
>\undo \omit Score.TimeSignature
> 
>
> That option seems to work in both 2.18.2 and 2.19.81 without any
> warnings.
>
> -- Aaron Hill___
> 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: Re: Vertical space above ossia

2018-05-18 Thread Mats Bengtsson



On 2018-05-18 09:43, Walter Garcia-Fontes wrote:

Thanks Carl and Ben for your suggestions. Let me provide a summary so
far, since the discussion was a little messy. So we start from the
example provided for a single ossia, with more code to have the score
extend over multiple lines:
...

So this would close this thread unless anybody has a better
suggestion.
Shouldn't it be possible to set the Y-extent of the ossia staff to zero? 
I made some attempts, but it didn't work as I expected. Perhaps somebody 
else is more successful.


   /Mats

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


Re: Tick lines for beats in bar

2018-05-18 Thread Andrew Bernard
Solved my own problem. I had not realised the setting of the Timing
properties has to come after the time signature, not before. Sure had me
stumped.

Andrew


\version "2.19.81"

\new Staff {
  \time 10/8

  \set Timing.measureLength = #(ly:make-moment 1/8)
  \set Timing.defaultBarType = "'"

  c''8 8 8 8 8 8 8 8 8 8 |
  \bar "."
  c''8
}




On 18 May 2018 at 23:44, Andrew Bernard  wrote:

> How can I get tick barlines to indicate beats in a bar, within the time
> signature. The example at hand is in 10/8, but the composer likes to put a
> tick at every beat particularly when the music gets complex.
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Large Time Signatures Within Staves?

2018-05-18 Thread Ben

On 5/18/2018 10:06 AM, Lukas-Fabian Moser wrote:


Hi Ben,

I need to create a wind ensemble engraving where the time signatures 
are large and *within* the staves themselves, overlapping specific 
instruments/groups throughout the score. I know how to place the time 
signatures above the staff but I can't find a way to place them 
within the instruments and groups.


Does anyone know a snippet or function that allows this? Is it fairly 
easy to implement?



The first variant is very easy to achieve:

\version "2.19.80"

noTimeSig = { \omit TimeSignature }
largeTimeSig = {
  \numericTimeSignature
  \override Staff.TimeSignature.font-size = 9
}

\new StaffGroup <<
  \new Staff \with \noTimeSig {
    d''4
  }
  \new Staff \with \largeTimeSig {
    c''4
  }
  \new Staff \with \noTimeSig {
    d''4
  }
  \new Staff \with \noTimeSig {
    d''4
  }
  \new Staff \with \noTimeSig {
    d''4
  }
  \new Staff \with \largeTimeSig {
    d''4
  }
  \new Staff \with \noTimeSig {
    d''4
  }
>>

The second one is harder because it probably involves dealing with the 
precise amount of space between to staves - maybe for determining the 
size, but certainly for the positioning (which should be centered with 
respect to a group of two or more staves). It's no problem at all to 
move the time signature downwards, a fixed amount, but this is bound 
to mess up when inter-staff space varies. Logically, such a time 
signature should not be belong to a single staff but to a set of 
successive staves. Maybe one of the Lilypond/Scheme-wizards here will 
come up with something like that.


Best
Lukas



Thank you!


(attached examples)


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



On 5/18/2018 9:25 AM, Kieren MacMillan wrote:

Hi Ben,

Since (at least in the first example) the time signatures are centered on a 
staff, why not just increase the size of the TimeSignature grob, and then \omit 
(or \hide) it from other staves?

Hope that h




Thanks for that suggestion on the first variant, that's actually easier 
than I had thought it would be!


Kieren,
That was my first thought but I kept getting duplicate signatures when I 
was trying it. I'm positive it was user error.
When I increase the grob, how (or can?) I adjust it on the fly for 
certain pages if the distance between instruments change for layout 
reasons? Otherwise the grob would look 'off'.


How could I approach that case if possible? Thanks! :)




PS. Sorry about the duplicates, I accidentally hit send before I 
pngquant'd my attachments. Tried to cancel the send but wasn't fast enough!



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


Re: Changing default \partcombine rest behaviour

2018-05-18 Thread Brent Annable
Just bumping this up, since nobody has replied yet.

Brent.

On 17 May 2018 at 19:50, Brent Annable  wrote:

> Hi all,
>
> I've just started using \partcombine, and have noticed that, by default,
> it doesn't print a rest in one part that coincides with a note of the same
> duration in the other part. I want it to print both the note and the
> rest. I know that I can use \partcombineApart to get around individual
> instances of this behaviour, but a recent editing decision means I have to
> go through about 70 existing pieces and change them all using \partcombine,
> and I'd rather not have to manually search for missing rests and insert a
> bunch of \partcombineApart commands.
>
> Is there any way to override this behaviour globally, and make it print
> the rest and note separately? I enclose an example to show what I mean:
>
> \version "2.19.65"
>
> partA = \relative c' {e4^"Default" e r e}
>
> partB = \relative c' {e4 e \once \partcombineApart r e}
>
> partC = \relative c' {c4 c c c}
>
> \score {
>  \new Staff \with {printPartCombineTexts = ##f}
>  \partcombine \partA \partC
> }
>
> \score {
>  \new Staff \with {printPartCombineTexts = ##f}
>  \partcombine \partB \partC
> }
>
>
> Many thanks for your time and any input,
>
> Brent.
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Large Time Signatures Within Staves?

2018-05-18 Thread Lukas-Fabian Moser

Hi Ben,

I need to create a wind ensemble engraving where the time signatures 
are large and *within* the staves themselves, overlapping specific 
instruments/groups throughout the score. I know how to place the time 
signatures above the staff but I can't find a way to place them within 
the instruments and groups.


Does anyone know a snippet or function that allows this? Is it fairly 
easy to implement?



The first variant is very easy to achieve:

\version "2.19.80"

noTimeSig = { \omit TimeSignature }
largeTimeSig = {
  \numericTimeSignature
  \override Staff.TimeSignature.font-size = 9
}

\new StaffGroup <<
  \new Staff \with \noTimeSig {
    d''4
  }
  \new Staff \with \largeTimeSig {
    c''4
  }
  \new Staff \with \noTimeSig {
    d''4
  }
  \new Staff \with \noTimeSig {
    d''4
  }
  \new Staff \with \noTimeSig {
    d''4
  }
  \new Staff \with \largeTimeSig {
    d''4
  }
  \new Staff \with \noTimeSig {
    d''4
  }
>>

The second one is harder because it probably involves dealing with the 
precise amount of space between to staves - maybe for determining the 
size, but certainly for the positioning (which should be centered with 
respect to a group of two or more staves). It's no problem at all to 
move the time signature downwards, a fixed amount, but this is bound to 
mess up when inter-staff space varies. Logically, such a time signature 
should not be belong to a single staff but to a set of successive 
staves. Maybe one of the Lilypond/Scheme-wizards here will come up with 
something like that.


Best
Lukas



Thank you!


(attached examples)


___
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: Large Time Signatures Within Staves

2018-05-18 Thread Kieren MacMillan
Hi Ben,

Since (at least in the first example) the time signatures are centered on a 
staff, why not just increase the size of the TimeSignature grob, and then \omit 
(or \hide) it from other staves?

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Maintaining font-size regardless of staff-size

2018-05-18 Thread David Sumbler
On Fri, 2018-05-18 at 13:37 +0200, David Kastrup wrote:
> David Sumbler  writes:
> 
> > 
> > %%
> > \version "2.19.81"
> > 
> > #(set-global-staff-size 20)
> > \book {
> >   \bookOutputName "test1"
> >   \header { title = \markup \fontsize #10 "fontsize 10" }
> >   { c''1 }
> > }
> > 
> > #(set-global-staff-size 10)
> > \book {
> >   \bookOutputName "test2"
> >   \header { title = \markup \fontsize #16 "fontsize 16" }
> >   { c''1 }
> > }
> > %%
> > 
> > Here the text in the second output file is correctly sized, but
> > with
> > the horizontal spacing only half what it should be.  It is similar
> > to
> > the problem found with \abs-fontsize.
> > 
> > However, in this case the problem is unlikely to be an issue in
> > practice, because the only circumstances I have found in which it
> > occurs are when (a) the second staff size is exactly half (or
> > double)
> > the first staff size, AND (b) the second fontsize is smaller (or
> > greater) than the first by exactly 6.
> > 
> > Weird, eh?
> No.  Fontsize is defined in terms of 6th roots of 2.  So basically
> you
> are producing a font with quite exactly the same size.  LilyPond is
> likely reusing some aspect of it but then botches the spacing.

Yes, I assumed that the 6th root of 2 matter was behind the anomaly.
 But it's still a bug.

David


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


Re: Large Time Signatures Within Staves?

2018-05-18 Thread Ben

On 5/18/2018 7:41 AM, Andrew Bernard wrote:

Hi Ben,

How curious - isn't this solved by the thread I just created today on 
essentially the same topic?


Shifting time signatures must be in the wind!

Andrew


On 18 May 2018 at 21:20, Ben > wrote:



Does anyone know a snippet or function that allows this? Is it
fairly easy to implement?




Oh wow - must be!

I was hoping to get my signatures to overlap multiple instruments vs. 
just large and filling one staff. However both options are great to have 
available for sure.

I attached examples showing both - which did you solve?

I didn't know how to explicitly tell LilyPond to displace my time 
signatures to, for example:


*Overlap large enough to snap to both Flute Staves
*Overlap large enough to snap to Trumpet / Trombone
*Overlap large enough to snap to Chimes / Marimba
*Overlap large enough to snap to Cello / Basses

I see it being a little easier to make large time signatures offset in 
the score so they 'cover' one instrument staff - that is very helpful, 
but I am lost in making them large enough and cover 2+ instruments in 
the score.


Thanks for any help :)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Large Time Signatures Within Staves?

2018-05-18 Thread Andrew Bernard
Hi Ben,

How curious - isn't this solved by the thread I just created today on
essentially the same topic?

Shifting time signatures must be in the wind!

Andrew


On 18 May 2018 at 21:20, Ben  wrote:

>
> Does anyone know a snippet or function that allows this? Is it fairly easy
> to implement?
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Maintaining font-size regardless of staff-size

2018-05-18 Thread David Kastrup
David Sumbler  writes:

> %%
> \version "2.19.81"
>
> #(set-global-staff-size 20)
> \book {
>   \bookOutputName "test1"
>   \header { title = \markup \fontsize #10 "fontsize 10" }
>   { c''1 }
> }
>
> #(set-global-staff-size 10)
> \book {
>   \bookOutputName "test2"
>   \header { title = \markup \fontsize #16 "fontsize 16" }
>   { c''1 }
> }
> %%
>
> Here the text in the second output file is correctly sized, but with
> the horizontal spacing only half what it should be.  It is similar to
> the problem found with \abs-fontsize.
>
> However, in this case the problem is unlikely to be an issue in
> practice, because the only circumstances I have found in which it
> occurs are when (a) the second staff size is exactly half (or double)
> the first staff size, AND (b) the second fontsize is smaller (or
> greater) than the first by exactly 6.
>
> Weird, eh?

No.  Fontsize is defined in terms of 6th roots of 2.  So basically you
are producing a font with quite exactly the same size.  LilyPond is
likely reusing some aspect of it but then botches the spacing.

-- 
David Kastrup

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


Re: Maintaining font-size regardless of staff-size

2018-05-18 Thread David Sumbler
On Thu, 2018-05-17 at 12:30 +0200, David Kastrup wrote:
> David Sumbler  writes:
> 
> > 
> > On Wed, 2018-05-16 at 16:55 +0200, David Kastrup wrote:
> > > 
> > > David Sumbler  writes:
> > > 
> > > > 
> > > > 
> > > > At the moment I define variables for formatting title, composer
> > > > etc. at
> > > > the start of a score separately for each staff-size that I use.
> > > > 
> > > > A simple question: is there a way of getting the same layout
> > > > and
> > > > font-
> > > > sizes for the opening headings of, say, a part with 20-point
> > > > staves
> > > > and
> > > > a full score with 16-point staves without having to define the
> > > > layout
> > > > twice?
> > > > 
> > > > Using \abs-fontsize does not work, because the horizontal
> > > > spacing
> > > > is
> > > > still affected by the global staff size.
> > > Can you show how you are using \abs-fontsize ?
> > %%
> > \version "2.19.81"
> > 
> > #(set-global-staff-size 20)
> > \book {
> >   \bookOutputName "test1"
> >   \header { title = \markup \abs-fontsize #20 "abs-fontsize 20" }
> >   { c''1 }
> > }
> > 
> > #(set-global-staff-size 16)
> > \book {
> >   \bookOutputName "test2"
> >   \header { title = \markup \abs-fontsize #20 "abs-fontsize 20" }
> >   { c''1 }
> > }
> > K%%
> > 
> > In "test2" above the title letters are the correct size, but are
> > horizontally squashed together by a factor of 16/20.
> > 
> > David
> Ok, this is definitely off-color.  I suspected you writing
> 
> \abs-fontsize #20 { word word word } instead of, say,
> \abs-fontsize #20 \line { word word word } or
> \abs-fontsize #20 { "word word word" }
> 
> That would resize the individual words but leave alone the
> interword-space.  But here actually the letter space is ruined.  That
> definitely looks like \abs-fontsize is not doing what it should here.

Further to the above: in starting to try to create a work-around for my
difficulty with \abs-fontsize, I discovered an anomaly in the operation
of \fontsize.  This is shown in the following:

%%
\version "2.19.81"

#(set-global-staff-size 20)
\book {
  \bookOutputName "test1"
  \header { title = \markup \fontsize #10 "fontsize 10" }
  { c''1 }
}

#(set-global-staff-size 10)
\book {
  \bookOutputName "test2"
  \header { title = \markup \fontsize #16 "fontsize 16" }
  { c''1 }
}
%%

Here the text in the second output file is correctly sized, but with
the horizontal spacing only half what it should be.  It is similar to
the problem found with \abs-fontsize.

However, in this case the problem is unlikely to be an issue in
practice, because the only circumstances I have found in which it
occurs are when (a) the second staff size is exactly half (or double)
the first staff size, AND (b) the second fontsize is smaller (or
greater) than the first by exactly 6.

Weird, eh?

Should I file a bug report about these issues, and if so should it be
reported as one bug or two?  Or should I leave it to somebody who is
more au fait with the requirements and format of bug reports?

David

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


Large Time Signatures Within Staves?

2018-05-18 Thread Ben

Good morning,

I need to create a wind ensemble engraving where the time signatures are 
large and *within* the staves themselves, overlapping specific 
instruments/groups throughout the score. I know how to place the time 
signatures above the staff but I can't find a way to place them within 
the instruments and groups.


Does anyone know a snippet or function that allows this? Is it fairly 
easy to implement?


Thank you!


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


Re: Displace position of time signature

2018-05-18 Thread Andrew Bernard
Hi Aaron,

Both of these solutions are excellent and useful and exactly what I am
after. Thanks!

Manual fiddling of this stuff is fine by me for the New Complexity scores
that I do, which need lots of coaxing into shape.

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


Re: Broken Hairpin

2018-05-18 Thread foxfanfare
Thomas Morley-2 wrote
> No idea why alterBroken's not working, too late here to investigate.
> 
> Anyway, below may give you a starting point for a different coding:
> 
>   \override Hairpin.after-line-breaking =
>   #(lambda (grob)
>  (let* ((orig (ly:grob-original grob))
> (siblings (if (ly:grob? orig)
>   (ly:spanner-broken-into orig) '(
>(if (and (pair? siblings) (equal? grob (car siblings)))
>(ly:grob-set-property! grob 'thickness 10
> 
> Cheers,
>   Harm

Thank you Harm for this solution. This morning I tried alterBroken with
other propreties and it worked in certain cases.

For instance, the Y-offset property works well (which is good because it is
what I needed). But the exemple of thickness as written in the documentation
doesn't seem to work for hairpins, even when not written in a dynamic
context.

\new PianoStaff
<<
  \relative c' {
c4 d e f
\break
g_"working" f e d
\break 
c4 d -\alterBroken thickness #'(5 1) \< e f
\break
g^"not working" f\! e d
\break 
  }
  \new Dynamics {
\override PianoStaff.Hairpin.to-barline = ##f
\override PianoStaff.Hairpin.after-line-breaking = ##t
s1 -\alterBroken Y-offset #'(0 -7.5) \<
s2\! s

  }
  \relative c' {
c4 d e f
g f e d
c4 d e f
g f e d
  }
>> 



--
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: Combining full bar rests with omitted grobs in between

2018-05-18 Thread David Kastrup
Thomas Morley  writes:

> 2018-05-18 10:12 GMT+02:00 Davide Liessi :
>> Dear all,
>> is there a way to combine the two full bar rests in one multimeasure
>> rest in the following example?
>>
>> \version "2.19.81"
>> \new Staff <<
>>   \compressFullBarRests
>>   {
>> s1
>> \once \omit Score.MetronomeMark
>> \tempo "test"
>>   }
>>   {
>> R1*2
>>   }

>>
>> Use case: I have all tempo marks for the full score and parts in one
>> variable, but I need to hide a couple of tempo marks in one of the
>> parts (requested by the conductor).

[...]

>> Is there a solution?
>> Is there a way to actually delete an omitted grob?

You'd need to work with tags and alternative passages.

> Yes, there is, but the result is not what you want.
> \once \override Score.MetronomeMark.before-line-breaking = #ly:grob-suicide!
>
> The different length of s1 and R1*2 will always result into a splitted
> MultiMeasureRest, afaik.

It's instructive and/or sobering to see what \expandFullBarRests (the
actual default setting) does.  It just makes the internal timer tick at
every bar.  It creates no grob, does no typesetting, nothing.  Other
engravers then create objects like bars and stuff.

-- 
David Kastrup

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


Re: Combining full bar rests with omitted grobs in between

2018-05-18 Thread bobr...@centrum.is
I’m responding from my phone so I can’t create an example, but you use tags.  
See the docs:

http://lilypond.org/doc/v2.19/Documentation/notation/different-editions-from-one-source


- Davide Liessi  wrote:
> Dear all,
> is there a way to combine the two full bar rests in one multimeasure
> rest in the following example?
> 
> \version "2.19.81"
> \new Staff <<
>   \compressFullBarRests
>   {
> s1
> \once \omit Score.MetronomeMark
> \tempo "test"
>   }
>   {
> R1*2
>   }
> >>
> 
> Use case: I have all tempo marks for the full score and parts in one
> variable, but I need to hide a couple of tempo marks in one of the
> parts (requested by the conductor).
> 
> I tried the approaches mentioned in the thread
> http://lists.gnu.org/archive/html/lilypond-user/2014-11/msg00267.html
> but they didn't work, probably because omitting the grob only makes it
> invisible and with null extent but does not delete it.
> 
> Is there a solution?
> Is there a way to actually delete an omitted grob?
> 
> Best wishes.
> Davide
> 
> ___
> 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: Combining full bar rests with omitted grobs in between

2018-05-18 Thread Thomas Morley
2018-05-18 10:12 GMT+02:00 Davide Liessi :
> Dear all,
> is there a way to combine the two full bar rests in one multimeasure
> rest in the following example?
>
> \version "2.19.81"
> \new Staff <<
>   \compressFullBarRests
>   {
> s1
> \once \omit Score.MetronomeMark
> \tempo "test"
>   }
>   {
> R1*2
>   }
>>>
>
> Use case: I have all tempo marks for the full score and parts in one
> variable, but I need to hide a couple of tempo marks in one of the
> parts (requested by the conductor).
>
> I tried the approaches mentioned in the thread
> http://lists.gnu.org/archive/html/lilypond-user/2014-11/msg00267.html
> but they didn't work, probably because omitting the grob only makes it
> invisible and with null extent but does not delete it.
>
> Is there a solution?
> Is there a way to actually delete an omitted grob?
>
> Best wishes.
> Davide


Yes, there is, but the result is not what you want.
\once \override Score.MetronomeMark.before-line-breaking = #ly:grob-suicide!

The different length of s1 and R1*2 will always result into a splitted
MultiMeasureRest, afaik.

See:

\new Staff <<
  \compressFullBarRests
  { s1 }
  { R1*2 }
>>

Same for { s1 s1 }, only { s1*2 } would work.

Cheers,
  Harm

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


Combining full bar rests with omitted grobs in between

2018-05-18 Thread Davide Liessi
Dear all,
is there a way to combine the two full bar rests in one multimeasure
rest in the following example?

\version "2.19.81"
\new Staff <<
  \compressFullBarRests
  {
s1
\once \omit Score.MetronomeMark
\tempo "test"
  }
  {
R1*2
  }
>>

Use case: I have all tempo marks for the full score and parts in one
variable, but I need to hide a couple of tempo marks in one of the
parts (requested by the conductor).

I tried the approaches mentioned in the thread
http://lists.gnu.org/archive/html/lilypond-user/2014-11/msg00267.html
but they didn't work, probably because omitting the grob only makes it
invisible and with null extent but does not delete it.

Is there a solution?
Is there a way to actually delete an omitted grob?

Best wishes.
Davide

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


Re: lyluatex: captions and page breaks

2018-05-18 Thread Federico Bruni



Il giorno gio 17 mag 2018 alle 9:00, Urs Liska  
ha scritto:



Am 17.05.2018 um 08:54 schrieb Federico Bruni:

Hi all

As lyluatex does not support captions¹, so far I've used 
\header{piece="Caption"} in the lilypond snippet to display a title 
before the music fragment.
I'm ok with the way it looks. The problem is that sometimes this 
title is put just before a page break, so caption and figure are 
separate. How can I avoid it?


I've also tried using latex captions, but this does not solve this 
page breaking issue.
Specifically, I've used the caption package and the command 
\captionof, as described here:
https://tex.stackexchange.com/questions/350835/caption-out-of-float-error-when-using-caption/350836 



Thanks in advance
Federico


It has been decided to *not* have lyluatex bother with matters of 
advanced integration.


Can't you simply write something like (can't test right now):

\begin{figure}
\begin{lilypond}
{
  c'
}
\end{lilypond}
\caption{My example}
\end{figure}


?



Yes, this is definitely the way to go. Thanks!

Eventually, I came up with this to place the figures exactly where they 
are in the source and center them on the page (float package is 
required by the H option):


\begin{figure}[H]
\centering
\caption{My caption}
{
 c'
}
\end{lilypond}
\end{figure}




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


Re: Displace position of time signature

2018-05-18 Thread Aaron Hill

On 2018-05-17 19:05, Andrew Bernard wrote:

Thank you very much. The next logical (or stupid?) question is, can one
snug the notes under the time signature, as though it occupied no 
space?



  \version "2.19.81"
  { \override Staff.TimeSignature.Y-offset = #4
\override Staff.TimeSignature.X-extent = #'(-2 . -2)
\override Staff.TimeSignature.X-offset = #1
\time 3/4 c'4 d' e' | \time 5/4 f'4 g' a' b' c'' }


You should note that this example lies about the extents of the grob, so 
it will very easily produce collisions that require manual adjustment to 
resolve.


Regarding the snippet Karlin found, you will need to be mindful of font 
size.  Here is a variant that uses \abs-fontsize to ensure the results 
are consistent between use in a rehearsal mark as well as being 
associated with a note:



  \version "2.19.81"
  #(define-markup-command (timesig layout props body) (markup-list?)
(interpret-markup layout props
  #{ \markup \override #'(baseline-skip . 0) \abs-fontsize #11
 \number \column $body #}))

  { \omit Staff.TimeSignature
\time 3/4 \mark \markup \timesig { 3 4 } c'4 d' e' |
\time 5/4 f'4^\markup \timesig { 5 4 } g' a' b' c'' }



-- Aaron Hill

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