Hi Aaron,

I've looked through the scheme code, and it doesn't seem like there is a 
variable that controls how much horizontal space is given to the other staves. 
So I wonder whether using a custom time signature engraver helps.

Due to a problem with the format in which I replied e-mails, I apologize for 
the messy thread. If you are interested, please have a look at the attached 
file which summarizes all the problems I have come across with.

Thanks,
Leo
\version "2.19.0"

%% Ported from time-signature-engraver.cc:
#(define (Time_signature_engraver_scm context)
   (let ((time-signature #f)
         (last-time-fraction #f)
         (time-cause '()))
     (define (make-time-signature engraver)
       (let ((time-fraction
               (ly:context-property
                 context
                 'timeSignatureFraction)))
         (and (pair? time-fraction)
              (not (eq? time-fraction last-time-fraction))
              (begin
                (set! time-signature
                  (ly:engraver-make-grob
                    engraver
                    'TimeSignature
                    time-cause))
                (ly:grob-set-property!
                  time-signature
                  'fraction
                  time-fraction)
                (or last-time-fraction
                    (ly:grob-set-property!
                      time-signature
                      'break-visibility
                      (ly:context-property
                        context
                        'initialTimeSignatureVisibility)))
                (let ((denom (cdr time-fraction)))
                  (or (eqv? 1 (logcount denom))
                      (ly:event-warning
                        (ly:grob-property time-signature 'cause)
                        "strange time signature found: ~a/~a"
                        (car time-fraction)
                        denom)))
                (set! last-time-fraction time-fraction)))))
     (make-engraver
       (listeners
         ((time-signature-event engraver event)
          (set! time-cause event)))
       ((process-music engraver)
        (or (ly:grob? time-signature)
            (make-time-signature engraver)))
       ((stop-translation-timestep engraver)
        (and (ly:grob? time-signature)
             (ly:prob? time-cause)
             (let ((measure-position
                     (ly:context-property context 'measurePosition))
                   (partial-busy
                     (ly:context-property context 'partial-busy #f)))
               (and (ly:moment? measure-position)
                    (< 0 (ly:moment-main measure-position))
                    (not partial-busy)
                    (ly:event-warning
                      (ly:grob-property time-signature 'cause)
                      "mid-measure time signature without \\partial"))))
        (set! time-signature #f)
        (set! time-cause '())))))

timeSignatures = { \tempo 4 = 80 \time 4/4 s1 \time 3/8 s4.
\time 3/4 s2. \time 4/4 s1 \time 2/4 \acciaccatura s8 s2}

\score {
  \layout {
  \context {
    \Score
    \override MetronomeMark.break-align-symbols = #'(clef time-signature)
    \remove "Bar_number_engraver"
  }
  \context {
    \Staff
    \override TimeSignature.stencil = #(lambda (grob) (grob-interpret-markup grob (markup "")))
    \override MultiMeasureRest.spacing-pair = #'(clef . staff-bar)
    %\remove "Time_signature_engraver"
  }
  \context {
    \Score
  }
}
  <<
    \new Dynamics \with {
      \consists \Time_signature_engraver_scm
      \consists "Axis_group_engraver"
      \override TimeSignature.font-size = #8
      \override TimeSignature.break-align-symbol = #'staff-bar
      \override TimeSignature.X-offset = 
      #ly:self-alignment-interface::x-aligned-on-self
      \override TimeSignature.self-alignment-X = #LEFT
      \numericTimeSignature
    }
    {
      \timeSignatures
    }
   
    \new StaffGroup \with {} <<
    
    \new Staff \with {
    \consists "Bar_number_engraver"
    }    
    \relative c' {
    \textLengthOn
    \time 4/4
    c4 ( _\markup \column {
    "← Objects failed to appear"
    "below the time signature"
    "when using \\textLengthOn"
    }
    \textLengthOff
    d4 e4 f4 )
    \time 3/8
    a'4 ( g8 ) 
    \time 3/4
    R2. 
    \time 4/4
    c1 
    \time 2/4
    a8 ^\markup \column {
    "← Time signature appear twice" 
    "when one staff has a grace note" 
    "as the first note in a bar"
    } g8 f8 e8
    }
    
    \new Staff \relative c' {
    \time 4/4
    R1
    \time 3/8
    R4.
    \clef bass
    \time 3/4
    a,2. \> \startTextSpan 
    \break
    \time 4/4
    c2 _\markup \column {
    "  "
    "↑"
    "Harpin stops below the time signature"
    }
    ^\markup \column {
    "TextSpanner stops below the time signature"
    "↓"
    }
    e2 \! \stopTextSpan
    \clef treble
    \time 2/4
    \acciaccatura f'8 a8 
    g8 f8 e8
    }
    
    \new Staff \relative c' { 
    \clef bass 
    \time 4/4
    R1 
    \time 3/8
    R4. 
    \time 3/4
    R2. 
    \time 4/4
    c1
    \time 2/4
    a8 g8 f8 e8
    }
    >>
  >>
}

Reply via email to