2.5 Conversions manuelles

En théorie, un programme tel que convert-ly devrait pouvoir traiter n’importe quel changement de syntaxe. En effet, si un programme informatique sait interpréter aussi bien une version que l’autre, un autre programme informatique doit alors être capable de traduire un fichier donné1.

Le projet LilyPond ne dispose cependant que de ressources limitées : les conversions ne sont pas toutes automatisées. Voici une liste de problèmes clairement identifiés :

 Doesn't always convert figured bass correctly, specifically things like {<
>}.  Mats' comment on working around this:
   To be able to run convert-ly
   on it, I first replaced all occurrences of '{<' to some dummy like '{#'
   and similarly I replaced '>}' with '&}'.  After the conversion, I could
   then change back from '{ #' to '{ <' and from '& }' to '> }'.
 Doesn't convert all text markup correctly.  In the old markup syntax,
 it was possible to group a number of markup commands together within
parentheses, e.g.
   -#'((bold italic) "string")
   This will incorrectly be converted into
   -\markup{{\bold italic} "string"}
   instead of the correct
   -\markup{\bold \italic "string"}
 Doesn't handle \partCombine
 Doesn't do \addlyrics => \lyricsto, this breaks some scores with multiple
 \magnify isn't changed to \fontsize.
    - \magnify #m => \fontsize #f, where f = 6ln(m)/ln(2)
 remove-tag isn't changed.
    - \applyMusic #(remove-tag '. . .) => \keepWithTag #'. . .
 first-page-number isn't changed.
    - first-page-number no => print-first-page-number = ##f
 Line breaks in header strings aren't converted.
    - \\\\  as line break in \header strings => \markup \center-align <
      "First Line" "Second Line" >
 Crescendo and decrescendo terminators aren't converted.
    - \rced => \!
    - \rc => \!
 \turnOff (used in \set Staff.VoltaBracket = \turnOff) is not properly
 \markup{ \center-align <{ ... }> } should be converted to:
 \markup{ \center-align {\line { ... }} }
 but now, \line is missing.
 Special LaTeX characters such as $~$ in text are not converted to UTF8.
 \score{} must now begin with a music expression.  Anything else
 (particularly \header{}) must come after the music.

Notes de bas de page

[1] Ceci est réalisable tant que le fichier LilyPond ne contient pas de Scheme. Dès lors qu’un fichier contient du Scheme, des bribes de langage évolué se retrouvent dans le fichier LilyPond, ce qui conduit immanquablement au « problème de l’arrêt » bien connu en informatique.

LilyPond — Utilisation des programmes v2.22.1 (branche stable).