Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-20 Thread Jean Abou Samra

Le 20/09/2022 à 04:27, David Wright a écrit :

On Mon 19 Sep 2022 at 17:45:24 (-0700), Kenneth Wolcott wrote:


   What is "\rightjust"? Is it a variable (macro) that you have
defined?  I can't find that command in the NR.  How does that differ
from right-align, which I tried and it didn't work for me.

Oops, I'm sorry. I forgot that I'm relying on my main library for
its definition:

rightjust = {
   \override Score.RehearsalMark.self-alignment-X = #right
   \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible
}

Of course, now I shall read Jean's contribution to see whether
I'm up-to-date. My libraries can otherwise fall behind the latest
ways of doing things.




This is the latest way of doing it as of LilyPond 2.23.13. However,
with a patch that has been merged just last night, the next version
will have a \textEndMark command making \textEndMark  somewhat
similar to \rightjust \mark  with your definition, but
creating a TextMark grob and not a RehearsalMark grob. The counterpart
is \textMark , which is sort of an equivalent of
\tweak self-alignment-X #LEFT \mark . We're adding these
to disentangle arbitrary text marks from "rehearsal" marks
(and there are some more differences: there can be several
text marks at the same moment, and the default font size is not
the same).

Jean




Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-19 Thread David Wright
On Mon 19 Sep 2022 at 17:45:24 (-0700), Kenneth Wolcott wrote:

>   What is "\rightjust"? Is it a variable (macro) that you have
> defined?  I can't find that command in the NR.  How does that differ
> from right-align, which I tried and it didn't work for me.

Oops, I'm sorry. I forgot that I'm relying on my main library for
its definition:

rightjust = {
  \override Score.RehearsalMark.self-alignment-X = #right
  \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible
}

Of course, now I shall read Jean's contribution to see whether
I'm up-to-date. My libraries can otherwise fall behind the latest
ways of doing things.

Cheers,
David.



Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-19 Thread Kenneth Wolcott
HI Jean;

  Now it finally starts to make sense!

Thanks,
Ken

On Mon, Sep 19, 2022 at 6:30 PM Jean Abou Samra  wrote:
>
> Le 20/09/2022 à 02:45, Kenneth Wolcott a écrit :
> > HI David;
> >
> >Thank you.
> >
> >What is "\rightjust"? Is it a variable (macro) that you have
> > defined? I can't find that command in the NR.
>
>
>
> I suppose David defined it as something like
>
> rightjust = \tweak self-alignment-X #RIGHT \etc
>
>
> The alignment of a mark is defined by self-alignment-X. #RIGHT
> specifies to align on the right side.
>
>
> > How does that differ
> > from right-align, which I tried and it didn't work for me.
>
>
>
> Trying to use alignment markup commands like \left-align, \center-align,
> \right-align, \general-align, \halign, etc. for aligning marks, text
> scripts or other textual objects is a mistake I have seen quite a number
> of people doing. I wonder if the manual should be explicitly warning against
> it, but it's difficult to know in which section to put it, since it can
> occur in many different contexts.
>
> The problem with `\mark \markup \right-align Fine` is that \right-align
> acts on the text that \mark prints as a RehearsalMark grob, but the
> RehearsalMark
> grob also realigns itself. For simplicity, let's assume rehearsal marks are
> always centered by default (it's more complex but this is illustrative).
> When you write "Fine", this makes a markup, and when this markup is
> interpreted,
> it has a certain width, say, '(0 . 4), which means from point 0 horizontally
> to point 4 (in a certain unit defined by LilyPond). To ensure the centering,
> the RehearsalMark grob will move itself by 2 units on the left so that
> this extent becomes '(-2 . 2). By using \right-align, you translate the
> Fine text in the initial step so its extent is '(-4 . 0), but the centering
> step still happens, and recenters at '(-2 . 2).
>
> Here is a little visualization. The red X indicates the X coordinate 0
> in the Fine markup. As you can see, \right-align does move the Fine text
> relative to this X, but the X also gets moved relative to the bar line,
> which cancels the effect.
>
>
> {
>c'1
>\mark \markup \combine
>  Fine % also try \right-align Fine
>  \with-outline \stencil #empty-stencil \fontsize #-5 \with-color
> "red" ×
> }
>
>
> So, instead of \right-align, you need to tweak self-alignment-X, which
> modifies the realignment step to suit your desired alignment. I hope
> that was clear.
>
>



Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-19 Thread Jean Abou Samra

Le 20/09/2022 à 02:45, Kenneth Wolcott a écrit :

HI David;

   Thank you.

   What is "\rightjust"? Is it a variable (macro) that you have
defined? I can't find that command in the NR.




I suppose David defined it as something like

rightjust = \tweak self-alignment-X #RIGHT \etc


The alignment of a mark is defined by self-alignment-X. #RIGHT
specifies to align on the right side.



How does that differ
from right-align, which I tried and it didn't work for me.




Trying to use alignment markup commands like \left-align, \center-align,
\right-align, \general-align, \halign, etc. for aligning marks, text
scripts or other textual objects is a mistake I have seen quite a number
of people doing. I wonder if the manual should be explicitly warning against
it, but it's difficult to know in which section to put it, since it can
occur in many different contexts.

The problem with `\mark \markup \right-align Fine` is that \right-align
acts on the text that \mark prints as a RehearsalMark grob, but the 
RehearsalMark

grob also realigns itself. For simplicity, let's assume rehearsal marks are
always centered by default (it's more complex but this is illustrative).
When you write "Fine", this makes a markup, and when this markup is 
interpreted,

it has a certain width, say, '(0 . 4), which means from point 0 horizontally
to point 4 (in a certain unit defined by LilyPond). To ensure the centering,
the RehearsalMark grob will move itself by 2 units on the left so that
this extent becomes '(-2 . 2). By using \right-align, you translate the
Fine text in the initial step so its extent is '(-4 . 0), but the centering
step still happens, and recenters at '(-2 . 2).

Here is a little visualization. The red X indicates the X coordinate 0
in the Fine markup. As you can see, \right-align does move the Fine text
relative to this X, but the X also gets moved relative to the bar line,
which cancels the effect.


{
  c'1
  \mark \markup \combine
    Fine % also try \right-align Fine
    \with-outline \stencil #empty-stencil \fontsize #-5 \with-color 
"red" ×

}


So, instead of \right-align, you need to tweak self-alignment-X, which
modifies the realignment step to suit your desired alignment. I hope
that was clear.





Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-19 Thread Kenneth Wolcott
HI David;

  Thank you.

  What is "\rightjust"? Is it a variable (macro) that you have
defined?  I can't find that command in the NR.  How does that differ
from right-align, which I tried and it didn't work for me.

Thanks,
Ken

On Mon, Sep 19, 2022 at 5:23 PM David Wright  wrote:
>
> On Mon 19 Sep 2022 at 16:28:35 (-0700), Kenneth Wolcott wrote:
>
> >   I have implemented the "Fine" and "D.C. al Fine" as rehearsal mark 
> > markups.
> >
> >   Now I have a problem where the "D.C. al Fine" consumes much more
> > space than the bar containing the dotted-half note, it even falls off
> > the right side of the page.
> >
> >   How does one expand the bar enough to contain the markup instead of
> > modifying the markup to fit the bar?
>
> Right justification is usual:
>
> global = {
>   \key c \major
>   \time 4/4
>   s1 * 4
>   \rightjust \mark \markup{ \smallCaps "Fine"}
>   \bar "|."
>   s1 * 10
>   \bar "||"
>   s1 * 10
>   \bar "||"
>   s1 * 9
>   \bar "||"
>   \rightjust \mark \markup{ "D.C. al Fine"}
> }
>
> Cheers,
> David.



Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-19 Thread David Wright
On Mon 19 Sep 2022 at 16:28:35 (-0700), Kenneth Wolcott wrote:

>   I have implemented the "Fine" and "D.C. al Fine" as rehearsal mark markups.
> 
>   Now I have a problem where the "D.C. al Fine" consumes much more
> space than the bar containing the dotted-half note, it even falls off
> the right side of the page.
> 
>   How does one expand the bar enough to contain the markup instead of
> modifying the markup to fit the bar?

Right justification is usual:

global = {
  \key c \major
  \time 4/4
  s1 * 4
  \rightjust \mark \markup{ \smallCaps "Fine"}
  \bar "|."
  s1 * 10
  \bar "||"
  s1 * 10
  \bar "||"
  s1 * 9
  \bar "||"
  \rightjust \mark \markup{ "D.C. al Fine"}
}

Cheers,
David.


Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-19 Thread Kenneth Wolcott
HI Valentin;

  Thank you for elaboration.

  I have implemented the "Fine" and "D.C. al Fine" as rehearsal mark markups.

  Now I have a problem where the "D.C. al Fine" consumes much more
space than the bar containing the dotted-half note, it even falls off
the right side of the page.

  How does one expand the bar enough to contain the markup instead of
modifying the markup to fit the bar?

Thanks,
Ken

On Mon, Sep 19, 2022 at 9:07 AM Valentin Petzel  wrote:
>
> Hi Ken,
>
> Lilypond has so called engravers at various levels that handle placement of
> stuff. If you do ^"some text" a so called TextScript event is created, which 
> is
> handled by an engraver at Staff level. The voltas on the other hand are 
> created
> by an engraver at Score level. Other events that are handled on score level
> are marks, so prior to Lilypond 23.6 (? I think this is where the new repeat
> segno stuff came) I’d use a RehearsalMark for these kinds of things (this also
> allows us to align the text to the end of the measure instead of a note).
>
> The new repeat segno stuff does create Marks and Stuff on Score level.
>
> Cheers,
> Valentin
>
> Am Sonntag, 18. September 2022, 21:59:04 CEST schrieb Kenneth Wolcott:
> > Hi Valentin;
> >
> >   Thank you.
> >
> >   Regarding point #1, I don't understand what (how to) to change it so
> > that it is Score level.  Would I place the same command inside the
> > \layout {} block inside the \score section?  Do I invoke it in the
> > same way?
> >
> >   Regarding point #2, I'm still trying to understand the new repeat
> > features, so I'm putting that off for now.
> >
> > Thanks,
> > Ken
> >
> > On Sun, Sep 18, 2022 at 11:04 AM Valentin Petzel  wrote:
> > > Hi Ken,
> > >
> > > note that it would be reasonable to create these Marks on a Score level,
> > > not on a Staff level.
> > >
> > > If you are using a sufficiently recent development version you can also
> > > make use of the \repeat segno function, somewhat like this:
> > >
> > > \version "2.23.12"
> > >
> > > \layout {
> > >
> > >   \context {
> > >
> > > \Score
> > > \override JumpScript.direction = #UP
> > >
> > >   }
> > >
> > > }
> > >
> > > \new PianoStaff <<
> > >
> > >   \new Staff s1*6
> > >   \new Staff {
> > >
> > > \repeat segno 2 {
> > >
> > >   \repeat volta 2 {
> > >
> > > c'4 d' e' f'
> > > \alternative {
> > >
> > >   { g'2 f' } { g'1 \fine }
> > >
> > > }
> > >
> > >   }
> > >   \repeat volta 2 {
> > >
> > > c'4 d' e' f'
> > > \alternative {
> > >
> > >   { g'2 f' } { g'1 }
> > >
> > > }
> > >
> > >   }
> > >
> > > }
> > >
> > >   }
> > >
> > > (note how although the marks are defined in the lower Staff they are
> > > displayed above the upper one, since they are created on a Score level).
> > >
> > > Cheers,
> > > Valentin
> > >
> > > Am Sonntag, 18. September 2022, 19:00:23 CEST schrieb Kenneth Wolcott:
> > > > Hi Knute;
> > > >
> > > >   Thank you for reminding me to share :-)
> > > >
> > > >   I did not find a precise search phrase that I should have used but
> > > >
> > > > "Controlling the vertical ordering of scripts" in the Notation
> > > > Reference comes close; reading the entire section helped.
> > > >
> > > >   What I saw there reminded me of what I had been shown before, so I
> > > >
> > > > looked in my previous engravings and I found what I needed.
> > > >
> > > >   Here is my markup command that I had used previously but could not
> > > >
> > > > remember how to search for it:
> > > >
> > > > fine = -\tweak outside-staff-priority #605 ^\markup { \fontsize #3
> > > > "Fine" }
> > > >
> > > >   So I was able to solve my problem, but I still don't have a precise
> > > >
> > > > search phrase that results in information that more closely matches
> > > > that which I had been shown to me on this mailing list previously.
> > > >
> > > >
> > > > Thanks,
> > > > Ken
> > > >
> > > > On Sun, Sep 18, 2022 at 6:29 AM Knute Snortum 
> wrote:
> > > > > On Sat, Sep 17, 2022 at 9:36 PM Kenneth Wolcott
> > > > >
> > > > >  wrote:
> > > > > > HI;
> > > > > >
> > > > > >   I found what I was looking for; sorry to waste your time...
> > > > >
> > > > > Why not share what you found so others can learn from it?
> > > > >
> > > > >
> > > > > --
> > > > > Knute Snortum
>



Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-19 Thread Valentin Petzel
Hi Ken,

Lilypond has so called engravers at various levels that handle placement of 
stuff. If you do ^"some text" a so called TextScript event is created, which is 
handled by an engraver at Staff level. The voltas on the other hand are created 
by an engraver at Score level. Other events that are handled on score level 
are marks, so prior to Lilypond 23.6 (? I think this is where the new repeat 
segno stuff came) I’d use a RehearsalMark for these kinds of things (this also 
allows us to align the text to the end of the measure instead of a note).

The new repeat segno stuff does create Marks and Stuff on Score level.

Cheers,
Valentin

Am Sonntag, 18. September 2022, 21:59:04 CEST schrieb Kenneth Wolcott:
> Hi Valentin;
> 
>   Thank you.
> 
>   Regarding point #1, I don't understand what (how to) to change it so
> that it is Score level.  Would I place the same command inside the
> \layout {} block inside the \score section?  Do I invoke it in the
> same way?
> 
>   Regarding point #2, I'm still trying to understand the new repeat
> features, so I'm putting that off for now.
> 
> Thanks,
> Ken
> 
> On Sun, Sep 18, 2022 at 11:04 AM Valentin Petzel  wrote:
> > Hi Ken,
> > 
> > note that it would be reasonable to create these Marks on a Score level,
> > not on a Staff level.
> > 
> > If you are using a sufficiently recent development version you can also
> > make use of the \repeat segno function, somewhat like this:
> > 
> > \version "2.23.12"
> > 
> > \layout {
> > 
> >   \context {
> >   
> > \Score
> > \override JumpScript.direction = #UP
> >   
> >   }
> > 
> > }
> > 
> > \new PianoStaff <<
> > 
> >   \new Staff s1*6
> >   \new Staff {
> >   
> > \repeat segno 2 {
> > 
> >   \repeat volta 2 {
> >   
> > c'4 d' e' f'
> > \alternative {
> > 
> >   { g'2 f' } { g'1 \fine }
> > 
> > }
> >   
> >   }
> >   \repeat volta 2 {
> >   
> > c'4 d' e' f'
> > \alternative {
> > 
> >   { g'2 f' } { g'1 }
> > 
> > }
> >   
> >   }
> > 
> > }
> >   
> >   }
> > 
> > (note how although the marks are defined in the lower Staff they are
> > displayed above the upper one, since they are created on a Score level).
> > 
> > Cheers,
> > Valentin
> > 
> > Am Sonntag, 18. September 2022, 19:00:23 CEST schrieb Kenneth Wolcott:
> > > Hi Knute;
> > > 
> > >   Thank you for reminding me to share :-)
> > >   
> > >   I did not find a precise search phrase that I should have used but
> > > 
> > > "Controlling the vertical ordering of scripts" in the Notation
> > > Reference comes close; reading the entire section helped.
> > > 
> > >   What I saw there reminded me of what I had been shown before, so I
> > > 
> > > looked in my previous engravings and I found what I needed.
> > > 
> > >   Here is my markup command that I had used previously but could not
> > > 
> > > remember how to search for it:
> > > 
> > > fine = -\tweak outside-staff-priority #605 ^\markup { \fontsize #3
> > > "Fine" }
> > > 
> > >   So I was able to solve my problem, but I still don't have a precise
> > > 
> > > search phrase that results in information that more closely matches
> > > that which I had been shown to me on this mailing list previously.
> > > 
> > > 
> > > Thanks,
> > > Ken
> > > 
> > > On Sun, Sep 18, 2022 at 6:29 AM Knute Snortum  
wrote:
> > > > On Sat, Sep 17, 2022 at 9:36 PM Kenneth Wolcott
> > > > 
> > > >  wrote:
> > > > > HI;
> > > > > 
> > > > >   I found what I was looking for; sorry to waste your time...
> > > > 
> > > > Why not share what you found so others can learn from it?
> > > > 
> > > > 
> > > > --
> > > > Knute Snortum



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


Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-18 Thread Kenneth Wolcott
Hi Valentin;

  Thank you.

  Regarding point #1, I don't understand what (how to) to change it so
that it is Score level.  Would I place the same command inside the
\layout {} block inside the \score section?  Do I invoke it in the
same way?

  Regarding point #2, I'm still trying to understand the new repeat
features, so I'm putting that off for now.

Thanks,
Ken


On Sun, Sep 18, 2022 at 11:04 AM Valentin Petzel  wrote:
>
> Hi Ken,
>
> note that it would be reasonable to create these Marks on a Score level, not
> on a Staff level.
>
> If you are using a sufficiently recent development version you can also make 
> use
> of the \repeat segno function, somewhat like this:
>
> \version "2.23.12"
>
> \layout {
>   \context {
> \Score
> \override JumpScript.direction = #UP
>   }
> }
>
> \new PianoStaff <<
>   \new Staff s1*6
>   \new Staff {
> \repeat segno 2 {
>   \repeat volta 2 {
> c'4 d' e' f'
> \alternative {
>   { g'2 f' } { g'1 \fine }
> }
>   }
>   \repeat volta 2 {
> c'4 d' e' f'
> \alternative {
>   { g'2 f' } { g'1 }
> }
>   }
> }
>   }
> >>
>
> (note how although the marks are defined in the lower Staff they are displayed
> above the upper one, since they are created on a Score level).
>
> Cheers,
> Valentin
>
> Am Sonntag, 18. September 2022, 19:00:23 CEST schrieb Kenneth Wolcott:
> > Hi Knute;
> >
> >   Thank you for reminding me to share :-)
> >
> >   I did not find a precise search phrase that I should have used but
> > "Controlling the vertical ordering of scripts" in the Notation
> > Reference comes close; reading the entire section helped.
> >
> >   What I saw there reminded me of what I had been shown before, so I
> > looked in my previous engravings and I found what I needed.
> >
> >   Here is my markup command that I had used previously but could not
> > remember how to search for it:
> >
> > fine = -\tweak outside-staff-priority #605 ^\markup { \fontsize #3 "Fine" }
> >
> >   So I was able to solve my problem, but I still don't have a precise
> > search phrase that results in information that more closely matches
> > that which I had been shown to me on this mailing list previously.
> >
> >
> > Thanks,
> > Ken
> >
> > On Sun, Sep 18, 2022 at 6:29 AM Knute Snortum  wrote:
> > > On Sat, Sep 17, 2022 at 9:36 PM Kenneth Wolcott
> > >
> > >  wrote:
> > > > HI;
> > > >
> > > >   I found what I was looking for; sorry to waste your time...
> > >
> > > Why not share what you found so others can learn from it?
> > >
> > >
> > > --
> > > Knute Snortum
>



Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-18 Thread Valentin Petzel
Hi Ken,

note that it would be reasonable to create these Marks on a Score level, not 
on a Staff level.

If you are using a sufficiently recent development version you can also make 
use 
of the \repeat segno function, somewhat like this:

\version "2.23.12"

\layout {
  \context {
\Score
\override JumpScript.direction = #UP
  }
}

\new PianoStaff <<
  \new Staff s1*6
  \new Staff {
\repeat segno 2 {
  \repeat volta 2 {
c'4 d' e' f'
\alternative {
  { g'2 f' } { g'1 \fine }
}
  }
  \repeat volta 2 {
c'4 d' e' f'
\alternative {
  { g'2 f' } { g'1 }
}
  }
}
  }
>>

(note how although the marks are defined in the lower Staff they are displayed 
above the upper one, since they are created on a Score level).

Cheers,
Valentin

Am Sonntag, 18. September 2022, 19:00:23 CEST schrieb Kenneth Wolcott:
> Hi Knute;
> 
>   Thank you for reminding me to share :-)
> 
>   I did not find a precise search phrase that I should have used but
> "Controlling the vertical ordering of scripts" in the Notation
> Reference comes close; reading the entire section helped.
> 
>   What I saw there reminded me of what I had been shown before, so I
> looked in my previous engravings and I found what I needed.
> 
>   Here is my markup command that I had used previously but could not
> remember how to search for it:
> 
> fine = -\tweak outside-staff-priority #605 ^\markup { \fontsize #3 "Fine" }
> 
>   So I was able to solve my problem, but I still don't have a precise
> search phrase that results in information that more closely matches
> that which I had been shown to me on this mailing list previously.
> 
> 
> Thanks,
> Ken
> 
> On Sun, Sep 18, 2022 at 6:29 AM Knute Snortum  wrote:
> > On Sat, Sep 17, 2022 at 9:36 PM Kenneth Wolcott
> > 
> >  wrote:
> > > HI;
> > > 
> > >   I found what I was looking for; sorry to waste your time...
> > 
> > Why not share what you found so others can learn from it?
> > 
> > 
> > --
> > Knute Snortum



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


Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-18 Thread Kenneth Wolcott
Hi Knute;

  Thank you for reminding me to share :-)

  I did not find a precise search phrase that I should have used but
"Controlling the vertical ordering of scripts" in the Notation
Reference comes close; reading the entire section helped.

  What I saw there reminded me of what I had been shown before, so I
looked in my previous engravings and I found what I needed.

  Here is my markup command that I had used previously but could not
remember how to search for it:

fine = -\tweak outside-staff-priority #605 ^\markup { \fontsize #3 "Fine" }

  So I was able to solve my problem, but I still don't have a precise
search phrase that results in information that more closely matches
that which I had been shown to me on this mailing list previously.


Thanks,
Ken



On Sun, Sep 18, 2022 at 6:29 AM Knute Snortum  wrote:
>
> On Sat, Sep 17, 2022 at 9:36 PM Kenneth Wolcott
>  wrote:
> >
> > HI;
> >
> >   I found what I was looking for; sorry to waste your time...
>
> Why not share what you found so others can learn from it?
>
>
> --
> Knute Snortum



Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-18 Thread Knute Snortum
On Sat, Sep 17, 2022 at 9:36 PM Kenneth Wolcott
 wrote:
>
> HI;
>
>   I found what I was looking for; sorry to waste your time...

Why not share what you found so others can learn from it?


--
Knute Snortum



Re: Raise the "Fine" and "D.C. Fine" above the repeat volta alternative brackets, how?

2022-09-17 Thread Kenneth Wolcott
HI;

  I found what I was looking for; sorry to waste your time...

Ken

On Sat, Sep 17, 2022 at 9:06 PM Kenneth Wolcott
 wrote:
>
> Hi;
>
>   Raise the "Fine" and "D.C. Fine" above the repeat volta alternative
> brackets, how?
>
>   Please give me good search words so that I can find how to do this
> in the Lilypond documentation.
>
>   Please see attached files.
>
> Thanks,
> Ken Wolcott