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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user