%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.26.0/input/regression/time-signature-grob-spec-override.ly"
\sourcefileline 0
\version "2.25.80"

\header {
  texidoc = "It is possible to override @code{TimeSignature@/.time-signature} to
change the printed time signature without changing related context properties.

The marginal labels show the values of the @code{style} and
@code{denominator-@/style} properties in each case."
}

#(ly:set-option 'warning-as-error #t)

\layout {
  indent = 2 \cm

  \context {
    \Staff
    \remove Clef_engraver
  }
}

%% Covering the deprecated 'fraction property is a separate concern, but this
%% is a good place for it.
#(ly:expect-warning
  (G_ "the grob property '~a' is deprecated; use '~a'")
  "fraction"
  "time-signature")
#(define (expect-fraction expected)
  (lambda (grob org cur)
   (let ((actual (ly:grob-property grob 'fraction *unspecified*)))
    (if (not (equal? actual expected))
     (ly:input-warning (*location*) "Unexpected fraction:
  expected: ~a
  actual  : ~a" expected actual)))))

music = \fixed c' {
  \once \override Timing.TimeSignature.time-signature = 2/2
  \applyOutput Timing.TimeSignature #(expect-fraction '(2 . 2))
  \time 2/4
  s2

  \once \override Timing.TimeSignature.time-signature = #'(0 . 16/127)
  \applyOutput Timing.TimeSignature #(expect-fraction '(0 . 16/127))
  \time 2/4
  s2

  \once \override Timing.TimeSignature.time-signature = #'(3.14 . -4)
  \applyOutput Timing.TimeSignature #(expect-fraction '(3.14 . -4))
  \time 2/4
  s2

  \once \override Timing.TimeSignature.time-signature = #'(2/3 . 0)
  \applyOutput Timing.TimeSignature #(expect-fraction '(2/3 . 0))
  \time 2/4
  s2

  \once \override Timing.TimeSignature.time-signature = #'((2 3) . 8)
  \applyOutput Timing.TimeSignature #(expect-fraction '(5 . 8))
  \time 2/4
  s2

  \once \override Timing.TimeSignature.time-signature = #'((1 . 2) (3 . 4))
  \applyOutput Timing.TimeSignature #(expect-fraction '(5 . 4))
  \time 2/4
  s2
}

<<
  \new Staff \with {
    \override TimeSignature.style = #'C
    instrumentName = \markup \column {
      \typewriter "C"
      "(default)"
    }
  } \music

  \new Staff \with {
    \override TimeSignature.style = #'numbered
    instrumentName = \markup \column {
      \typewriter "numbered"
      "(default)"
    }
  } \music

  \new Staff \with {
    \override TimeSignature.style = #'numbered
    \override TimeSignature.denominator-style = #'none
    instrumentName = \markup \column {
      \typewriter "numbered"
      \typewriter "none"
    }
  } \music

  \new Staff \with {
    \override TimeSignature.style = #'numbered
    \override TimeSignature.denominator-style = #'note
    instrumentName = \markup \column {
      \typewriter "numbered"
      \typewriter "note"
    }
  } \music

  \new Staff \with {
    \override TimeSignature.style = #'single-number
    instrumentName = \markup \column {
      \typewriter "single-number"
      "(default)"
    }
  } \music
>>



% ****************************************************************
% end ly snippet
% ****************************************************************
