lilypond-user
[Top][All Lists]
Advanced

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

Re: Quarter notes with bars like \breve


From: tisimst
Subject: Re: Quarter notes with bars like \breve
Date: Mon, 29 Feb 2016 06:36:07 -0700 (MST)

Gregor,

How about this:

%%%%%%%%%%%%%%%%%

\version "2.19.36"

#(define (qBarNote grob)
  (grob-interpret-markup grob
    #{
      \markup {
        \concat {
          \hspace #-0.06
          \path #0.12
            #'((moveto 0 -0.6)
               (lineto 0 0.6))
          \musicglyph #"noteheads.s2"
          \hspace #-0.02
          \path #0.12
            #'((moveto 0 -0.6)
               (lineto 0 0.6))
        }
      }
    #}))

qBarNotesOn = {
  \omit Stem
  \override NoteHead.stencil = #qBarNote
}

qBarNotesOff = {
  \undo \omit Stem
  \revert NoteHead.stencil
}

\relative c' {
  <c e f a>2 \qBarNotesOn q4 \qBarNotesOff q |
}

%%%%%%%%%%%%%%%%%

There's certainly more that could be done to make the functionality more robust (like checking for duration, style, etc.), but this should at least get you going.

HTH,
Abraham

On Sun, Feb 28, 2016 at 3:12 PM, David Kastrup [via Lilypond] <[hidden email]> wrote:
Gregor Giesen <[hidden email]> writes:

> Dear Simon,
>
> On 28.02.2016 20:12, Simon Albrecht wrote:
>> On 28.02.2016 18:31, Gregor Giesen wrote:
>> > how can I write a quarter note (without stem) embraced by two bars
>> > exactly like a note of the length \breve?
>>
>> It’s not easy, since the bars belong to the note head glyph used by 
>> breve notes. Probably you need to combine three tools:
>> – [\once] \hide Stem
>> – Overriding the NoteHead stencil using a markup _expression_: 
>> <http://www.lilypond.org/doc/v2.18/Documentation/notation/modifying-s
>> tencils>
>> – and the \path markup command 
>> <http://www.lilypond.org/doc/v2.18/Documentation/notation/graphic#ind
>> ex-_005cpath-1> 
>> for drawing the actual note head. I don’t have much experience with 
>> this, others on the list might help.
> thanks a lot! I tried the following, which unfortunately does not scale
> well. However, it is a quick fix:
>
> barPath = #'((moveto 0 -.6)
>    (lineto 0 .6)
>    (moveto 1.3 -.6)
>    (lineto 1.3 .6)
>    (closepath))
Working with curveto should likely scale better.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user



If you reply to this email, your message will be added to the discussion below:
http://lilypond.1069038.n5.nabble.com/Quarter-notes-with-bars-like-breve-tp187838p187862.html
To start a new topic under User, email [hidden email]
To unsubscribe from Lilypond, click here.
NAML


breve-like-quarter-noteheads.png (80K) Download Attachment


View this message in context: Re: Quarter notes with bars like \breve
Sent from the User mailing list archive at Nabble.com.

reply via email to

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