lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Horizontal spacing per measure?


From: Vaughan McAlley
Subject: Re: Horizontal spacing per measure?
Date: Wed, 23 Mar 2022 14:32:11 +1100

On Wed, 23 Mar 2022 at 13:41, Molly Preston <mollyprestonre@gmail.com> 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'' dis'''>8-.   \acciaccatura { dis''' 8 }  e''' 8-.  <fis'' fis''' > -. <dis'' dis''' >  -- ~ <dis'' dis'''> 4
    
    \break
    
    \ottava #0
  
}

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

down = {
  
 \lower \stemDown \clef bass <b, dis ais >8\( ^\ff   \upper <b' ais'' >-. \) 
    
   \shape #'((-0.5 . -7) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur 
     \lower <e gis  dis'   >8 \(  \upper <d' cis''  >-.  \) 
      \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur 
      \lower <b, dis ais >8\( \upper <b' ais'' >-. \) 
      \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur 
      \lower <e gis  dis'   >8 \(  \upper <d' cis''  >-.  \) 
     
  
      \lower <b, dis ais >8\( \upper <b' ais'' >-. \) 
      
       \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur 
      \lower <e gis  dis'   >8 \(  \upper <d' cis''  >-.  \) 
     
      \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur 
    \lower <b, dis ais >8\( \upper <b' ais'' >-. \) 
     
     \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur 
     \lower <e gis  dis'   >8 \(  \upper <d' cis''  >-.  \) 
   
     \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''' > -. <dis'' dis'''>8-.   \acciaccatura { dis''' 8 }  e''' 8-.  <fis'' fis''' > -. <dis'' dis''' >  -- ~ <dis'' dis'''> 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 <b, dis ais >8\( ^\ff   \upper <b' ais'' >-. \)

  \shape #'((-0.5 . -7) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower <e gis  dis'   >8 \(  \upper <d' cis''  >-.  \)
  \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower <b, dis ais >8\( \upper <b' ais'' >-. \)
  \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower <e gis  dis'   >8 \(  \upper <d' cis''  >-.  \)


  \lower <b, dis ais >8\( \upper <b' ais'' >-. \)

  \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower <e gis  dis'   >8 \(  \upper <d' cis''  >-.  \)

  \shape #'((-0.5 . -10 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower <b, dis ais >8\( \upper <b' ais'' >-. \)

  \shape #'((-0.5 . -7 ) (0 . 3) (0 . 2 ) (0 . 0)) PhrasingSlur
  \lower <e gis  dis'   >8 \(  \upper <d' cis''  >-.  \)
  \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 { }

}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]