Forcing horizontal space between successive notes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Forcing horizontal space between successive notes

David Sumbler
I have various clunky workarounds for this problem, but I am still
wondering whether there isn't a neater way.

How can one force additional space between 2 successive musical moments
in a score, without affecting the spacing algorithm to the left and
right?  This is occasionally desirable, for instance to leave
horizontal space for some textual instruction or narration.

I have experimented with all sorts of parameters for various items such
as PaperColumn, VerticalAlignment, SpacingSpanner and others, but so
far without any success.

David


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Forcing horizontal space between successive notes

Lukas-Fabian Moser
Hi David,

> I have various clunky workarounds for this problem, but I am still
> wondering whether there isn't a neater way.
>
> How can one force additional space between 2 successive musical moments
> in a score, without affecting the spacing algorithm to the left and
> right?  This is occasionally desirable, for instance to leave
> horizontal space for some textual instruction or narration.
>
> I have experimented with all sorts of parameters for various items such
> as PaperColumn, VerticalAlignment, SpacingSpanner and others, but so
> far without any success.

Not perfect, but you could use the fact that in proportional notation it
is possible (necessary) to define a factor which basically controls how
much the music is going to be stretched:

\version "2.19.82"

\new Staff {
   <<
     {
       \repeat unfold 100 c'16 }

   {
     % Force extension between 1st and 2nd quaver in bar 2
     s1
     \set Score.proportionalNotationDuration = #(ly:make-moment 1/100)
     s8
     \unset Score.proportionalNotationDuration
   }
   >>
}

Increasing the denominator (100 in this case) increases the amount of
stretching.

Drawback: Maybe you do not actually want proportional spacing to be used
between the musical moments taken as left and right boundary of the area
to be stretched. But for me this always was acceptable.

Lukas


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Forcing horizontal space between successive notes

Kieren MacMillan
In reply to this post by David Sumbler
Hi David,

> How can one force additional space between 2 successive musical moments
> in a score, without affecting the spacing algorithm to the left and right?


{
  c'4 \tweak extra-spacing-width #'(0 . 4) 4 4 4
}

??

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Forcing horizontal space between successive notes

David Sumbler
In reply to this post by Lukas-Fabian Moser
Wow!  Two lovely solutions to my little query - both much better and
neater than my adjusting the spacing of notes by using invisible
meaningless markups with \textLengthOn.

-----Original Message-----
From: Lukas-Fabian Moser <[hidden email]>
Date: Tue, 29 Jan 2019 20:15:48 +0100

> > How can one force additional space between 2 successive musical
> > moments in a score, without affecting the spacing algorithm to the
> > left and right?
>
> \version "2.19.82"
>
> \new Staff {
>    <<
>      {
>        \repeat unfold 100 c'16 }
>
>    {
>      % Force extension between 1st and 2nd quaver in bar 2
>      s1
>      \set Score.proportionalNotationDuration = #(ly:make-moment
> 1/100)
>      s8
>      \unset Score.proportionalNotationDuration
>    }
>    >>
> }

I like the way this automatically gives appropriate spacing to notes
and rests in the stretched section.

-----Original Message-----
From: Kieren MacMillan <[hidden email]>
Date: Tue, 29 Jan 2019 16:12:53 -0500
> {
>   c'4 \tweak extra-spacing-width #'(0 . 4) 4 4 4
> }

And this method gives full control over the internal spacing if more
than one note/rest is involved.

I was not aware that extra-spacing-width could be used in this way.  I
note that the first (left) parameter doesn't seem to do very much, so
basically the second parameter adjusts the distance from the note to
the succeeding one.  Very neat!

Thanks, both, very much for these 2 solutions.

David




_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Forcing horizontal space between successive notes

Kieren MacMillan
Hi David,

> I was not aware that extra-spacing-width could be used in this way.

It’s a bit hacky — I would love a Spacer grob "full citizen" to work with — but it does the job.

> I note that the first (left) parameter doesn't seem to do very much

Perhaps counterintuitively, you need to use negative numbers there:

{
  c'4 \tweak extra-spacing-width #'(-8 . 4) 4 4 4
}

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user