Update GriegE/O46/03-anitrasdance in Mutopia to LilyPond 2.18

De PacoVila
Saltar a: navegación, buscar

I have prepared this page to explain the difficulties I encountered during the update process of a piece of sheet music in Mutopia project, and to justify some of the typpesetting decisions I took.

The task was included in a milestone aimed to free the collection from files in LilyPond versions lower than 1.0. My piece is Anitra's Danz from Grieg's Peer Gynt, for strings, and was typeset (last updated) by Deborah Lowrey in Jan. 2003 (11 years ago).

Problems the piece had

See the references section below to compare the source file to the piece in Mutopia (MV from now on, as in Mutopia Version). Some issues could be caused by the unability of LilyPond to achieve some of the features. Others could have been left that way just to keep it simple. Anyway, here goes a small list of differences between both versions:

  • Instrument names were left-aligned using trailing spaces. Original has instrument names centered.
  • Full bar rests are typeset as normal rests. They should look like centered whole rests.
  • Viola parts are merged in original, but they contain divisi so they are split on two staves in some pages. MV chose to use a staff for each viola.
  • Violin I and Violin II parts share most of the music each, but some elements such as hairpins and text scripts were only in one of the voices, causing the partcombine function to fail in current LilyPond version.
  • Text under the staff, like cresc. and dim. and also poco rit. ... a tempo' are typeset on italics in original. MV did it using simple plain text scripts in roman font.
  • A trill is used in original, whereas four 16th notes replace them in MV.
  • A two-note acciaccatura (starting the main theme) was typeset in MV as two unbeamed 16th's printed before the barline.
  • divisi is placed at the left of the notes whan they have a fermata; printed right over the notes (and the fermata) in MV.
  • arco statements are needed after pizz. ends. MV did not always use them.
  • Some scripts such as cresc. or dim. overlap the barline in MV.
  • Old TeX encoding (not working anymore) was used for «più»
  • Rehearsal letters A, B, C are missing in MV.
  • A curly brace joins both Cello parts in original. I think LilyPond did not support nested staff groups back then.
  • Original has two systems per page in 5 pages. MV has one system per page layout in 13 pages, more than twice!

Updating to current syntax

Include files do not usually have a \version statement, so a version has to be explicitly set for the conversion to work.

In my opinion, every single file of a project (esp. in Mutopia) should have a version statement, otherwise further attempts of updating it will fail again. Strange enough, in-file version did not match exactly the stated version in the info page in Mutopia, but there are no changes in syntax between 1.6.5 and 1.6.9.

The convert-ly tool does a nice job but stops when the old, no longer supported feature 'oldrelative' is found. One has to delete the command and retry the convert. Then, some changes in octave pitches were needed after alternative blocks in repeats.

Some solutions to some problems

Work in progress. Please visit me soon

  • [Instrument names were left-aligned using trailing spaces...] Solution: LilyPond now typesets instrument names centered by default and there is no need to use ugly spaces to hand-align stuff.
  • [Full bar rests are typeset as normal rests...] Solution: Enter them as proper full bar rests R2. Note: this requires changing fermatas on those rests to \fermatamarkup.
  • [Viola parts are merged in original] Solution: none, I left it on two staves but LilyPond allows more complex approaches now. Will do in the future.
  • [Violin I and Violin II parts share most of the music...] Solution: reuse all common music in violin parts using tags, that is what second commit in the pull request is for.

Violin parts were a lot of a headache. Current partcombine implementation demands almost all markings, slurs, accents etc to be the same in both parts, otherwise parts are not combined. This behavior seemed not to be very consistent in my experience, so I ended up almost cloning both parts so that they combined well. Thankfully I eventually decided to split only divisi sections using tags and keep all other common music the same, in a single source code block.

  • [Texts like cresc. and dim. and also poco rit. ... a tempo' are typeset on italics in original.] Solution: All replaced by markup italics except rit. / a tempo
  • [A trill is used in original] Solution: Still four 16th notes replace them. Will change that in the future.
  • [A two-note acciaccatura...] Solution: solved by putting ghost acciaccaturas in other voices.
  • [divisi is placed at the left...] Solution: Nothing. Still that way. Will change that in the future.
  • [arco statements are needed after pizz. ends...] Solution: Nothing. Still that way. Reason: I think the same why MV didn't put some arco markings. Scripts pile up vertically and add too much vertical space. Moving them to the left is not immediately easy. Will do in the future.
  • [cresc. or dim. overlap the barline...] Solution: Whiteout the scripts when needed.
  • [Old TeX encoding for «più»...] Solution: Use UTF-8 for all files.
  • [Rehearsal letters A, B, C...] Solution: Still nothing. Will do in the future.
  • [A curly brace joins both Cello parts in original...] Solution: : We support it now, so Will do in the future.
  • [Original has two systems per page in 5 pages...] Solution: doing nothing special to reduce number of pages, LilyPond now sets the piece automatically in 6 pages at two systems per page. Obviously I have not tried to maintain the previous 13 pages only to respect the original typesetter's layout.

I understand changes are so much heavy that it makes the patches difficult to review. Also I read (too late) that if you are not the original typesetter, well, you have to remember that you are not the original typesetter. I think those very old pieces are an exception because LilyPond syntax is so different now and the piece had some problems to begin with.

I assume the maintainer is now me, but Mutopia takes the maintainer's name from header lines and puts it in tagline as the person who put the piece in the public domain (in my opinion this can be improved). To keep the original typesetter's name visible in the tagline I only added mine in the code, inside a comment.

Keeping the original typesetter's name visible forever encourages contribution of new pieces (this is good). However, it is clear that some credit to the whole list of maintainers or collaborators over time would encourage maintaining of existing pieces (which is also good).

Pull request from master branch?

I neglected working on a new branch from which push my pull request. Instead, I am working completely in master branch for this issue. It could be a problem if I were working on multiple files, but after my patch gets [hopefully] applied I plan to remove my fork and start a fresh one.

This is very problematic if you want to contribute again. You can create a new branch, but it will contain all commits on master, including those which are irrelevant for your new contribution.


Mutopia info page for piece 281

Public pad: Mutopia Update Status

Milestone: Update Mutopia pieces with LilyPond versions < 1.n

Issue 251: Update piece #281 from 1.6.9

Pull request 271

Commit 1: Update GriegE/O46/03-anitrasdance to 2.18

Commit 2: Reuse common music using tags. Also, use cautionary accidentals according to same source.

Source score in IMSLP: File:Grieg - Peer Gynt Suite No.1-3, Op.46-3 (Full Score).pdf (PDF) and in PacoNet: Archivo:Grieg-anitras-dance-source.pdf (PDF)

Original file in Mutopia, LilyPond 1.6.9 Archivo:Anitrasdance-a4.pdf (PDF)

My version in LilyPond 2.18 Archivo:Anitrasdance-final.pdf (PDF)