lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using other NoteHeads with \harmonicByFret?


From: Marc Hohl
Subject: Re: Using other NoteHeads with \harmonicByFret?
Date: Mon, 30 Jan 2012 11:23:56 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Thunderbird/3.1.16

Am 29.01.2012 15:54, schrieb Peter Crighton:
Hello y'all,

Is there an easy way to use other NoteHeads (I need harmonic-mixed)
with \harmonicByFret, other than overriding the NoteHead right after
every use of \harmonicByFret? I guess I could write my own
\harmonicByFret function, but I can't even find the existing one to
look how it is written.
\harmonicBy... is defined in ly/music-functions-init.ly; based on this definition, something like

mixedHarmonicByFret = #(define-music-function (parser location fret music) (number? ly:music?) (_i "Convert @var{music} into mixed harmonics; the resulting notes resemble harmonics played on a fretted instrument by touching the strings above @var{fret
}.")
  (let* ((fret (number->string fret))
         (pitch (fret->pitch fret)))
        (make-sequential-music
         (list
          #{
\override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label fret)
            \override NoteHead #'style = #'harmonic-mixed
          #}
          (make-harmonic
            (calc-harmonic-pitch pitch music))
          #{
            \revert TabNoteHead #'stencil
          #}))))

should do the job, but I didn't test this.

HTH,

Marc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]