Filling In a Half Note?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Filling In a Half Note?

melophobic
Is there a way to fill in just the middle part of a half note (or whole note
too) with white? I have tried \whiteout, but that gives me white around the
notehead as well.

Thank you,

Brian



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

Reply | Threaded
Open this post in threaded view
|

Re: Filling In a Half Note?

Aaron Hill
On 2020-05-15 9:19 am, melophobic wrote:
> Is there a way to fill in just the middle part of a half note (or whole
> note
> too) with white? I have tried \whiteout, but that gives me white around
> the
> notehead as well.

Here's an option:

%%%%
\version "2.20.0"

whiteoutHalfNote =
   \tweak stencil #(lambda (grob)
     (grob-interpret-markup grob #{
       \markup \combine
         \with-color #white \musicglyph #"noteheads.s2"
         \musicglyph #"noteheads.s1" #})) \etc

{ \whiteoutHalfNote c'2 2 }
%%%%

This uses the quarter-note head to whiteout the background and then
overlays the half-note head.


-- Aaron Hill

whiteout-half-note.cropped.png (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Filling In a Half Note?

melophobic
Interesting. That will most likely work.

Thank you!

Brian



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

Reply | Threaded
Open this post in threaded view
|

Re: Filling In a Half Note?

Schneidy
Hi Brian,
Another option could be to use: http://lsr.di.unimi.it/LSR/Item?id=890
And do:

\version "2.20.0"
 
whiteoutHalfNoteAlter =
   \tweak stencil #(lambda (grob)
     (grob-interpret-markup grob #{
        \markup
        \override #'(filled . #t) {
          \combine
          \path #0
          #'((moveto    0.000  -0.250)
             (curveto   0.000  -0.200   0.060   0.210   0.350   0.365)
             (curveto   0.510   0.460   0.700   0.545   1.050   0.545)
             (curveto   1.200   0.545   1.380   0.500   1.380   0.270)
             (curveto   1.380   0.120   1.290  -0.140   1.120  -0.300)
             (curveto   0.870  -0.500   0.520  -0.542   0.320  -0.542)
             (curveto   0.200  -0.542   0.000  -0.530   0.000  -0.250)
             (closepath))
          \with-color #white
          \path #0
          #'((moveto    0.000  -0.250)
             (moveto    0.110  -0.270)
             (curveto   0.110  -0.380   0.210  -0.435   0.280  -0.435)
             (curveto   0.370  -0.435   0.600  -0.300   0.850  -0.135)
             (curveto   1.100   0.030   1.273   0.140   1.273   0.270)
             (curveto   1.273   0.350   1.200   0.440   1.090   0.440)
             (curveto   1.040   0.440   0.850   0.350   0.600   0.185)
             (curveto   0.200  -0.080   0.110  -0.150   0.110  -0.270)
             (closepath))
        } #})) \etc

{ \whiteoutHalfNoteAlter c'2 2 }

Cheers,
Pierre

Le ven. 15 mai 2020 à 18:50, melophobic <[hidden email]> a écrit :
Interesting. That will most likely work.

Thank you!

Brian



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

Reply | Threaded
Open this post in threaded view
|

Re: Filling In a Half Note?

melophobic
This is definitely an option as well. Thank you!



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html