On 16 February 2011 14:14, Rob Canning <r...@goto10.org> wrote: > i wonder is it possible to add a relative within the function? or maybe > allow the function to accept \relative as part of its input argument?i guess > the former would be better if its possible
I don't think it's possible since you'd have to wrap the transposed music in a RelativeOctaveMusic object, which can't be used inside a chord. The only alternative I can think of is to make the arguments absolute, even inside a \relative { } block: artHarm = #(define-music-function (parser location note) (ly:music?) (let* ((harm (ly:music-transpose (ly:music-deep-copy (car (ly:music-property note 'elements))) (ly:make-pitch 0 3 0))) (trans (make-music 'TransposedMusic 'element harm))) (set! (ly:music-property harm 'articulations) (list (make-music 'HarmonicEvent))) (make-music 'RelativeOctaveMusic 'element (context-spec-music (make-simultaneous-music (list harm note)) 'Bottom)))) \relative c' { c4 \artHarm cis' \artHarm as \artHarm cis'' } Cheers, Neil _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user