lilypond-user
[Top][All Lists]
Advanced

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

Re: custom compound time signature


From: Thomas Morley
Subject: Re: custom compound time signature
Date: Sun, 3 Jun 2012 02:24:42 +0200

2012/6/2 diekunstderfuge <address@hidden>:
>
> Hi all,
>
> I'm trying to achieve the compound time signature seen in the image here:
> http://old.nabble.com/file/p33950720/custom_time_signature.png
>
> As you can see, it's meant to represent 3 bars of 2/4 grouped together as
> one bar. My plan was to write it as one bar of 3/2 and then override the
> time signature stencil.
>
> First, I've used this snippet ( http://lsr.dsi.unimi.it/LSR/Item?id=272
> http://lsr.dsi.unimi.it/LSR/Item?id=272 ) to create a "dummy" staff with
> only the time signatures. (For some reason, \numericTimeSignature does not
> seem to work inside of the TimeSig context. Does anyone know why?)

Have a look at /ly/property-init.ly. where \numericTimeSignature is defined:
numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered

But now you're using a new custom-defined context: "TimeSig"
Replace Staff with TimeSig and it will work.

> This snippet ( http://lsr.dsi.unimi.it/LSR/Item?id=609
> http://lsr.dsi.unimi.it/LSR/Item?id=609 ) prints only the numerator of the
> time signature, which I need to get the "3". I do not know how to combine
> this with a compound time signature

Try:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.14.2"

customTimeSigI =
 \once \override TimeSig.TimeSignature #'stencil =
   #(lambda (grob)
      (grob-interpret-markup grob
        (markup
          #:vcenter #:number "3"
          #:vcenter "x"
          #:override '(baseline-skip . 0) #:number (#:column ("2" "4")))))

\layout {
  \context {
    \type "Engraver_group"
    \consists "Time_signature_engraver"
    \consists "Axis_group_engraver"
    \name "TimeSig"
    \override TimeSignature #'font-size = #2
    \override TimeSignature #'break-align-symbol = ##f
    \override TimeSignature #'X-offset =
      #ly:self-alignment-interface::x-aligned-on-self
    \override TimeSignature #'self-alignment-X = #CENTER
    %\override TimeSignature #'self-alignment-X = #LEFT
    \override TimeSignature #'after-line-breaking =
      #shift-right-at-line-begin
  }
  \context {
    \Score
    \accepts TimeSig
  }
  \context {
    \Staff
    \remove "Time_signature_engraver"
  }
}

timeSignatures = {
        \override TimeSig.TimeSignature #'style = #'numbered
        \time 2/4
        s2
        \time 3/4
        s2.
        \time 4/4
        s1
        \customTimeSigI
        \time 6/4
        \set Score.beatStructure = #'(2 2 2)
        s1.
}

\score {
  <<
    \new TimeSig \timeSignatures
    \new Staff \relative { c'2 c2. c1 c1. \repeat unfold 12 { c8 } }
    \new Staff { a2 a2. a1 a1. a1.}
  >>
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

> Controlling beaming behavior, often a concern with compound time signatures,
> is not important as the TimeSig staff displays only time signatures.

I added the "2.14.2"-command \set Score.beatStructure = #'(2 2 2)
Delete it if you want or replace it with an "2.12.3"-command.
But please note: it _will_ affect the score.

> I am using 2.12.3.

Why do you use this outdated version?
Well, some time ago the LSR was on "2.12.3" and that was the reason
why I didn't delete this version, while installing the newer stable
version and the newest development-version.
But I'm absolutely sure that the LSR is now on "2.14.2" :)

HTH,
  Harm



reply via email to

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