[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: Using other NoteHeads with \harmonicByFret?
From: Marc Hohl <marc () hohlart ! de>
Date: 2012-01-30 10:23:56
Message-ID: 4F266FBC.7050407 () hohlart ! de
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic