Re: Missing end-of-stave barline?

2023-01-09 Thread Mark Probert
 Thanks!

-mark.


On 9 Jan 2023 at 17:58:10, Jean Abou Samra  wrote:

>
>
> Le 9 janv. 2023 à 07:56, Mark Probert  a écrit :
>
> Hi.
>
> When I run this snippet the barline at the end of first stave, which
> I think should be a “||”, goes “missing” (there is no barline at all).
>
> Is there a correct way of setting the end of stave barline in this kind of
> situation?
>
>
>
>
> Look up \section in the manual. It is designed for exactly this.
>
> Best,
> Jean
>
>


Re: Missing end-of-stave barline?

2023-01-09 Thread Valentin Petzel
Hello Mark,

somewhat OT, but you should let \repeat volta handle the setting of bar lines. 
If you want 
winged repeats set

\set Staff.startRepeatBarType = #"[|:"
\set Staff.endRepeatBarType = #":|]"

or even for all Staves

\set Score.startRepeatBarType = #"[|:"
\set Score.endRepeatBarType = #":|]"

Now to your actual problem: As Jean already said with a recent version of 
Lilypond you 
should let most of the Bars be handled by Lilypond itself:

Use \repeat volta for repeats and \repeat segno for jumps, and use \section 
instead of "||" 
and \fine instead of "|." and set the corresponding context properties as 
described in this 
part of the documentation:

https://lilypond.org/doc/v2.24/Documentation/notation/bars#automatic-bar-lines[1]

This way of doing things allows us to tell Lilypond what we want instead of 
manually 
specifying what we want things to look like.

But if you want to do things manually you need to keep in mind that at one time 
we can 
only have one bar line, so \bar "||" \bar "[|:" will only keep \bar "[|:". 
Instead of this you 
want to use a bar that is "[|:" in staff and after line breaks and "||" and the 
end of line. 
This can be done using

\bar "[|:-||"

In fact \bar "[|:" will not print anything at the end of a bar, so you should 
usually default 
to \bar "[|:-|" (single Bar line at end of line). (The same holds true for 
".|:" by the way!).

Using \repeat, \section, \fine and such will automatically take care of 
constellations such 
as barline-repeat or double repeats.

Cheers,
Valentin

Am Montag, 9. Jänner 2023, 12:07:07 CET schrieb Mark Probert:
>  Thanks!
> 
> -mark.
> 
> On 9 Jan 2023 at 17:58:10, Jean Abou Samra  wrote:
> > Le 9 janv. 2023 à 07:56, Mark Probert  a écrit :
> > 
> > Hi.
> > 
> > When I run this snippet the barline at the end of first stave, which
> > I think should be a “||”, goes “missing” (there is no barline at all).
> > 
> > Is there a correct way of setting the end of stave barline in this kind of
> > situation?
> > 
> > 
> > 
> > 
> > Look up \section in the manual. It is designed for exactly this.
> > 
> > Best,
> > Jean




[1] 
https://lilypond.org/doc/v2.24/Documentation/notation/bars#automatic-bar-lines


signature.asc
Description: This is a digitally signed message part.


Font change in 2.24.0 Figured bass "4"

2023-01-09 Thread Richard Shann
The figure "4" in figured bass is coming out with a stunted upright in
the new release

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
%\version "2.20.0"
\version "2.24.0"
\score {
\new Staff  << 
\context Staff \figuremode { <4> }
 \new Voice {  \clef bass   c  } 
 >>
   } 
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
gives a strange-looking 4 which resembles an upside-down 7 with a
smudge on it, quite difficult to decipher (see attached examples).

Is this a bug and how can I access the previously used font?

Richard Shann



Re: Font change in 2.24.0 Figured bass "4"

2023-01-09 Thread Werner LEMBERG


> The figure "4" in figured bass is coming out with a stunted upright in
> the new release
> 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> %\version "2.20.0"
> \version "2.24.0"
> \score {
> \new Staff  << 
> \context Staff \figuremode { <4> }
>  \new Voice {  \clef bass   c  } 
>  >>
>} 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
>
> gives a strange-looking 4 which resembles an upside-down 7 with a
> smudge on it, quite difficult to decipher (see attached examples).
> 
> Is this a bug

No.  This is intentional, since previously you could mix up digit 4
with digit 1.  BTW, I disagree with the deciphering issue :-) Note
also that the smaller the font size, the smaller the difference
between the two types of digit four become.

> and how can I access the previously used font?

The glyph you are searching for is called 'fattened.fixedwidth.four',
to be activated with font features (see the documentation of the
`\number` markup for some explanation).  Here is an example to change
this globally.

```
#(set-global-staff-size 26)

\score {
  <<
\new Voice { d'4 d'4 }
\new FiguredBass \figures { <4> <4\+> }
  >>
}

\layout {
  \context {
\FiguredBass
figuredBassPlusDirection = #RIGHT
\override BassFigure.font-features = #'("tnum" "ss01")
  }
}
```

The only drawback is that the 'fourplus' glyph always have the short
stem.


Werner


Re: Removing staves when using remove-layer

2023-01-09 Thread Saul Tobin
I answered my own question: create an invisible context with remove-layer =
3. For anyone curious:

\version "2.24.0"

\layout {
  \context {
\name "NullStaff"
\type "Engraver_group"
\consists Axis_group_engraver
\override VerticalAxisGroup.staff-affinity = #DOWN
  }
  \context {
\Score
\accepts NullStaff
  }
  \context {
\StaffGroup
\consists Keep_alive_together_engraver
  }
}

restsAlive = #'(stem-interface
note-head-interface
rest-interface
)

I = {
  \tag #'individual \unset Staff.keepAliveInterfaces
  e'1
  \break
  \tag #'individual \set Staff.keepAliveInterfaces = #'()
  e'1
  \break
  R1^"show rests in the combined staff for normal systems"
  \tag #'combined \set Staff.keepAliveInterfaces = #'()
  % When rests are set to "worth living" don't put these changes on the
system break
  % This is due to a bug when an MMR is before or after the break
  R1
  \break
  R1
  \break
  R1
  \tag #'combined \set Staff.keepAliveInterfaces = \restsAlive
  R1
}

II = {
  c'1
  c'1
  R1
  R1*2
  R1*2
}

<<
  \new Staff { g'1 g'1 g'1 g'1 g'1^"hide the combined staff for crowded
systems" g'1 g'1 }
  \new StaffGroup <<
\new NullStaff \with {
  \override VerticalAxisGroup.remove-layer = 3
} { s1*5 }
 \new Staff = "1+2" \with {
   instrumentName = "1 2"
   shortInstrumentName = "1 2"
   \override VerticalAxisGroup.remove-empty = ##t
   \override VerticalAxisGroup.remove-first = ##t
   \override VerticalAxisGroup.remove-layer = 2
   keepAliveInterfaces = \restsAlive
 } \removeWithTag #'individual << \partCombine \I \II >>
 \new Staff = "1" \with {
   instrumentName = "1"
   shortInstrumentName = "1"
   \override VerticalAxisGroup.remove-empty = ##t
   \override VerticalAxisGroup.remove-first = ##t
   \override VerticalAxisGroup.remove-layer = 1
   keepAliveInterfaces = #'()
 } \removeWithTag #'combined \I
 \new Staff = "2" \with {
   instrumentName = "2"
   shortInstrumentName = "2"
   \override VerticalAxisGroup.remove-empty = ##t
   \override VerticalAxisGroup.remove-first = ##t
   \override VerticalAxisGroup.remove-layer = 1
   keepAliveInterfaces = #'()
 } \removeWithTag #'combined \II
   >>
 \new Staff { \clef bass c1 c1 c1 c1 c1 c1 c1 }
>>

On Sun, Jan 8, 2023 at 5:13 PM Saul Tobin 
wrote:

> Hi all,
>
> When condensing staves using remove-layer as described here
> https://lilypond.org/doc/v2.24/Documentation/notation/modifying-single-staves#hiding-staves,
> what is the best way to temporarily hide the combined staff as well as the
> individual staves? E.g. for a particularly crowded system where both
> players have rests.
>
> Thanks for your help,
>
> Saul
>


Re: Missing end-of-stave barline?

2023-01-09 Thread Mark Probert
Many thanks, Valentin! I find, as a casual user of LP, I get in a “working
rut,” using what works without fulling understanding then consequences.
This explanation is very helpful to me and I’m heading back to rework my
music.

-mark.


On 9 Jan 2023 at 23:57:12, Valentin Petzel  wrote:

> Hello Mark,
>
> somewhat OT, but you should let \repeat volta handle the setting of bar
> lines. If you want winged repeats set
>
> \set Staff.startRepeatBarType = #"[|:"
>
> \set Staff.endRepeatBarType = #":|]"
>
> or even for all Staves
>
> \set Score.startRepeatBarType = #"[|:"
>
> \set Score.endRepeatBarType = #":|]"
>
> Now to your actual problem: As Jean already said with a recent version of
> Lilypond you should let most of the Bars be handled by Lilypond itself:
>
> Use \repeat volta for repeats and \repeat segno for jumps, and use
> \section instead of "||" and \fine instead of "|." and set the
> corresponding context properties as described in this part of the
> documentation:
>
>
> https://lilypond.org/doc/v2.24/Documentation/notation/bars#automatic-bar-lines
>
> This way of doing things allows us to tell Lilypond what we want instead
> of manually specifying what we want things to look like.
>
> But if you want to do things manually you need to keep in mind that at one
> time we can only have one bar line, so \bar "||" \bar "[|:" will only keep
> \bar "[|:". Instead of this you want to use a bar that is "[|:" in staff
> and after line breaks and "||" and the end of line. This can be done using
>
> \bar "[|:-||"
>
> In fact \bar "[|:" will not print anything at the end of a bar, so you
> should usually default to \bar "[|:-|" (single Bar line at end of line).
> (The same holds true for ".|:" by the way!).
>
> Using \repeat, \section, \fine and such will automatically take care of
> constellations such as barline-repeat or double repeats.
>
> Cheers,
>
> Valentin
>
> Am Montag, 9. Jänner 2023, 12:07:07 CET schrieb Mark Probert:
>
> >  Thanks!
>
> >
>
> > -mark.
>
> >
>
> > On 9 Jan 2023 at 17:58:10, Jean Abou Samra  wrote:
>
> > > Le 9 janv. 2023 à 07:56, Mark Probert  a écrit :
>
> > >
>
> > > Hi.
>
> > >
>
> > > When I run this snippet the barline at the end of first stave, which
>
> > > I think should be a “||”, goes “missing” (there is no barline at all).
>
> > >
>
> > > Is there a correct way of setting the end of stave barline in this
> kind of
>
> > > situation?
>
> > >
>
> > >
>
> > >
>
> > >
>
> > > Look up \section in the manual. It is designed for exactly this.
>
> > >
>
> > > Best,
>
> > > Jean
>
>
>


Is there a simple way to test for command line options?

2023-01-09 Thread Kevin Cole
Is there a way, within a .ly file to conditionally include sections
based on command line options?

Specifically, I would like to have \paper settings go one way for
"lilypond --pdf" and another way for "lilypond --svg".



Re: Is there a simple way to test for command line options?

2023-01-09 Thread Hans Aikema

> On 10 Jan 2023, at 00:01, Kevin Cole  wrote:
> 
> Is there a way, within a .ly file to conditionally include sections
> based on command line options?
> 
> Specifically, I would like to have \paper settings go one way for
> "lilypond --pdf" and another way for "lilypond --svg".

Kevin, 

don't know of a way with inspecting commandline options, but if environment 
variables will do for your case: I have the following pattern in use to switch 
between two page layouts that mainly differ in the \paper block
myLayout = #(string-append "layout/" (getenv "MY_BASE") "PageSetup.ily")
\include \myLayout
Kind regards,
Hans


Re: Is there a simple way to test for command line options?

2023-01-09 Thread Kevin Cole
On Mon, Jan 9, 2023 at 7:07 PM Hans Aikema  wrote:

> On 10 Jan 2023, at 00:01, Kevin Cole  wrote:
>
> Is there a way, within a .ly file to conditionally include sections
> based on command line options?
>
> Specifically, I would like to have \paper settings go one way for
> "lilypond --pdf" and another way for "lilypond --svg".
>
>
> Kevin,
>
> don't know of a way with inspecting commandline options, but if
> environment variables will do for your case: I have the following pattern
> in use to switch between two page layouts that mainly differ in the \paper
> block
>
> myLayout = #(string-append "layout/" (getenv "MY_BASE") 
> "PageSetup.ily")\include \myLayout
>
>
Not quite what I was hoping for, but, yes, thanks. I believe I can make
that work reasonably nicely for me. (I can use the environment variable in
a shell script to choose the CLI options as well as in the wee bit you
included, effectively achieving the same thing.)


Re: Resize \rhythm in mixed markup

2023-01-09 Thread David Kastrup
Thomas Morley  writes:

> Am So., 8. Jan. 2023 um 10:21 Uhr schrieb Thomas Morley
> :
>>
>> Hi,
>>
>> consider below
>>
>> \version "2.24.0"
>>
>> \score {
>>   { g'1^\markup { My Rhythm \rhythm { 8[ 8] } } }
>>   \layout {
>> \context {
>>   \StandaloneRhythmStaff
>>   fontSize = #6
>> }
>>   }
>> }
>>
>> I'll have numerous such markups combining straight text and \rhythm.
>> Thus I'd like to have a method to adjust the \rhythm-part in a
>> score-layout without affecting other parts of TextScripts.
>> Alas the setting fontSize takes no effect.
>>
>> How to?
>>
>> Cheers,
>>   Harm
>
> Actually it works, if the \layout is placed toplevel.
> A bug?

Try 

-- 
David Kastrup



Question about custom articulation

2023-01-09 Thread Rip _Mus
Hello,
I'm trying to define a new articulation, based on two stencils (above and
below the staff), that I wrote.
I succeeded in making two distinct articulations. However, the attempt to
create a single articulation, which chooses the stencil based on the
direction specified in the post-event, failed.
Does anyone have any advice for me?
I attach the file I'm working on.

Thank you!

Rip_mus
\version "2.24.0"

lAccUpStencil = #(ly:stencil-rotate-absolute
   (make-path-stencil
'(
   moveto 0 0
   curveto -0.25 1 -0.5 4 -0.5 5
   rcurveto 0.25 0.1 0.75 0.1 1 0
   curveto 0.5 4 0.25 1 0 0
   closepath
   )
0.01
0.3
0.3
#t
)
   -45
   0
   0
   )

lAccDownStencil = #(ly:stencil-rotate-absolute
   (make-path-stencil
'(
   moveto 0 0
   curveto -0.25 1 -0.5 4 -0.5 5
   rcurveto 0.25 0.1 0.75 0.1 1 0
   curveto 0.5 4 0.25 1 0 0
   closepath
   )
0.01
0.3
0.3
#t
)
   -135
   0
   0
   )

#(append! default-script-alist
   (list
`(little-accent-up
   . (
   (stencil . ,lAccUpStencil)
   (toward-stem-shift-in-column . 0.0)
   (padding . 0.20)
   (avoid-slur . around)
   (direction . ,UP)))
`(little-accent-down
   . (
   (stencil . ,lAccDownStencil)
   (toward-stem-shift-in-column . 0.0)
   (padding . 0.20)
   (avoid-slur . around)
   (direction . ,DOWN)))
`(little-accent
   . (
   (stencil . (lAccUpStencil . lAccDownStencil))
   (toward-stem-shift-in-column . 0.0)
   (padding . 0.20)
   (avoid-slur . around)
   (direction . ,UP)))
)
   )

\layout {
  \context {
\Score
scriptDefinitions = #default-script-alist
  }
}

lAccUp = #(make-articulation 'little-accent-up)
lAccDown = #(make-articulation 'little-accent-down)
lAcc = #(make-articulation 'little-accent)


{
  a''4\lAccUp c'\lAccDown c'\lAcc
}