lilypond-user
[Top][All Lists]
Advanced

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

Re: stemless notes


From: Daniel Johnson
Subject: Re: stemless notes
Date: Wed, 02 Nov 2005 12:17:32 -0800
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050713)

address@hidden wrote:

>I have been able to get transparent note stems working.  
>
>Now I am trying to create to short vertical lines on each side of the stemless 
>notes to indicate that there is a string of words sung on that one note in 
>free time.  I tried using the \barOne and \barTwo definitions in the Gregorian 
>chant template, but lilypond is refusing to process that. Any suggestions?  
>Thanks again.
>
%%% BEGIN LILYPOND CODE %%%

\version "2.6.0"

#(define (vertline-stencil stencil thickness padding)
  "Add vertical lines around STENCIL, producing a new stencil."
  (let* ((x-ext (interval-widen (ly:stencil-extent stencil 0) padding))
         (y-ext (interval-widen (ly:stencil-extent stencil 1) padding))
         (y-rule (make-filled-box-stencil (cons 0 thickness) y-ext))
         (x-rule (make-filled-box-stencil
                  (interval-widen x-ext thickness) (cons 0 thickness))))
    (set! stencil (ly:stencil-combine-at-edge stencil X 1 y-rule padding))
    (set! stencil (ly:stencil-combine-at-edge stencil X -1 y-rule padding))
    stencil))
#(define (make-stencil-vertline thickness padding callback)
  "Return function that adds vertical lines around the grob passed as
argument."
  (lambda (grob) (vertline-stencil (callback grob) thickness padding)))
 
holdNote = {
    \once\override Stem #'print-function = ##f
    \once\override NoteHead #'print-function = #(make-stencil-vertline
0.05 0.05 Note_head::print)
}
\score {
    \context Staff {
        c'2.
        \holdNote c'4
    }
}

%%% END LILYPOND CODE %%%




reply via email to

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