2016-03-15 9:49 GMT+01:00 David Kastrup <d...@gnu.org>: > Eby Mani <eby...@yahoo.com> writes: > >> I'm getting the following error on Lilypond 2.18.2 while trying your >> "\altChord" function. Are those functions limited to Lilypond 2.19 ?. >> >> "Parsing.../opt/lilypond/usr/share/lilypond/current/scm/ly-syntax-constructors.scm:56:23: >> In expression (apply (ly:music-function-extract fun) parser ...): >> /opt/lilypond/usr/share/lilypond/current/scm/ly-syntax-constructors.scm:56:23: >> Wrong number of arguments to #<procedure #f (m1 m2)>" >> >> Eby > > altChords = > #(define-music-function (m1 m2)(ly:music? ly:music?) > > has to be > > altChords = > #(define-music-function (parser location m1 m2)(ly:music? ly:music?) > > in 2.18 instead. > > -- > David Kastrup
The arguments of applyOutput should be changed as well. Complete 2.18.-code of the final function: altChords = #(define-music-function (parser location m1 m2)(ly:music? ly:music?) "Return the default ChordName of @var{m1}, with an added parenthesized ChordName derived from @var{m2}" #{ \applyOutput ChordNames %.ChordName #(lambda (g ctx p) (let ((main-text (ly:grob-property g 'text)) (alt-text (apply ignatzek-chord-names (pitches-bass-inversion-context-list m2 ctx)))) (ly:grob-set-property! g 'text #{ \markup { $main-text \hspace #0.4 \fontsize #-3 \parenthesize $alt-text } #}))) $m1 #}) Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user