lilypond-user
[Top][All Lists]
Advanced

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

Re: Centering tremoli under noteheads and suppressing lines through/abov


From: Mike Solomon
Subject: Re: Centering tremoli under noteheads and suppressing lines through/above/below off-the-staff notes
Date: Sun, 29 Aug 2010 10:01:38 -0400
User-agent: Microsoft-Entourage/11.4.0.080122

Figured it out (sorta)

For the tremolo thing, this seems to work:

#(define (center-trem grob)
   (let* ((x-extent
           (ly:grob-property
             (ly:grob-property
               (ly:grob-parent grob X)
               'cause)
             'X-extent)))
   (ly:stencil-translate (ly:stem-tremolo::print grob)
                         (cons (/ (- (cdr x-extent) (car x-extent)) 2)
                               0))))

\relative c' { a b \once \override Voice . StemTremolo #'stencil =
#center-trem c:32 }

For the getting-rid-of-line-through/above/below-note problem, if you
increase the number of staff lines and subsequently make the staff lines
transparent, lilypond will think that a note above the staff actually has a
line going through it and thus not draw said line, which effectively fixes
the problem.  That brings about other vertical spacing issues, but it works.
If anyone has any better ideas, let me know!

~Mike

On 8/29/10 8:30 AM, "Mike Solomon" <address@hidden> wrote:

> Sorry...this time w/ code that works!
> 
> \version "2.13.30"
> 
> 
> lb = \relative c''' {
>   \override Staff . StaffSymbol #'transparent = ##t
>   \clef "treble^8"
>   \override Voice . Stem #'stencil = ##f
>   \override Voice . Beam #'stencil = ##f
>   s16 \once \override Voice . NoteHead #'font-size = #2 \bendAfter #2
> a16\p\< \once \override Voice . NoteHead #'font-size = #-2 \parenthesize
> d16\f g,16\mp\<
>   a16-. a16-. \once \override Voice . NoteHead #'font-size = #2 \bendAfter
> #4 b16\f \once \override Voice . NoteHead #'font-size = #-2 \parenthesize
> f'16
>   \once \override Voice . NoteHead #'font-size = #2 a4:32^\markup { \italic
> "jete"} \glissando
>   \once \override Voice . NoteHead #'font-size = #-2 \parenthesize c,16 s8.
>   \revert Voice . Stem #'stencil
>   \revert Voice . Beam #'stencil
>   \revert Staff . StaffSymbol #'transparent
> }
> 
> \score { \new Staff { \lb } }
> On 8/28/10 8:58 PM, "Mike Solomon" <address@hidden> wrote:
> 
>> Hey all,
>>     I'm working on a piece with a lot of birdsong & I'm using notation that
>> looks more or less like the snippet below.  Before I work out my own hacks,
>> I was wondering if any of you had quick fixes for the following two things:
>> 
>> 1)  Is there a way to suppress the lines through / above / below over and
>> under the staff notes?  In this example, you'll see that the high A has a
>> line through it, and I'd like to avoid that if at all possible.
>> 2)  The tremolo is typeset where it would show up were there a stem - is
>> there an easy way to center it under the note?
>> 
>> Thanks!
>> ~Mike
>> 
>> \version "2.13.30"
>> 
>> 
>> lb = \relative c''' {
>>   \override Staff . StaffSymbol #'transparent = ##t
>>   \clef "treble^8"
>>   \override Voice . Stem #'stencil = ##f
>>   \override Voice . Beam #'stencil = ##f
>>   s16 \once \override Voice . NoteHead #'font-size = #2 \bendAfter #2
>> a16\p\< \
>>   a16-. a16-. \once \override Voice . NoteHead #'font-size = #2 \bendAfter
>> #4 b
>>   \once \override Voice . NoteHead #'font-size = #2 a4:32^\markup { \italic
>> "je
>>   \once \override Voice . NoteHead #'font-size = #-2 \parenthesize c,16 s8.
>>   \revert Voice . Stem #'stencil
>>   \revert Voice . Beam #'stencil
>>   \revert Staff . StaffSymbol #'transparent
>> }
>> 
>> \score { \new Staff { \lb } }
>> 
>> 
>> 
>> _______________________________________________
>> lilypond-user mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/lilypond-user
>> 
> 
> 
> 





reply via email to

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