Re: Horizontal spacing per measure?

2022-03-22 Thread Vaughan McAlley
On Wed, 23 Mar 2022 at 13:41, Molly Preston 
wrote:

> Hello.
>
> I am wondering if there is any way of changing the horizontal spacing. I
> would like the first two measures to have more room than the third measure.
> The cross-staff beaming I think needs more room and I am not sure how to do
> this other than moving the third measure to the next line.
>
> I tried using   \override SpacingSpanner.base-shortest-duration =
> #(ly:make-moment 1/64)  in the \context \Score, which helps it stretch out
> a bit, but I'm not sure if there's a way to scheme code something that is
> more specific per measure or something? Anything would be helpful. Thank
> you! (Sorry for the long example. I tried to truncate it.)
>
>
> \version "2.22.1"
> up = {
>
> s1 *2 |
>
> \ottava #1
> \acciaccatura { dis''' 8 }  e''' 8-.  < fis'' fis''' > -.  dis'''>8-.   \acciaccatura { dis''' 8 }  e''' 8-.   -.
>   -- ~  4
>
> \break
>
> \ottava #0
>
> }
>
> upper = {  \change Staff = "up" }
> lower = { \change Staff = "down" }
>
> down = {
>
>  \lower \stemDown \clef bass 8\( ^\ff   \upper -.
> \)
>
>\shape #'((-0.5 . -7) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
>  \lower 8 \(  \upper -.  \)
>   \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
>   \lower 8\( \upper -. \)
>   \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
>   \lower 8 \(  \upper -.  \)
>
>
>   \lower 8\( \upper -. \)
>
>\shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
>   \lower 8 \(  \upper -.  \)
>
>   \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
> \lower 8\( \upper -. \)
>
>  \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
>  \lower 8 \(  \upper -.  \)
>
>  \lower
>  \clef treble \stemNeutral
>  \grace {s 8 } < e' dis'' >4. --   < e'  dis'' >4. -- r4 |
> }
>
>
>  \score {
><<
>
>   \new PianoStaff  \with {
> \override StaffGrouper.staff-staff-spacing = #'(
> (basic-distance . 0)
> (padding . 20))
>
> }
>
>   <<
> \new PianoStaff  <<
>  \set PianoStaff.instrumentName = #"Piano"
>  \new Staff = "up" {  \up \autoBeamOff }
>   \new Staff =  "down"{ \down }
>
>
> >>
>
>
>>>
>   >>
>   \layout {
>  \context
>
> {
>   \Score
>  \override SpacingSpanner.base-shortest-duration = #(ly:make-moment
> 1/64)
>
> }
>
> }
>
> \midi { }
>
>  }
>

Hi Molly,

This seems to work. I'm not sure why overriding
SpacingSpanner.common-shortest-duration in the same place doesn't work?

Vaughan


\version "2.22.1"
up = {

  s1 *2 |

  \ottava #1
  \acciaccatura { dis''' 8 }  e''' 8-.  < fis'' fis''' > -. 8-.   \acciaccatura { dis''' 8 }  e''' 8-.   -.
  -- ~  4

  \break

  \ottava #0

}

upper = {  \change Staff = "up" }
lower = { \change Staff = "down" }

down = {
  \newSpacingSection
  % change this number to suit your taste, default is 1.2
  \override Score.SpacingSpanner.spacing-increment = #1.75
  \lower \stemDown \clef bass 8\( ^\ff   \upper -.
\)

  \shape #'((-0.5 . -7) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8 \(  \upper -.  \)
  \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8\( \upper -. \)
  \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8 \(  \upper -.  \)


  \lower 8\( \upper -. \)

  \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8 \(  \upper -.  \)

  \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8\( \upper -. \)

  \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8 \(  \upper -.  \)
  \newSpacingSection
  \revert Score.SpacingSpanner.increment
  \lower
  \clef treble \stemNeutral
  \grace {s 8 } < e' dis'' >4. --   < e'  dis'' >4. -- r4 |
}


\score {
  <<

\new PianoStaff  \with {
  \override StaffGrouper.staff-staff-spacing = #'(
   (basic-distance . 0)
   (padding . 20))

}

<<
  \new PianoStaff  <<
\set PianoStaff.instrumentName = #"Piano"
\new Staff = "up" {  \up \autoBeamOff }
\new Staff =  "down"{ \down }


  >>


>>
  >>
  \layout {
\context

{
  \Score
  %\override SpacingSpanner.base-shortest-duration = #(ly:make-moment
1/64)

}

  }

  \midi { }

}


Horizontal spacing per measure?

2022-03-22 Thread Molly Preston
Hello.

I am wondering if there is any way of changing the horizontal spacing. I
would like the first two measures to have more room than the third measure.
The cross-staff beaming I think needs more room and I am not sure how to do
this other than moving the third measure to the next line.

I tried using   \override SpacingSpanner.base-shortest-duration =
#(ly:make-moment 1/64)  in the \context \Score, which helps it stretch out
a bit, but I'm not sure if there's a way to scheme code something that is
more specific per measure or something? Anything would be helpful. Thank
you! (Sorry for the long example. I tried to truncate it.)


\version "2.22.1"
up = {

s1 *2 |

\ottava #1
\acciaccatura { dis''' 8 }  e''' 8-.  < fis'' fis''' > -. 8-.   \acciaccatura { dis''' 8 }  e''' 8-.   -.
  -- ~  4

\break

\ottava #0

}

upper = {  \change Staff = "up" }
lower = { \change Staff = "down" }

down = {

 \lower \stemDown \clef bass 8\( ^\ff   \upper -.
\)

   \shape #'((-0.5 . -7) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
 \lower 8 \(  \upper -.  \)
  \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8\( \upper -. \)
  \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8 \(  \upper -.  \)


  \lower 8\( \upper -. \)

   \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower 8 \(  \upper -.  \)

  \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
\lower 8\( \upper -. \)

 \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
 \lower 8 \(  \upper -.  \)

 \lower
 \clef treble \stemNeutral
 \grace {s 8 } < e' dis'' >4. --   < e'  dis'' >4. -- r4 |
}


 \score {
   <<

  \new PianoStaff  \with {
\override StaffGrouper.staff-staff-spacing = #'(
(basic-distance . 0)
(padding . 20))

}

  <<
\new PianoStaff  <<
 \set PianoStaff.instrumentName = #"Piano"
 \new Staff = "up" {  \up \autoBeamOff }
  \new Staff =  "down"{ \down }


>>


   >>
  >>
  \layout {
 \context

{
  \Score
 \override SpacingSpanner.base-shortest-duration = #(ly:make-moment
1/64)

}

}

\midi { }

 }