2013/8/17 David Kastrup <d...@gnu.org>: > Thomas Morley <thomasmorle...@gmail.com> writes: > >> is there any easy way to limit customized graceSettings to Voice? >> >> While using $(add-grace-property ...), any further setting of it will >> override the former. > > Have you taken a look at add-grace-property? It's rather appalling. It > figures out the level where the grace settings have been defined, and > overrides them _there_.
Yep. But I didn't get the quick fix: https://codereview.appspot.com/13088043/ Thanks a lot. > I think it shouldn't do that but rather set them at the _current_ level. > The same for remove-grace-property. Of course, that means that if you > override the Staff or Voice grace properties while in a \Voice context, > the Staff properties will get ignored altogether (as there can be no > Staff within a Voice), and the Voice properties will only hold for this > Voice. > > I don't mind that. I'd expect overrides at Score level if you want to > have them hold globally. +1 Though, another problem arises. I can't make work the following code. Either add-grace-property is ignored or LilyPond complains about clashing note columns, regardless of the use of the old add-grace-property or your fix. Issue 630 ? http://code.google.com/p/lilypond/issues/detail?id=630 \version "2.17.24" % The new: #(define-public (add-grace-property context-name grob sym val) "Set @var{sym}=@var{val} for @var{grob} in @var{context-name}." (define (set-prop context) (let* ((current (ly:context-property context 'graceSettings)) (new-settings (append current (list (list context-name grob sym val))))) (ly:context-set-property! context 'graceSettings new-settings))) (make-apply-context set-prop)) \new Staff % \with { $(add-grace-property 'Voice 'NoteHead 'style 'cross) } { << \new Voice \with { $(add-grace-property 'Voice 'NoteHead 'style 'mensural) } { \voiceOne c''1 \grace d''8 \voiceOne c''4 } \new Voice \with { $(add-grace-property 'Voice 'NoteHead 'style 'diamond) } { \voiceTwo c'1 \grace d'8 \voiceTwo c'4 } >> } Any idea? Thanks, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user