lilypond-user
[Top][All Lists]
Advanced

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

Re: TrillPitchHead doesn’t implement note-head-interface (?)


From: David Kastrup
Subject: Re: TrillPitchHead doesn’t implement note-head-interface (?)
Date: Mon, 03 Feb 2020 22:13:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Kieren MacMillan <address@hidden> writes:

> Hi Harm,
>
>> which question, is it solved?
>
> Yes. I fixed the OP’s MWE (see 1st score in this snippet) so that it
> did what he wants (see 2nd score in this snippet):
>
> %%%
> \version "2.19.83"
>
> { \pitchedTrill e''2 \harmonic \startTrillSpan f'' \stopTrillSpan }
>
> dtrillOn = {
> \temporary \override TrillPitchHead.stencil = #ly:text-interface::print
> \temporary \override TrillPitchHead.text = \markup { \musicglyph 
> #"noteheads.s0harmonic" }
> }
> dtrillOff = {
> \revert TrillPitchHead.stencil
> \revert TrillPitchHead.text
> }
>
> { \dtrillOn \pitchedTrill e''2 \harmonic \startTrillSpan f'' \stopTrillSpan 
> \dtrillOff }
> %%%
>
> If there’s a better way, let me know!

It's more a note than anything else: similar LilyPond On/Off "pairs" use
\override / \revert  rather than \temporary \override / \revert

so that for a real matched pair you need \temporary \...On and \...Off
(note that \temporary { \override ... \overide ... } actually works, as
does the same with \once).

Whether that convention is a sensible one is certainly debatable.

What you do is really correct, it's just not a complete match to how
LilyPond's commands implement On/Off property commands.

And I'd use just \markup \musicglyph "noteheads.s0harmonic" (omitting #
may require 2.19.84 though): the braces you use turn this into a
somewhat spurious \markup \line { \musicglyph ... } .

-- 
David Kastrup



reply via email to

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