[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Centering tremoli under noteheads and suppressing lines through/abov
From: |
Neil Puttock |
Subject: |
Re: Centering tremoli under noteheads and suppressing lines through/above/below off-the-staff notes |
Date: |
Sun, 29 Aug 2010 16:24:26 +0100 |
On 29 August 2010 15:01, Mike Solomon <address@hidden> wrote:
> 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 }
That's slightly off-centre for your birdsong example (BTW, have you
been in the field brandishing a microphone like Messiaen? :)
Since the stems non-existent, you can set the attachment point on
which the tremolo's anchored:
\once \override NoteHead #'stem-attachment = #'(0 . 0)
Cheers,
Neil