Hi.
I think I see what you want to achieve : you want to write in Scheme the function \harmonicsOn \harmonicsOff shown here <http://lilypond.org/doc/v2.13/Documentation/notation/common-notation-for-unfretted-strings#harmonics> ?
Before I dive into Scheme, tell if I am on the right side !

Best regards
JMarc

On 21/09/2010 08:22, Marc Hohl wrote:
Éditions IN NOMINE schrieb:
Naerly the same, that works perfectly (welle I'm quite enthousiastic beacause it's my first scheme function !) :

makeHarmonic =
  #(define-music-function (parser location note)(ly:music?)
  "force noteHead to harmonic"
  (let ((result-note (ly:music-deep-copy note)))
(set! (ly:music-property (first (ly:music-property result-note 'elements)) 'articulations)
          (list (make-music (quote HarmonicEvent)))
    )
    result-note)
    )

{c''4 \makeHarmonic c''4}

Best regards.
Thank you! It works, but only for a single note as argument, something like
\makeHarmonic < c g >4 applies the HarmonicEvent only to the first note.
And \makeHarmonic { c4 d e f g } doesn't change anything at all.

Do you have an idea how to generalize this function?

Marc



_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to