2013/2/10 <lilyp...@googlecode.com>: > Updates: > Labels: -Patch-countdown Patch-push > > Comment #15 on issue 3104 by d...@gnu.org: note-by-number and note don't > support flag styles other than default > http://code.google.com/p/lilypond/issues/detail?id=3104 > > Countdown complete (actually already yesterday). Push at your discretion. > >
As I expected this is ways over my head, though, here some results of my trials. First I added the following to the code of \note-by-number: (set! style (cond ((not (null? style)) style) ((not (null? (ly:output-def-lookup layout 'style))) (ly:output-def-lookup layout 'style)) (else 'default))) (set! flag-style (cond ((not (null? flag-style)) flag-style) ((not (null? (ly:output-def-lookup layout 'flag-style))) (ly:output-def-lookup layout 'flag-style)) (else 'default))) (newline)(display "style ")(write style) (newline)(display "flag-style ")(write flag-style) Second, in define-context-properties.scm I added: (flag-style ,symbol? "The style of the flag.") (style ,symbol? "The style of the note-head.") And made some experiments: (1) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \layout { style = #'mensural flag-style = #'mensural } \new MensuralStaff \relative c' { \tempo "" 8 = 80 c8 } \markup \note-by-number #3 #0 #1 \new Staff \with { } \relative c' { \tempo "" 8 = 80 c8 } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Results: the toplevel-markup uses defaults, The MetronomeMark in MensuralStaff uses 'mensural for heads and flags, but also does the default-Staff. I found no method to limit the \layout-settings to a specific context: \layout { \context { \MensuralStaff style = #'mensural flag-style = #'mensural } } gives no error/warning, but is without effect. (2) Replacing \layout with \paper { style = #'mensural flag-style = #'mensural } results in mensural-style for the MetronomeMark of all Staffs _and_ for the top-level-markup. (3) Using both \paper and \layout with different settings results in a _different_ appearance of the toplevel-markup and the Staffs. But again, _both_ Staffs act equal regarding their MetronomeMark. ======================================================================= What to do now? Seems that style/flag-style-properties, perhaps renamed, should be integrated somehow, to make it possible to refer to them even in an explicit context-modification. Speculating, I'd say it means some work in C++ beyond my expertise. I tend to push \note-by-number as it stands (or let it push). Once the work with property-integrating/refering is done a follow-up-patch might be feasible. David, what do you think? _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel