]> git.donarmstrong.com Git - lilypond.git/commit
Implement framework for post-fix text (de)cresc spanners (backend only)
authorReinhold Kainhofer <reinhold@kainhofer.com>
Fri, 21 Aug 2009 22:47:41 +0000 (00:47 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 29 Aug 2009 19:24:50 +0000 (21:24 +0200)
commita1fa0e63b1bf2c61a9c19a33b7034989fb3fac05
tree0e2cde07815e4deb955e4555de3ad483559dad40
parenta5ff70c58c688783d05f025db5ea605e8a55ba71
Implement framework for post-fix text (de)cresc spanners (backend only)

The main problem why \decr or \dim were prefix operators was that the
new dynamic engraver was reading only the properties of the Engraver
itself, so there was no way to create a CrescendoEvent and at the same
time specify the hairpin/text behavior.

This patch makes the New_dynamic_engraver also look at the properties
of the (Dec|C)recendoEvent and prefer a setting from there. If the event
does not have a property (which will be the case most of the time), the
Engraver's settings are used (i.e. same behavior as now).

With this change, e.g. \dim can be defined as
dim = #(make-music 'DecrescendoEvent 'span-direction START
            'span-type text 'span-text "dim.")
and used as postfix like a4\dim without the need of any overrides
before the affected note.

This is just the backend commit, implementing processing of the event's
properties. The definition of \cresc is still unchanged, leaving the old
prefix notation in place, until we find  good upgrade path.

Also add regtests for text cresc spanners and add the regtest to the
snippets.
Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly [new file with mode: 0644]
Documentation/snippets/new/dynamics-text-spanner-postfix.ly [new file with mode: 0644]
input/regression/dynamics-custom-text-spanner-postfix.ly [new file with mode: 0644]
input/regression/dynamics-text-spanner-postfix.ly [new file with mode: 0644]
lily/new-dynamic-engraver.cc
scm/define-music-properties.scm