Rendering gabc in LilyPond
  • igneusigneus
    Posts: 392
    I was reading this comment and saw that it was right: there is indeed a vast amount of chant transcribed in Gregorio's gabc format and no music typesetting software serious about supporting chant should ignore that.

    Chant notation rendering in LilyPond isn't great, but I decided it was worth providing better support for the gabc input format anyway. For a long time there have been several different utilities capable of converting gabc to LilyPond code, but all of them require runtime environment of some programming language (and often some additional dependencies) - and AFAIK none of them is able to generate code to reproduce the score in LilyPond's square notation. So here comes lilygabc, a new LilyPond library translating and rendering gabc right in LilyPond, no external conversion program needed. It can generate both modern and square notation. Square notation support is still very incomplete, but small improvements are added almost daily.

    I don't expect it to be tremendously useful - almost any other software capable of chant typesetting produces better looking results. But if for one reason or another there are gabc scores to render and it's LilyPond's task to deal with it, lilygabc can help. Otherwise it's just one more toy in the music typesetting toolbox, showcasing LilyPond's extensibility.
  • davido
    Posts: 958
    Wow.
    Looking forward to investigating this!
  • smt
    Posts: 65
    Wow, this is great!
  • Adam WoodAdam Wood
    Posts: 6,482
    WOW
  • igneusigneus
    Posts: 392
    Typesetting hymns with multiple lines of lyrics is one use case where it may be actually useful, as it's something even Gregorio cannot do.

    (The same result can be, of course, achieved with LilyPond alone. lilygabc provides only the possibility of reusing existing gabc or writing the music in a well known concise format instead of LilyPond's standard way of writing square notation, which is rather verbose and not very pleasant to work with.)

    [EDIT a day later: attached file replaced, the original one was mixing pre-Urbanite and Urbanite text of Vexilla Regis]
    hymn.pdf
    245K
  • Adam WoodAdam Wood
    Posts: 6,482
    This is a great idea, but that output is pretty unattractive. Is there a potential (even in theory) way to fix that or is it a limitation of how Lilypond handles square notes?
    Thanked by 1ServiamScores
  • igneusigneus
    Posts: 392
    It depends on what exactly you find unattractive. Are we talking just the pdf example attached above? That one already has quite some aesthetic improvements applied. The default LilyPond output without any additional styling is much worse.
  • Adam WoodAdam Wood
    Posts: 6,482
    yeah - i'm looking at the PDF you posted.

    There's a number of specific things I can point to, but I don't know if they are "the thing" that makes it significantly less attractive than a Gregorio (or traditionally engraved) 4-line score...

    - The notes seem too small
    - the text likewise seems too small
    - the verses are too far apart
    - the spacing between syllables (and notes) seems too large
    - the hanging syllables at the end (nans/a/lum; protulit/sanguine)
    - overall, it looks like every syllable and note/notegroup is in like an invisible Excel grid or something
  • igneusigneus
    Posts: 392
    significantly less attractive than a Gregorio

    it will be always. Square notation in LilyPond is generally lacking in terms of horizontal spacing and lyrics alignment (the example is not representative in this respect, as spacing is heavily affected by accommodating several lines of lyrics). In particular LilyPond cannot align on a vowel like Gregorio does. Syllable left edge / center / right edge is all that is available.
    The music font is also not particularly beautiful.

    - The notes seem too small
    - the text likewise seems too small
    - the verses are too far apart

    Font sizes (both text and music) can be adjusted. Vertical spacing can be adjusted.

    - the spacing between syllables (and notes) seems too large
    - overall, it looks like every syllable and note/notegroup is in like an invisible Excel grid or something

    I'm afraid that with multiple lines of lyrics aligned to the music this is as good as we can get. But there's a chance that LilyPond experts would know better.

    - the hanging syllables at the end (nans/a/lum; protulit/sanguine)

    That's just LilyPond trying to automatically optimize page breaks and vertical spacing. Can be fixed.
    Thanked by 1Adam Wood
  • igneusigneus
    Posts: 392
    Here is a second version of the same document. Not as an attempt to sell it as "attractive", but as a proof that what I said can be changed can in fact be changed. Most of the changes are contained in this commit.
    hymn.pdf
    243K
  • Adam WoodAdam Wood
    Posts: 6,482
    This looks a lot better. Cool.
    Thanks.