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: Peter Crighton
Subject: Re: Using other NoteHeads with \harmonicByFret?
Date: Thu, 2 Feb 2012 16:54:43 +0100

No, unfortunately it doesn't have the desired effect.
First, there was a "$" missing before "fret" in the "\override
TabNoteHead" line.

But then, it does override the NoteHead for every following note, that
does NOT have \mixedHarmonicByFret in front of it. All
\mixedHarmonicByFret notes still have harmonic NoteHeads.
I then added a \revert NoteHead #'style after the other \revert line,
but then it works like the normal \harmonicByFret, so no
harmonic-mixed anywhere.

I'm trying to figure this out, but don't have more ideas right now…

--
Peter Crighton | (mainly) Progressive Rock musician based in
Mainz/Wiesbaden, Germany
http://www.petercrighton.de



2012/1/30 Marc Hohl <address@hidden>:
> 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]