]> git.donarmstrong.com Git - lilypond.git/commit
Issue 4138: Make \time work with \tweak and \footnote
authorDavid Kastrup <dak@gnu.org>
Sun, 28 Sep 2014 08:58:43 +0000 (10:58 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 6 Oct 2014 07:35:19 +0000 (09:35 +0200)
commit78c9194fe61a9cbe372b12ec5125779acf706a77
tree7b7b89e055cea9f47b69290db0590dd7f464dafd
parentcba58043bdff70052f2bb411806f9e438380ae10
Issue 4138: Make \time work with \tweak and \footnote

The way this is done is to let a TimeSignatureMusic expression expand to
produce a TimeSignatureEvent that can be listened to.  The
Time_signature_engraver _does_ listen to this event and uses it to set
the origin for TimeSignature grobs created in the same time step.
Another effect is that any warnings associated with a TimeSignature grob
will be able to point to a source location in case that the respective
change of timing parameters can be traced to TimeSignatureMusic in a
context below the context of the Time_signature_engraver creating the
TimeSignature.

Since events that can be listened to create a Bottom context implicitly,
this causes a difference for cases like

\score { { \time 3/4 \skip 2. r2. } }

Previously, Staff (and Voice) contexts were only created _after_ the
\skip completed (the timing parameters are set in the Timing context,
equal to Score by default), making the time signature appear only in
measure 2.  Now the implicit creation of a Staff (and thus a
Time_signature_engraver) in the course of creating a Bottom context (in
this case a Voice) makes the time signature appear right away.

If one uses a separate non-printing context for containing timing info,
one has to make sure that any implicitly created Bottom context is
non-printing as well.
lily/time-signature-engraver.cc
scm/define-event-classes.scm
scm/define-music-callbacks.scm
scm/define-music-types.scm