Re: sectionLabel with box - global formatting

2023-04-01 Thread Simon Martineau
Hi Stephan,

You can try this way :

\override Score.SectionLabel.stencil = #(make-stencil-boxer 0.1 0.5
ly:text-interface::print)

Simon


Le sam. 1 avr. 2023 à 21:04,  a écrit :

> Send lilypond-user mailing list submissions to
> lilypond-user@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> or, via email, send a message with subject or body 'help' to
> lilypond-user-requ...@gnu.org
>
> You can reach the person managing the list at
> lilypond-user-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lilypond-user digest..."
>
>
> Today's Topics:
>
>1. Alternative beginnings (John Burt)
>2. Re: Alternative beginnings (David Kastrup)
>3. Re: Alternative beginnings (Jean Abou Samra)
>4. Re: Alternative beginnings (Jonathan Poulin)
>5. sectionLabel with box - global formatting (Stephan Schöll)
>6. LilyPond 2.25.3 (Jonas Hahnfeld)
>
>
> --
>
> Message: 1
> Date: Sat, 1 Apr 2023 12:05:19 -0400
> From: John Burt 
> To: lilypond-user 
> Subject: Alternative beginnings
> Message-ID:
> <
> caaetda4ycbnq7_6hcef5w0fp4hdhsltdz6f2uxsuqxj_obn...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I know how to use \repeat volta to produce alternative endings. I'm trying
> to set a song in which the music for verses 2 and 3 is different from the
> music for verse 1. Is there something like \repeat volta for alternative
> beginnings?
> thanks
> John
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> https://lists.gnu.org/archive/html/lilypond-user/attachments/20230401/ac934b0c/attachment.htm
> >
>
> --
>
> Message: 2
> Date: Sat, 01 Apr 2023 18:21:04 +0200
> From: David Kastrup 
> To: John Burt 
> Cc: lilypond-user 
> Subject: Re: Alternative beginnings
> Message-ID: <87bkk7d15b@fencepost.gnu.org>
> Content-Type: text/plain
>
> John Burt  writes:
>
> > I know how to use \repeat volta to produce alternative endings. I'm
> trying
> > to set a song in which the music for verses 2 and 3 is different from the
> > music for verse 1. Is there something like \repeat volta for alternative
> > beginnings?
>
> Would
>
> { Verse 1
>   \repeat volta 3 { chorus
> \alternative { { verse 2 }
>{ verse 3 }
>{ final bar } } } }
>
> do the trick for you?
>
>
> --
> David Kastrup
>
>
>
> --
>
> Message: 3
> Date: Sat, 01 Apr 2023 18:22:10 +0200
> From: Jean Abou Samra 
> To: John Burt , lilypond-user
> 
> Subject: Re: Alternative beginnings
> Message-ID:
> 
> Content-Type: text/plain; charset="utf-8"
>
> Le samedi 01 avril 2023 à 12:05 -0400, John Burt a écrit :
>
> > > I know how to use \repeat volta to produce alternative endings. I'm
> trying to set a song in which the music for verses 2 and 3 is different
> from the music for verse 1. Is there something like
> > > \repeat volta for alternative beginnings?
>
>
> Since version 2.24, `\alternative` is not limited to the end of a repeat.
> You can use
>
> ```
> \version "2.24.1"
>
> {
>   \repeat volta 2 {
> \alternative {
>   \volta 1 {
> c'1
>   }
>   \volta 2 {
> d'1
>   }
> }
> e'1
>   }
> }
> ```
>
> Note that the legacy syntax `\repeat volta x { ... } \alternative { ... }`
> is not
> encouraged anymore, the syntax `\repeat volta x { ... \alternative { ... }
> }` is
> preferred now.
>
> Best,
>
> Jean
>
>
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> https://lists.gnu.org/archive/html/lilypond-user/attachments/20230401/dfd8efbe/attachment.htm
> >
> -- next part --
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 228 bytes
> Desc: This is a digitally signed message part
> URL: <
> https://lists.gnu.org/archive/html/lilypond-user/attachments/20230401/dfd8efbe/attachment.sig
> >
>
> --
>
> Message: 4
> Date: Sat, 1 Apr 2023 14:03:23 -0400
> From: Jonathan Poulin 
> To: John Burt 
> Cc: lilypond-user 
> Subject: Re: Alternative beginnings
> Message-ID:
> <
> cagmz-a6wgmrrkjnggjszovdw

Question for Windows users

2023-04-01 Thread Jean Abou Samra
Hi,

A little question for Windows users: could one of you please
do the following test and report back?

1. Choose any font that is NOT installed on your system.
   Random choice: https://www.fontsquirrel.com/fonts/alex-brush
   It's very recognizable, so it'll be easy to tell if the
   font is being properly used. I will assume you use this
   font (“AlexBrush”) in the following.

2. Create a .ly file in some directory on your computer. Put
   the font .otf/.ttf file(s) in that directory.

3. Add this code to the .ly file and compile it:


   \version "2.24.1"
   #(ly:font-config-add-directory "C:/path/to/directory")
   \markup \override #'(font-name . "AlexBrush") "ABCD"


   where "C:/path/to/directory" is the path to the directory
   you put the .ly file and the font in, with 4 different
   variants. Please test all 4 and let me know which work
   and which don't.

   a) Slashes in the path and a slash at the end:
  C:/path/to/directory/
   b) Slashes in the path and no slash at the end:
  C:/path/to/directory
   c) Double backslashes in the path and a double backslash at the end:
  C:\\path\\to\\directory\\
   d) Double backslashes in the path and no double backslash at the end:
  C:\\path\\to\\directory



Thanks in advance.


Jean



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


Re: sectionLabel with box - global formatting

2023-04-01 Thread Stephan Schöll

Jean,

Am 01.04.2023 um 21:13 schrieb Jean Abou Samra:


Le samedi 01 avril 2023 à 21:02 +0200, Stephan Schöll a écrit :


Hi Ponders

In earlier scores of mine I used

/mark /markup {  /box "Mark Label" }

Now that I'm migrating (some of) those to /sectionLabel (yes, I can
simply replace /mark by /sectionLabel) I wonder how I could add the
box globally. I know that I could accomplish that with a
substitution function like

sctLbl = #(define-music-function    (label)    (markup?)    #{ 
\sectionLabel \markup {\box #label }    #})

\relative c' { \sctLbl "Hello" c d e f }

But my programmer's gut feeling tells me that a configuration
approach would be the preferred one. I guess the solution looks
something like this

\layout {

   \context {

 \Score

 \set Score.markFormatter = ...

   }

}


Try

|\version "2.24.1" \layout { \context { \Score \override
SectionLabel.stencil = #(make-stencil-boxer 0.15 0.5
ly:text-interface::print) } } { c'1 \sectionLabel "Coda" c' }|


perfetto, thanks a lot!


||

Also, consider using |\textMark| rather than |\sectionLabel| in case
your text is not semantically a section label.


sure! That's why I like the ability to introduce semantic structure with
section / sectionLabel :-)


Best,

Jean



Re: sectionLabel with box - global formatting

2023-04-01 Thread Jean Abou Samra
Le samedi 01 avril 2023 à 21:02 +0200, Stephan Schöll a écrit :

> > Hi Ponders
> > 
> > In earlier scores of mine I used
> > 
> > /mark /markup {  /box "Mark Label" }
> > 
> > Now that I'm migrating (some of) those to /sectionLabel (yes, I can
> > simply replace /mark by /sectionLabel) I wonder how I could add the box
> > globally. I know that I could accomplish that with a substitution
> > function like
> > 
> > sctLbl =
> > #(define-music-function
> >    (label)
> >    (markup?)
> >    #{
> >  \sectionLabel \markup {\box #label }
> >    #})
> > 
> > \relative c' { \sctLbl "Hello" c d e f }
> > 
> > But my programmer's gut feeling tells me that a configuration approach
> > would be the preferred one. I guess the solution looks something like this
> > 
> > \layout {
> > 
> >    \context {
> > 
> >  \Score
> > 
> >  \set Score.markFormatter = ...
> > 
> >    }
> > 
> > }



Try

```
\version "2.24.1"

\layout {
  \context {
\Score
\override SectionLabel.stencil =
  #(make-stencil-boxer 0.15 0.5 ly:text-interface::print)
  }
}

{
  c'1
  \sectionLabel "Coda"
  c'
}
```

Also, consider using `\textMark` rather than `\sectionLabel` in case your text 
is not semantically a section label.

Best,

Jean


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


LilyPond 2.25.3

2023-04-01 Thread Jonas Hahnfeld via LilyPond user discussion
We are happy to announce the release of LilyPond 2.25.3. This is termed
a development release, but these are usually reliable for testing new
features and recent bug fixes. However, if you require stability, we
recommend using version 2.24.1, the current stable release.
Please refer to the Installing section in the Learning Manual for
instructions how to set up the provided binaries:
https://lilypond.org/doc/v2.25/Documentation/learning/installing


P.S.: This is not an April Fool, but just an ordinary and boring
unstable release...


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


sectionLabel with box - global formatting

2023-04-01 Thread Stephan Schöll

Hi Ponders

In earlier scores of mine I used

/mark /markup {  /box "Mark Label" }

Now that I'm migrating (some of) those to /sectionLabel (yes, I can
simply replace /mark by /sectionLabel) I wonder how I could add the box
globally. I know that I could accomplish that with a substitution
function like

sctLbl =
#(define-music-function
  (label)
  (markup?)
  #{
    \sectionLabel \markup {\box #label }
  #})

\relative c' { \sctLbl "Hello" c d e f }

But my programmer's gut feeling tells me that a configuration approach
would be the preferred one. I guess the solution looks something like this

\layout {

  \context {

    \Score

    \set Score.markFormatter = ...

  }

}

TIA

Stephan




Re: Alternative beginnings

2023-04-01 Thread Jonathan Poulin
Maybe, this is what you want to get.

\version "2.24.1"

{
  a'1
  \repeat volta 3 {
b'1
\alternative {
  \volta 1 {
c'1
  }
  \volta 2,3 {
d'1
  }
}
  }
  e'1
}

regards
Jonathan

Le sam. 1 avr. 2023 à 12:22, Jean Abou Samra  a écrit :

> Le samedi 01 avril 2023 à 12:05 -0400, John Burt a écrit :
>
> I know how to use \repeat volta to produce alternative endings. I'm trying
> to set a song in which the music for verses 2 and 3 is different from the
> music for verse 1. Is there something like
> \repeat volta for alternative beginnings?
>
> Since version 2.24, \alternative is not limited to the end of a repeat.
> You can use
>
> \version "2.24.1"
>
> {
>   \repeat volta 2 {
> \alternative {
>   \volta 1 {
> c'1
>   }
>   \volta 2 {
> d'1
>   }
> }
> e'1
>   }
> }
>
> Note that the legacy syntax \repeat volta x { ... } \alternative { ... }
> is not encouraged anymore, the syntax \repeat volta x { ... \alternative
> { ... } } is preferred now.
>
> Best,
>
> Jean
>


Re: Alternative beginnings

2023-04-01 Thread Jean Abou Samra
Le samedi 01 avril 2023 à 12:05 -0400, John Burt a écrit :

> > I know how to use \repeat volta to produce alternative endings. I'm trying 
> > to set a song in which the music for verses 2 and 3 is different from the 
> > music for verse 1. Is there something like  
> > \repeat volta for alternative beginnings? 


Since version 2.24, `\alternative` is not limited to the end of a repeat. You 
can use

```
\version "2.24.1"

{
  \repeat volta 2 {
\alternative {
  \volta 1 {
c'1
  }
  \volta 2 {
d'1
  }
}
e'1
  }
}
```

Note that the legacy syntax `\repeat volta x { ... } \alternative { ... }` is 
not
encouraged anymore, the syntax `\repeat volta x { ... \alternative { ... } }` is
preferred now.

Best,

Jean




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


Re: Alternative beginnings

2023-04-01 Thread David Kastrup
John Burt  writes:

> I know how to use \repeat volta to produce alternative endings. I'm trying
> to set a song in which the music for verses 2 and 3 is different from the
> music for verse 1. Is there something like \repeat volta for alternative
> beginnings?

Would

{ Verse 1
  \repeat volta 3 { chorus
\alternative { { verse 2 }
   { verse 3 }
   { final bar } } } }

do the trick for you?


-- 
David Kastrup



Alternative beginnings

2023-04-01 Thread John Burt
I know how to use \repeat volta to produce alternative endings. I'm trying
to set a song in which the music for verses 2 and 3 is different from the
music for verse 1. Is there something like \repeat volta for alternative
beginnings?
thanks
John


DS al coda with coda mark within a repeat section

2023-04-01 Thread Jonathan Poulin
Hello,

I'm about to transcript a part that contains a D.S al coda with the to code
mark placed in a repeat section. The picture below shows an example of what
I want but with the code mark misplaced. I manually place the text "last
time to code" where I want it. I include the code I have.

Can you help me to get it right? Ideally a solution that will produce the
right output if I use the unfoldRepeats command.

thanks
Jonathan

[image: image.png]

\version "2.24.0"

lastTimeToCodaMark = \textEndMark \markup { \fontsize #-1
\column {
  \line { last time }
  \line { to coda 
  \fontsize #1
  \coda }
}
  }
  
{
  \relative c'' {
c4 c c c c c c c

\repeat segno 2 {
  c4 c c c 

  \repeat volta 2 {
c c c c
\lastTimeToCodaMark

\alternative {
  \volta 1 { c c c c }
  \volta 2 { c c c c }
}
  }

  c c c c
  
  \alternative {
\volta 1 {
  \repeat unfold 3 { c4 c c c }
}
\volta 2 \volta #'() {
  \section 
  \sectionLabel "Coda"
  <> \coda
}
  }
}

\repeat unfold 2 { c4 c c c }
\fine
  }

}

Re: temporarily overriding paper variables

2023-04-01 Thread Jean Abou Samra
Le mercredi 29 mars 2023 à 21:56 +0200, Jean Abou Samra a écrit :

> > It seems so, yes.  Jean, do you have an idea?  Shall I submit an
> > issue?
>
> I am not yet sure if this is a bug or not.


This is from `page-layout-problem.cc`:

```
void
Page_layout_problem::append_prob (Prob *prob, Spring const ,
  Real padding)
{
  SCM sky_scm = get_property (prob, "vertical-skylines");
  Real minimum_distance = 0;
  bool tight_spacing = from_scm (get_property (prob, "tight-spacing"));

  if (is_scm (sky_scm))
{
  const Skyline_pair  = from_scm (sky_scm);
  minimum_distance
= std::max (sky[UP].distance (bottom_skyline_), bottom_loose_baseline_);
  bottom_skyline_ = sky[DOWN];
}
  else if (auto *sten = unsmob (get_property (prob, "stencil")))
{
  Interval iv = sten->extent (Y_AXIS);
  minimum_distance = iv[UP] - bottom_skyline_.max_height ();

  bottom_skyline_.clear ();
  bottom_skyline_.set_minimum_height (iv[DOWN]);
}
```

`bottom_skyline_` is the skyline that is then used as the bottom skyline of
the markup when determining the spacing from the markup to the next system.

I don't see any place where the code is setting the `vertical-skylines` 
property on
`Paper_system` probs that are created from standalone markups.

So for standalone markups, padding is actually not using skyline spacing at 
all?!


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