lilypond-user
[Top][All Lists]
Advanced

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

Re: laying out plainsong chant


From: Gabe Moothart
Subject: Re: laying out plainsong chant
Date: Sun, 20 Oct 2013 20:34:43 -0700

Joram,
I stumbled upon a solution to this! It turns out that the second parameter to extra-offset is vertical spacing, so for odd staff lines you can draw the rest at the even line below it, and then bump it up by 0.5 with extra-offset to get the desired effect.

This is what I came up with:

longbar = #(define-music-function (parser location pos) (number?)
  (let ((offset (if (odd? pos) 0.5 0))
        (staffpos (if (odd? pos) (- pos 1) pos))
       )
       #{
       \override Rest #'font-size = #4
       \override Rest #'staff-position = #staffpos
       \override Rest #'extra-offset = #(cons 0 offset)
       r2*1/4
       \once \override Rest #'extra-offset = #(cons -1.3 offset)
       r2*1/4
       \revert Rest #'font-size
       \revert Rest #'staff-position
       #}))


Thanks again for your help,
Gabe


On Sun, Oct 13, 2013 at 1:21 PM, Noeck <address@hidden> wrote:
Sorry, I don't know. Could someone else please help?
How do I override the glyph used for rests? The rest has no glyph property.
There could be smarter ways e.g. using beams or other objects.
I still think there should be something like a\rest but with the longer
bars you need.

Cheers,
Joram

Am 13.10.2013 07:16, schrieb Gabe Moothart:
> Joram,
> Thanks. I noticed that in the feta font there are different rest glyphs:
> (http://www.lilypond.org/doc/v2.17/Documentation/notation/the-feta-font#rest-glyphs)
>
> And I guess lilypond is automatically choosing one for the even staff
> lines (rests.1), and the other for odd lines (rests.1o). Is it maybe
> possible to override the glyph the same way you overrode the other
> properties?
>
> TIA,
> Gabe
>

--
>     The optimal function could be used in this way:
>       a\longbar instead of \longbar -2
>     But I don't know how to do that.
>
>     Cheers,
>     Joram
>
>
>     \version "2.17.26"
>
>
>     longbar = #(define-music-function (parser location pos) (number?)
>       #{
>       \override Rest #'font-size = #4
>       \override Rest #'staff-position = #pos
>       r2*1/4
>       \once \override Rest #'extra-offset = #'(-1.3 . 0)
>       r2*1/4
>       \revert Rest #'font-size
>       \revert Rest #'staff-position
>       #})
>
>
>     %usage (example)
>     {
>       \cadenzaOn
>       r4 \longbar -2 \longbar 2 \longbar 1 r4
>     }


reply via email to

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