Re: Glissando to nothing example in docs

2025-02-21 Thread Richard Shann
On Fri, 2025-02-21 at 15:46 +, Werner LEMBERG wrote:
> > [...] to enable the glissando to have more space I added a new
> > spacing section around it giving this example:
> > 
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> > \version "2.25.18"
> > \relative c'' {
> >    \time 3/4
> >    \override Glissando.style = #'zigzag
> >    c4 c4
> >    \newSpacingSection
> >    \override Score.SpacingSpanner.spacing-increment = #1
> >    c4*7/8\glissando
> >    \hideNotes c,,32 \unHideNotes
> >    \newSpacingSection
> >    \revert Score.SpacingSpanner.spacing-increment
> >    \bar "|"
> >    R2.
> > }
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> 
> I don't think that using a new spacing section is the right way to
> solve this because such a section could still be compressed
> unfavorably in tight situations, AFAIK.  Instead, I would simply give
> the glissando line a minimum length (I use an exaggerated value for
> demonstration purposes).

ah! yes, I had forgotten about that - thanks!

Richard

> 
> ```
> \relative c'' {
>   \time 3/4
>   \override Glissando.style = #'zigzag
>   c4 c4
>   c4*7/8
>     \tweak springs-and-rods #ly:spanner::set-spacing-rods
>     \tweak minimum-length #10
>     \glissando
>   \hideNotes c,,32 \unHideNotes
>   \bar "|"
>   R2.
> }
> ```
> 
> 
>     Werner




Re: Glissando to nothing example in docs

2025-02-21 Thread Werner LEMBERG
> [...] to enable the glissando to have more space I added a new
> spacing section around it giving this example:
> 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> \version "2.25.18"
> \relative c'' {
>   \time 3/4
>   \override Glissando.style = #'zigzag
>   c4 c4
>   \newSpacingSection
>   \override Score.SpacingSpanner.spacing-increment = #1
>   c4*7/8\glissando
>   \hideNotes c,,32 \unHideNotes
>   \newSpacingSection
>   \revert Score.SpacingSpanner.spacing-increment
>   \bar "|"
>   R2.
> }
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

I don't think that using a new spacing section is the right way to
solve this because such a section could still be compressed
unfavorably in tight situations, AFAIK.  Instead, I would simply give
the glissando line a minimum length (I use an exaggerated value for
demonstration purposes).

```
\relative c'' {
  \time 3/4
  \override Glissando.style = #'zigzag
  c4 c4
  c4*7/8
\tweak springs-and-rods #ly:spanner::set-spacing-rods
\tweak minimum-length #10
\glissando
  \hideNotes c,,32 \unHideNotes
  \bar "|"
  R2.
}
```


Werner


Re: Glissando to nothing example in docs

2025-02-21 Thread Richard Shann
On Wed, 2025-02-19 at 09:35 -0800, Knute Snortum wrote:
> On Wed, Feb 19, 2025 at 9:15 AM Richard Shann
>  wrote:
> > 
> > This looks promising and I would like to try to understand what the
> > two
> > duration parameters 8.. and 32 are doing in this context.
> > The only documentation I have found for \after is
> > 
> > \after delta (duration) ev (music) mus (music) ⇒ music
> >     Add music ev with a delay of delta after the onset of mus
> > 
> > I'm not sure what "Add" means here - playing around with various
> > values
> > has got me confused - some values push subsequent notes into the
> > next
> > bar, others change the spacing of bars before and after as if it
> > had
> > affected the Score.SpacingSpanner.spacing-increment.
> > 
> > I wonder if someone could shed some light on this. The goal is to
> > create a glissando from a note to a non-printing note - I'm this
> > means
> > its note-column (?) is made wider, but otherwise the spacing is
> > normal.
> > 
> > Many thanks,
> > 
> > Richard
> > 
> > 
> > > 
> > > All the best,
> > > Yoshi 
> > > 
> > > \version "2.25.18"
> > > \relative c'' {
> > >   \time 3/4
> > >   \override Glissando.style = #'zigzag
> > >   c4 c4
> > >   \after 8.. {\hideNotes
> > >   {c,,32}
> > >   \unHideNotes
> > >   } c''4\glissando
> > >   \bar "|" 
> > > R2.
> > > }
> > 
> > 
> 
> 
> The \after command solves this problem: say you have this music:
> 
> { c'2.  c'4 }
> 
> ...and you want to add markup text to the second beat.  There is no
> note on the second beat, so you would write:
> 
> { \after 4 ^\markup "A" c'2. c'4 }
> 
> That is, after a duration of 4, add ^\markup "A" as if a note were
> there.  Now in the case of the glissando, you really don't need
> \after, you could just write:
> 
> \relative c'' {
>   \time 3/4
>   \override Glissando.style = #'zigzag
>   c4 c4
>   c4*7/8\glissando
>   \hideNotes c,,32 \unHideNotes
>   \bar "|"
>   R2.
> }

Thank you - that works well, to enable the glissando to have more space
I added a new spacing section around it giving this example:

8><8><8><8><8><8><8><8><8><8><8><8><8><8><
\version "2.25.18"
\relative c'' {
  \time 3/4
  \override Glissando.style = #'zigzag
  c4 c4
  \newSpacingSection
  \override Score.SpacingSpanner.spacing-increment = #1
  c4*7/8\glissando
  \hideNotes c,,32 \unHideNotes
  \newSpacingSection
  \revert Score.SpacingSpanner.spacing-increment
  \bar "|"
  R2.
}
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

If someone is updating it might be good to include this tweak as
otherwise the end of the glissando is restricted to staying within the
space occupied by the note.
Thanks to all who responded!

Richard

> 
> --
> Knute Snortum
> 
> 




Re: Glissando to nothing example in docs

2025-02-20 Thread Richard Shann
On Thu, 2025-02-20 at 07:22 +, Werner LEMBERG wrote:
> > The only documentation I have found for \after is
> 
> > 
> 
> > \after delta (duration) ev (music) mus (music) ⇒ music
> 
> >  Add music ev with a delay of delta after the onset of mus
> 
> 
> If you look into the index for `\after` in the NR you will find cross
> references to some examples (at least in the development version).
> 
> > I'm not sure what "Add" means here
> 
> 
> It means exactly that.  For example,
> 
> ```
> \after 4 \pp c1
> ```
> 
> inserts `\pp` a quarter note after 'c1' starts.

yes, I saw that example, but I didn't know what would happen if the ev
parameter was a note as in Yoshi's use. The answer would seem to be
that strange things may result.

Richard

> 
> 
>  Werner




Re: Glissando to nothing example in docs

2025-02-19 Thread Werner LEMBERG


> So one or other of those should replace the original example in NR
> that is decidedly long in the tooth, dating from 2.12.0.
> (Particularly as the original one doesn't really work.)

Can you prepare a patch?  Or maybe even an Merge Request?


Werner



Re: Glissando to nothing example in docs

2025-02-19 Thread Werner LEMBERG

> The only documentation I have found for \after is
> 
> \after delta (duration) ev (music) mus (music) ⇒ music
> Add music ev with a delay of delta after the onset of mus

If you look into the index for `\after` in the NR you will find cross
references to some examples (at least in the development version).

> I'm not sure what "Add" means here

It means exactly that.  For example,

```
\after 4 \pp c1
```

inserts `\pp` a quarter note after 'c1' starts.


 Werner


Re: Glissando to nothing example in docs

2025-02-19 Thread David Wright
On Wed 19 Feb 2025 at 09:35:24 (-0800), Knute Snortum wrote:
> On Wed, Feb 19, 2025 at 9:15 AM Richard Shann wrote:
> >
> > This looks promising and I would like to try to understand what the two
> > duration parameters 8.. and 32 are doing in this context.
> > The only documentation I have found for \after is
> >
> > \after delta (duration) ev (music) mus (music) ⇒ music
> > Add music ev with a delay of delta after the onset of mus
> >
> > I'm not sure what "Add" means here - playing around with various values
> > has got me confused - some values push subsequent notes into the next
> > bar, others change the spacing of bars before and after as if it had
> > affected the Score.SpacingSpanner.spacing-increment.
> >
> > I wonder if someone could shed some light on this. The goal is to
> > create a glissando from a note to a non-printing note - I'm this means
> > its note-column (?) is made wider, but otherwise the spacing is normal.
> >
> > >
> > > \version "2.25.18"
> > > \relative c'' {
> > >   \time 3/4
> > >   \override Glissando.style = #'zigzag
> > >   c4 c4
> > >   \after 8.. {\hideNotes
> > >   {c,,32}
> > >   \unHideNotes
> > >   } c''4\glissando
> > >   \bar "|"
> > > R2.
> > > }
> >
> >
> The \after command solves this problem: say you have this music:
> 
> { c'2.  c'4 }
> 
> ...and you want to add markup text to the second beat.  There is no note on
> the second beat, so you would write:
> 
> { \after 4 ^\markup "A" c'2. c'4 }
> 
> That is, after a duration of 4, add ^\markup "A" as if a note were there.
> Now in the case of the glissando, you really don't need \after, you could
> just write:
> 
> \relative c'' {
>   \time 3/4
>   \override Glissando.style = #'zigzag
>   c4 c4
>   c4*7/8\glissando
>   \hideNotes c,,32 \unHideNotes
>   \bar "|"
>   R2.
> }

So one or other of those should replace the original example
in NR that is decidedly long in the tooth, dating from 2.12.0.
(Particularly as the original one doesn't really work.)

Cheers,
David.



Re: Glissando to nothing example in docs

2025-02-19 Thread Knute Snortum
On Wed, Feb 19, 2025 at 9:15 AM Richard Shann 
wrote:

>
> This looks promising and I would like to try to understand what the two
> duration parameters 8.. and 32 are doing in this context.
> The only documentation I have found for \after is
>
> \after delta (duration) ev (music) mus (music) ⇒ music
> Add music ev with a delay of delta after the onset of mus
>
> I'm not sure what "Add" means here - playing around with various values
> has got me confused - some values push subsequent notes into the next
> bar, others change the spacing of bars before and after as if it had
> affected the Score.SpacingSpanner.spacing-increment.
>
> I wonder if someone could shed some light on this. The goal is to
> create a glissando from a note to a non-printing note - I'm this means
> its note-column (?) is made wider, but otherwise the spacing is normal.
>
> Many thanks,
>
> Richard
>
>
> >
> > All the best,
> > Yoshi
> >
> > \version "2.25.18"
> > \relative c'' {
> >   \time 3/4
> >   \override Glissando.style = #'zigzag
> >   c4 c4
> >   \after 8.. {\hideNotes
> >   {c,,32}
> >   \unHideNotes
> >   } c''4\glissando
> >   \bar "|"
> > R2.
> > }
>
>
The \after command solves this problem: say you have this music:

{ c'2.  c'4 }

...and you want to add markup text to the second beat.  There is no note on
the second beat, so you would write:

{ \after 4 ^\markup "A" c'2. c'4 }

That is, after a duration of 4, add ^\markup "A" as if a note were there.
Now in the case of the glissando, you really don't need \after, you could
just write:

\relative c'' {
  \time 3/4
  \override Glissando.style = #'zigzag
  c4 c4
  c4*7/8\glissando
  \hideNotes c,,32 \unHideNotes
  \bar "|"
  R2.
}

--
Knute Snortum


Re: Glissando to nothing example in docs

2025-02-19 Thread Richard Shann
On Tue, 2025-02-18 at 14:47 -0500, Yoshiaki Onishi wrote:
> > 
> > On Tue 18 Feb 2025 at 17:56:02 (+), Richard Shann wrote:
> > > At
> > > https://lilypond.org/doc/v2.25/Documentation/notation/glissando
> > > under the section
> > > Contemporary glissando
> > > is this example (without the whole bar rest at the end).
> > > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> > > \version "2.25.18"
> > > \relative c'' {
> > > \time 3/4
> > > \override Glissando.style = #'zigzag
> > > c4 c
> > > \cadenzaOn
> > > c4\glissando
> > > \hideNotes
> > > c,,4
> > > \unHideNotes
> > > \cadenzaOff
> > > \bar "|"
> > > % R1*4/4 
> > > }
> > > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> > > 
> > > When the whole measure rest is present two whole measure rests
> > > appear and an 
> > > empty bar.
> > > 
> > > Is there a fix for this?
> > 
> > A fix would necessitate knowing what you want to print.
> > 
> > Perhaps it's something like the attached?
> > 
> > Cheers,
> > David.
> 
> Hello Richard and David,
> 
> Here is what I had, fyi. I used \after function to give the glissando
> some fine tuning while the content of the measure not spilled over to
> the next measure. While I could see the rationale behind using
> \cadenzaOn and \cadenzaOff, I fear that it affects the overall
> spacing. For glissando of this kind, I think that it is best to keep
> the issue of spacing as intact as possible. So my example doesn’t use
> the \cadenza… functions.

This looks promising and I would like to try to understand what the two
duration parameters 8.. and 32 are doing in this context.
The only documentation I have found for \after is

\after delta (duration) ev (music) mus (music) ⇒ music
Add music ev with a delay of delta after the onset of mus

I'm not sure what "Add" means here - playing around with various values
has got me confused - some values push subsequent notes into the next
bar, others change the spacing of bars before and after as if it had
affected the Score.SpacingSpanner.spacing-increment.

I wonder if someone could shed some light on this. The goal is to
create a glissando from a note to a non-printing note - I'm this means
its note-column (?) is made wider, but otherwise the spacing is normal.

Many thanks,

Richard


> 
> All the best,
> Yoshi 
> 
> \version "2.25.18"
> \relative c'' {
>   \time 3/4
>   \override Glissando.style = #'zigzag
>   c4 c4
>   \after 8.. {\hideNotes
>   {c,,32}
>   \unHideNotes
>   } c''4\glissando
>   \bar "|" 
> R2.
> }
> 
> 
> 
> 




Re: Glissando to nothing example in docs

2025-02-19 Thread Richard Shann
On Tue, 2025-02-18 at 13:30 -0600, David Wright wrote:
> On Tue 18 Feb 2025 at 17:56:02 (+), Richard Shann wrote:
> > At https://lilypond.org/doc/v2.25/Documentation/notation/glissando
> > under the section
> > Contemporary glissando
> > is this example (without the whole bar rest at the end).
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> > \version "2.25.18"
> > \relative c'' {
> >   \time 3/4
> >   \override Glissando.style = #'zigzag
> >   c4 c
> >   \cadenzaOn
> >   c4\glissando
> >   \hideNotes
> >   c,,4
> >   \unHideNotes
> >   \cadenzaOff
> >   \bar "|"
> >  % R1*4/4 
> > }
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> > 
> > When the whole measure rest is present two whole measure rests
> > appear and an empty bar.
> > 
> > Is there a fix for this?
> 
(firstly, apologies for the typo - it should have been R1*3/4 for the
whole measure rest)

> A fix would necessitate knowing what you want to print.

Well, the case arose in a large orchestral score, but as the problem is
visible when just adding a whole measure rest to the example in the
docs it seemed best to ask about that.
> 
> Perhaps it's something like the attached?

Thank you! That inscrutable "s" added fixes that case. But I see that
further trouble sets in as the score gets more complex with more staffs
so the solution proposed by Yoshi would seem to be the way to go.

Best wishes,

Richard



> 
> Cheers,
> David.




Re: Glissando to nothing example in docs

2025-02-18 Thread Yoshiaki Onishi
> 
> On Tue 18 Feb 2025 at 17:56:02 (+), Richard Shann wrote:
> > At https://lilypond.org/doc/v2.25/Documentation/notation/glissando
> > under the section
> > Contemporary glissando
> > is this example (without the whole bar rest at the end).
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> > \version "2.25.18"
> > \relative c'' {
> > \time 3/4
> > \override Glissando.style = #'zigzag
> > c4 c
> > \cadenzaOn
> > c4\glissando
> > \hideNotes
> > c,,4
> > \unHideNotes
> > \cadenzaOff
> > \bar "|"
> > % R1*4/4 
> > }
> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> > 
> > When the whole measure rest is present two whole measure rests appear and 
> > an 
> > empty bar.
> > 
> > Is there a fix for this?
> 
> A fix would necessitate knowing what you want to print.
> 
> Perhaps it's something like the attached?
> 
> Cheers,
> David.

Hello Richard and David,

Here is what I had, fyi. I used \after function to give the glissando some fine 
tuning while the content of the measure not spilled over to the next measure. 
While I could see the rationale behind using \cadenzaOn and \cadenzaOff, I fear 
that it affects the overall spacing. For glissando of this kind, I think that 
it is best to keep the issue of spacing as intact as possible. So my example 
doesn’t use the \cadenza… functions.

All the best,
Yoshi 

\version "2.25.18"
\relative c'' {
  \time 3/4
  \override Glissando.style = #'zigzag
  c4 c4
  \after 8.. {\hideNotes
  {c,,32}
  \unHideNotes
  } c''4\glissando
  \bar "|" 
R2.
}






Re: Glissando to nothing example in docs

2025-02-18 Thread David Wright
On Tue 18 Feb 2025 at 17:56:02 (+), Richard Shann wrote:
> At https://lilypond.org/doc/v2.25/Documentation/notation/glissando
> under the section
> Contemporary glissando
> is this example (without the whole bar rest at the end).
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> \version "2.25.18"
> \relative c'' {
>   \time 3/4
>   \override Glissando.style = #'zigzag
>   c4 c
>   \cadenzaOn
>   c4\glissando
>   \hideNotes
>   c,,4
>   \unHideNotes
>   \cadenzaOff
>   \bar "|"
>  % R1*4/4 
> }
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> 
> When the whole measure rest is present two whole measure rests appear and an 
> empty bar.
> 
> Is there a fix for this?

A fix would necessitate knowing what you want to print.

Perhaps it's something like the attached?

Cheers,
David.
\relative c'' {
  \time 3/4
  \override Glissando.style = #'zigzag
  c4 c
  \cadenzaOn
  c4\glissando
  \hideNotes
  c,,4
  \unHideNotes
  \cadenzaOff
  %%\bar "|" |
  s |
  R2.
}


Glissando to nothing example in docs

2025-02-18 Thread Richard Shann
At https://lilypond.org/doc/v2.25/Documentation/notation/glissando
under the section
Contemporary glissando
is this example (without the whole bar rest at the end).
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
\version "2.25.18"
\relative c'' {
  \time 3/4
  \override Glissando.style = #'zigzag
  c4 c
  \cadenzaOn
  c4\glissando
  \hideNotes
  c,,4
  \unHideNotes
  \cadenzaOff
  \bar "|"
 % R1*4/4 
}
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

When the whole measure rest is present two whole measure rests appear and an 
empty bar.

Is there a fix for this?

Richard Shann