|
Fix #765: Display method for \ottava.
Since \ottava currently uses ApplyContext to set the relevant context
properties which trigger creation of an ottava bracket, the information
useful to its display method (i.e., the octavation) is inaccessible: the only
music property which can be extracted is the argument to ApplyContext, its
procedure.
By wrapping the existing code which creates an ottava bracket (make-ottava-set)
in a synthetic event, the octavation can be passed as a music property, thus
making it accessible from a display method.
* input/regression/display-lily-tests.ly:
add test for \ottava
* ly/music-functions-init.ly (ottava):
create ottava bracket via OttavaMusic, setting 'ottava-number
* scm/define-music-display-methods.scm:
add display method for \ottava, which simply catches OttavaMusic and reads
'ottava-number
* scm/define-music-properties.scm (all-music-properties):
add 'ottava-number
* scm/define-music-types.scm:
copy make-ottava-set from scm/music-functions.scm
add OttavaMusic: uses a sequential iterator to call make-ottava-set via its
elements-callback
* scm/music-functions.scm:
add ly:context-property as procedure-with-setter
remove make-ottava-set
|