Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I limit the Staff.NoteHead overrides?
    primarykey
    data
    text
    <p>I often have a string of harmonics, so I decided to use a music function (the function is a tangent; if I place the override directly with the notes I get the same problem. The issue is the override itself):</p> <pre><code>harmonics = #(define-music-function (parser location notes) (ly:music?) #{ %\harmonicsOn \override Staff.NoteHead #'style = #'harmonic-mixed $notes \revert Staff.NoteHead #'style %\harmonicsOff #} ) </code></pre> <p><code>\harmonicsOn</code> and <code>\harmonicsOff</code> works, but they're always hollow notes so I don't want to use them. Overriding the notehead allows me to have solid heads on quarter notes.</p> <p>My problem is that the note heads are overridden for all notes in the duration, not only the notes supplied to the function (see m. 2, 3 in the image below the following code):</p> <pre><code>melody = \relative c' { \stemUp \repeat unfold 4 { r8 b g b e' b, | } \bar "|." } harmony = \relative c' { \stemDown e,2. | \harmonics { e } | \harmonics { e4 e } s | e2. | } \score { \new Staff { \time 3/4 \clef "treble_8" \key g \major &lt;&lt; \new Voice { \melody} \new Voice { \harmony} &gt;&gt; } } </code></pre> <p><img src="https://i.stack.imgur.com/Y1HBw.png" alt="enter image description here"></p> <p>I'm looking for a way to modify only the notes I want (in this case, in <code>\harmony</code>), leaving the other notes within that duration untouched.</p> <p><em>Edit</em>: I tried with lilypond 2.17 using the new <code>\temporary</code> command, but I get the same result.</p> <p><a href="https://dl.dropboxusercontent.com/u/49933602/SE%20NoteHead%20Question.ly" rel="nofollow noreferrer">Full code</a> | <a href="http://www.lilypond.org/doc/v2.16/Documentation/internals/notehead" rel="nofollow noreferrer">NoteHead Internals Documentation</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload