stemless notes

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

stemless notes

Arthur Dyck
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.

Arthur \version "2.6.0"
global =
{
        \key g \major
        \set Staff.autoBeaming = ##f
       
}

\header {
                title = "O Heavenly King"
                subtitle = ""
                tagline = ""  
                poet = ""
                composer = ""
}

#(set-global-staff-size 15)



upperOne =
        \relative c''{
      \voiceOne
        \set Timing.timing = ##f
        \key g \major
        b2 b1 \bar ".|" g4 fis2 fis4 fis g1 \bar "|"
        a4  \once \override Stem #'transparent = ##t a a a2 g4 g a1 \bar "|"
                }
       
upperTwo =  
        \relative c''{
        \set Timing.timing = ##f
        \voiceTwo
        g2 g1 d4 dis2 dis4 dis e1
        fis4 \once \override Stem #'transparent = ##t fis4 fis fis2 e4 e fis1
}

lowerOne =
        \relative c' {
      \set Timing.timing = ##f
        \key g \major
        \voiceOne
        d2 d1 b4 b2 b4 b b1
        d4 \once \override Stem #'transparent = ##t d4 d d2 d4 d d1
}

lowerTwo =  
        \relative c {
        \set Timing.timing = ##f
        \voiceTwo
        g'2 g1 d4 b2 b4 b4 e1
        d4 \once \override Stem #'transparent = ##t d d d2 d4 d d1
       
}

firstverse = \lyricmode {
        A -- men. O Heav -- en -- ly King,
        the Comforter, the Spir -- it of Truth
     }


\score{
        \context StaffGroup<<
                \context Staff = "upper"
                       
                        <<
                        \clef treble
                        \context Voice = "one" \upperOne
                        \context Voice = "two" \upperTwo
                        >>
                       
  \lyricsto "one" \new Lyrics {
                                        \firstverse
                                        }

                       
                \context Staff = "lower" <<
                                       
                                        \clef bass
                                        \context Voice = "one" \lowerOne
                                        \context Voice = "two" \lowerTwo
                                        >>
                >>

\layout {
               
  \context{\Staff
                        \remove "Time_signature_engraver"
                }
                \context{\StaffGroup
                }

                \context{\Score
                barNumberVisibility = #all-invisible
                }
        }


\midi { }
}
\paper {

        topmargin = .0\in
        leftmargin = .1\in
        linewidth = 5\in
        indent = 0
        pagenumber = "no"
        }







_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: stemless notes

Daniel Johnson-2
[hidden email] 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 %%%


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