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] <
[email protected]> wrote:

> Gregor Giesen <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=187862&i=0>> 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] <http:///user/SendEmail.jtp?type=node&node=187862&i=1>
> 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 [email protected]
> To unsubscribe from Lilypond, click here
> <http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2&code=dGlzaW1zdC5saWx5cG9uZEBnbWFpbC5jb218Mnw4MzU3Njg3MDU=>
> .
> NAML
> <http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


breve-like-quarter-noteheads.png (80K) 
<http://lilypond.1069038.n5.nabble.com/attachment/187885/0/breve-like-quarter-noteheads.png>




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Quarter-notes-with-bars-like-breve-tp187838p187885.html
Sent from the User mailing list archive at Nabble.com.
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to