Subject: xml2ly

From: Jacques Menu <[email-masked]>
Date: Sun, 27 Sep 2020 20:47:48 +0200

Bonjour tutti,

Je suis nouveau sur cette liste, et ne savais pas qu’xml2ly y avait été mentionné. C’est un message de Jean Abou Samra qui m’en a informé tout récemment.

Ce message est très long, j’espère que vous me pardonnerez...

Voici donc ce dont il retourne :
	- la librairie libmusicxml2 a été créée par Dominique Fober de Grame à Lyon, qui en fait la maintenance;
	- pour la compiler, il faut un compilateur C++11 et l’outil cmake;
	- tout est accessible à https://github.com/grame-cncm/libmusicxml;
	- elle est utilisable entre autres sur les 3 systèmes d’exploitation principaux, iOS et Android;
	- elle contient différents exemples d’emploi de la librairie, dont xml2guido, convertisseur de MusicXML en Guido écrit par Dominique;
	- j’y ajoute mon code pour d'autres conversions, d’abord xml2lilypond rebaptisé ensuite xml2ly, puis xml2brl (figé il y a un an vu le manque presque total d’intérêt des gens et organismes a priori intéressés à la musique en braille que j’ai contactés), et plus récemment xml2xml, pour boucler la boucle et valider MSR, la représentation interne de la musique que j’ai créée;
	- l’architecture de la librairie est présentée à https://github.com/grame-cncm/libmusicxml/blob/lilypond/doc/libmusicxmlArchitecture/libmusicxmlArchitecture.pdf.

Les versions directement installables de libmusicxml2 sont créées de temps en temps par Dominique. 
De mon côté, je travaille à une version de développement sur la branche ‘lilypond’, accessible à https://github.com/grame-cncm/libmusicxml/tree/lilypond. On peut la compiler soi-même (cd build; make) pour disposer de la dernière version.

MusicXML : en bref, un mal nécessaire, dont l’importation et l’exportation ne sont de loin pas idéales, voir https://github.com/grame-cncm/libmusicxml/blob/dev/doc/introductionToMusicxml/IntroductionToMusicXML.pdf.

musicxml2ly est écrit en Python, ce qui n’est pas dans la ligne principale de développement de LilyPond, qui utilise C++ et Scheme. Les évolutions sont donc lentes. En outre, il me fallait pour mes besoins un meilleur outil pour adapter des partitions après scan d’originaux de qualité suffisante.

Le développement de xml2ly a donc deux buts :
	- faire au moins aussi bien que musicxml2ly;
	- offrir toutes les options dont on peut avoir besoin pour éviter autant que possible les modifications manuelles du code LilyPond produit.
Le code source C++ est instrumenté par des options de trace très détaillées pour la mise au point.

Les options actuelles dans le mode ‘regular’, introduit tout récemment, figurent ci-dessous. Celles en mode ‘insider’, utilisé depuis le début, sont plus fouillées.
On voit aussi ci-dessous un exemple simple d’emploi de xml2ly.

Il me reste du travail pour finaliser une version 1.0 de xml2ly. N’hésitez pas à me contacter si je peux l'améliorer!

JM

—

menu@macbookprojm: ~ > xml2ly -help
                      Welcome to xml2ly,
              the MusicXML to LilyPond translator
          delivered as part of the libmusicxml2 library.
      https://github.com/grame-cncm/libmusicxml/tree/lilypond

Usage: xml2ly [options] [MusicXMLFile|-] [options]

xml2ly with regular options (-h, -help):

  Option '-h, -help' prints the full help,
    while '-hs, -helpSummary' only prints a help summary.

  Options and help    (-hoah, -help-oah):
  --------------------------
    -insider
          Use the 'insider' view for the options and help,
          in which the options are grouped as they are used by the various
          internal representations and translation passes.
          This unleashes the full set of display and trace options.
    -regular
          Use the 'regular' view for the options and help,
          in which the options are grouped by topics
          such a slurs, tuplets and figured bass.
          This is the default.
    -toah, -trace-oah
          Write a trace of options and help handling to standard error.
          This option should best appear early.
    -hou, -help-options-usage
          Print options usage help.
    -onh, -option-name-help[=OPTION_NAME]
          Print help about OPTION_NAME.
          OPTION_NAME is optional, and the default value is 'onh'.
    -dov, -display-options-values
          Write the chosen options values to standard error.
          This option is best placed early in the command line
    -soaa, -show-options-and-arguments
          Print the options and arguments to xml2ly.
  
  Informations    (-hinfos, -help-informations):
  --------------------------
    -v, -version
          Display xml2ly's version number and history.
    -a, -about
          Display information about xml2ly.
    -c, -contact
          Display information about how to contacct xml2ly maintainers.
    -cpu, -display-cpu-usage
          Write information about CPU usage to standard error.
  
  Warning and errors    (-hwae, -help-warning-and-errors):
  --------------------------
    -q, -quiet
          Don't issue any warning or error messages.
    -dse, -dont-show-errors
          Don't show errors in the log.
    -deoe, -dont-exit-on-errors
          Do not exit execution on errors and go ahead.
          This may be useful when debugging xml2ly.
  
  Files    (-hfiles, -help-files):
  --------------------------
    -o, -output-file-name FILENAME
          Write LilyPond code to file FILENAME instead of standard output.
    -aofn, -auto-output-file-name
          This option can only be used when reading from a file.
          Write LilyPond code to a file in the current working directory.
          The file name is derived from that of the input file,
          replacing any suffix after the the '.' by 'ly'
          or adding '.ly' if none is present.
  
  Input    (-hinput, -help-input):
  --------------------------
    -owords, -omit-words
          Omit '<word/>' in MusicXML data.
    -ds, -dal-segno STRING
          Convert words elements STRING to a 'dal segno'.
    -cubase
          Useful settings for MusicXML data exported from Cubase.
          This combined option is equivalent to:
            -irclefs, -ignore-redundant-clefs
            -irkeys, -ignore-redundant-keys
            -irtimes, -ignore-redundant-times
    -cttrm, -convert-tempos-to-rehearsal-marks
          Convert tempos to rehearsal marks.
          This may come in handy when MusicXML data has been obtained
          from scanned instrumental music images.
    -cwtt, -convert-words-to-tempo
          Convert words to tempo.
          This may come in handy when MusicXML data has been obtained
          from scanned instrumental music images.
    -cwtrm, -convert-words-to-rehearsal-marks
          Convert words to rehearsal marks.
          This may come in handy when MusicXML data has been obtained
          from scanned instrumental music images.
  
  Parts    (-hparts, -help-parts):
  --------------------------
    -mopi, -msr-omit-part-id PART_ID
          Omit part with ID PART_ID.
          There can be several occurrences of this option.
          All the parts not omitted are kept.
          This option is incompatible with '-mkpi, -msr-keep-part-id'.
    -mopn, -msr-omit-part-name PART_NAME
          Omit part named PART_NAME.
          There can be several occurrences of this option.
          All the parts not omitted are kept.
          This option is incompatible with '-mkpn, -msr-keep-part-name'.
    -mkpi, -msr-keep-part-id PART_ID
          Keep part with ID PART_ID.
          There can be several occurrences of this option.
          All the parts not kept are omitted.
          This option is incompatible with '-mopi, -msr-omit-part-id'.
    -mkpn, -msr-keep-part-name PART_NAME
          Keep part named PART_NAME.
          There can be several occurrences of this option.
          All the parts not kept are omitted.
          This option is incompatible with '-mopn, -msr-omit-part-name'.
    -mrp, -msr-rename-part PART_RENAME_SPEC
          Rename part ORIGINAL_NAME to NEW_NAME, for example after displaying
          the names in the score or a summary of the latter in a first run with options
          '-dmnames, -display-msr-names' or 'dmsum, -display-msr-summary'.
          PART_RENAME_SPEC can be:
          'ORIGINAL_NAME = NEW_NAME'
          or
          "ORIGINAL_NAME = NEW_NAME"
          The single or double quotes are used to allow spaces in the names
          and around the '=' sign, otherwise they can be dispensed with.
          Using double quotes allows for shell variables substitutions, as in:
          DESSUS="Cor anglais"
          xml2ly -msr-rename-part "P1 = ${DESSUS}" .
          There can be several occurrences of this option.
  
  Staves    (-hstaves, -help-staves):
  --------------------------
    -cvsrvn, -create-voices-staff-relative-numbers
          Generate voices names with numbers relative to their staff.
          By default, the voice numbers found are used,
          which may be global to the score.
  
  Voices    (-hvoices, -help-voices):
  --------------------------
    -cslsar, -create-single-line-staves-as-rythmic
          Create staves with a single line as rythmic staves.
          By default, drum staves are created in this case.
    -conarp, -connect-arpeggios
          Connect arpeggios across piano staves.
  
  Transpositions    (-hetransp, -help-transpositions):
  --------------------------
  
  Clefs    (-hclefs, -help-clefs):
  --------------------------
    -mrc, -msr-replace-clef REPLACE_CLEF_SPEC
          Raplace clef ORIGINAL_CLEF by NEW_CLEF.
          REPLACE_CLEF_SPEC can be:
          'ORIGINAL_CLEF = NEW_CLEF'
          or
          "ORIGINAL_CLEF = NEW_CLEF"
          The single or double quotes are used to allow spaces in the clef names
          and around the '=' sign, otherwise they can be dispensed with.
          The 23 clefs available are:
          treble, soprano, mezzosoprano, alto, tenor, baritone, bass, 
          treble1, treble-15, treble-8, treble+8, treble+15, bass-15, bass-8, 
          bass+8, bass+15, varbaritone, tab4, tab5, tab6, tab7, percussion and 
          jianpu.
          There can be several occurrences of this option.
    -ccc, -comment-clef-changes
          Comment clef changes in the LilyPond code.
          They won't show up in the score, but the information is not lost.
  
  Keys    (-hkeys, -help-keys):
  --------------------------
  
  Times    (-htimes, -help-times):
  --------------------------
    -numt, -numerical-time
          Generate numerical time signatures, such as '4/4' instead of 'C'.
  
  Repeats    (-hreps, -help-repeats):
  --------------------------
    -ciirb, -create-implicit-initial-repeat-barline
          Create an implicit repeat barline at the beginning of the stave
          in case there is none, as is usual in scores.
          By default, no such barline is added.
    -krbls, -keep-repeat-barlines
          Generate repeats start and and bar lines even though LilyPond would take care of them.
    -rbracks, -repeat-brackets
          Generate repeats with brackets instead of regular bar lines.
    -irn, -ignore-repeat-numbers
          Ignore repeats numbers and let LilyPond determine them.
  
  Measures    (-hmeas, -help-measures):
  --------------------------
    -aem, -add-empty-measures SPECIFICATION
          Add empty mesure according to SPECIFICATION.
          SPECIFICATION should be of the form 'MEASURE_NUMBER MEASURES_TO_ADD',
          where MEASURE_NUMBER is a string, and MEASURES_TO_ADD is the number
          of empty measures to add after measure MEASURE_NUMBER.
          MEASURE_NUMBER should be the number of an existing, empty measure,
          and MEASURES_TO_ADD should be at least 1, , such as '17 3'.
          This comes in handly when MusicXML data obtained by scanning contains
          a single empty measure when there were several in the original score.
          This option can be used any number of times.
    -rem, -replicate-empty-measure SPECIFICATION
          Replicate an empty mesure, adding empty others according to SPECIFICATION.
          SPECIFICATION should be of the form 'MEASURE_NUMBER REPLICATES',
          where MEASURE_NUMBER is a string, and REPLICATES is the number
          of empty measures to add after measure MEASURE_NUMBER.
          MEASURE_NUMBER should be the number of an existing, empty measure,
          and REPLICATES should be at least 1, , such as '17 3'.
          This comes in handly when MusicXML data obtained by scanning contains
          a single empty measure when there were several in the original score.
          This option can be used any number of times.
  
  Rests    (-hrests, -help-rests):
  --------------------------
    -drslashes, -delay-rests-slashes
          '<slash/>' in MusicXML
    -cfmr, -compress-full-measure-rests
          Compress full measure rests instead of generating successive empty measures.
    -mr, -merge-rests
          Merge rests to obtain better looking scores.
          This works only when there are 2 voices per staves.
          Limitations: this only handles two voices
          and does not handle multi-measure/whole-measure rests.
  
  Notes    (-hnotes, -help-notes):
  --------------------------
    -mplang, -msr-pitches-language LANGUAGE
          Use LANGUAGE to display note pitches in the MSR logs and text views.
          The 12 MSR pitches languages available are:
          catalan, deutsch, english, espanol, francais, italiano, 
          nederlands, norsk, portugues, suomi, svenska and vlaams.
          The default is 'nederlands'.
    -abs, -absolute
          Use absolute octave entry in the generated LilyPond code.
    -rel, -relative PITCH_AND_OCTAVE
          Use relative octave entry reference PITCH_AND_OCTAVE in the generated LilyPond code.
          PITCH_AND_OCTAVE is made of a diatonic pitch and
          an optional sequence of commas or single quotes.
          It should be placed between double quotes if it contains single quotes, such as:
            -rel "c''".
          The default is to use LilyPond's implicit reference 'f'.
    -fixed PITCH_AND_OCTAVE
          Use fixed octave entry reference PITCH_AND_OCTAVE in the generated LilyPond code.
          PITCH_AND_OCTAVE is made of a diatonic pitch and
          an optional sequence of commas or single quotes.
          It should be placed between double quotes if it contains single quotes, such as:
            -fixed "c''"
    -as, -accidental-style STYLE
          The 18 LilyPond accidental styles available are:
          default, dodecaphonic, dodecaphonic-first, 
          dodecaphonic-no-repeat, forget, modern, modern-cautionary, modern-voice, 
          modern-voice-cautionary, neo-modern, neo-modern-cautionary, neo-modern-voice, 
          neo-modern-voice-cautionary, no-reset, piano, piano-cautionary, teaching and voice.
          The default is 'default'.
    -wnh, -white-note-heads
          Generate Scheme function 'whiteNoteHeads'
          at the beginning of the LilyPond code.
  
  Beams    (-hbeams, -help-beams):
  --------------------------
    -noab, -no-auto-beaming
          Generate '\set Staff.autoBeaming = ##f' in each voice
          to prevent LilyPond from handling beams automatically.
    -nbeams, -no-beams
          Don't generate beams in the LilyPond code.
          This is handy when the MusicXML data contains beam in vocal voices
  
  Articulations    (-harts, -help-articulations):
  --------------------------
    -oarts, -omit-articulations
          Omit articulations in MusicXML data.
  
  Ornaments    (-horns, -help-ornaments):
  --------------------------
    -oorns, -omit-ornaments
          Omit ornaments in MusicXML data.
    -dof, -delayed-ornaments-fraction NUM/DENOM
          Place the delayed turn/reverseturn at the given fraction
          between the ornemented note and the next one.
          The default is '1/2'.
  
  Grace notes    (-hgraces, -help-grace-notes):
  --------------------------
    -slashagn, -slash-all-grace-notes
          Add a slash to all grace notes
    -sluragn, -slur-all-grace-notes
          Add a slur to all grace notes
    -beamagn, -beam-all-grace-notes
          Add a beam to all grace notes
  
  Chords    (-hchords, -help-chords):
  --------------------------
    -lppl, -lpsr-pitches-language LANGUAGE
          Use LANGUAGE to display note pitches in the LPSR logs and views,
          as well as in the generated LilyPond code.
          The 12 LPSR pitches languages available are:
          catalan, deutsch, english, espanol, francais, italiano, 
          nederlands, norsk, portugues, suomi, svenska and vlaams.
          The default is 'nederlands'.
    -lpcl, -lpsr-chords-language LANGUAGE
          Use LANGUAGE to display chord names, their root and bass notes,
          in the LPSR logs and views and the generated LilyPond code.
          The 5 LPSR chords pitches languages available are:
          french, german, ignatzek, italian, semiGerman, .
          'ignatzek' is Ignatzek's jazz-like, english naming used by LilyPond by default.
          The default is 'ignatzek'.
    -chd, -chords-display SPECIFICATION
          Use SPECIFICATION to display chords using LilyPond's chordNameExceptions.
          SPECIFICATION should contain a chord contents such as '<c ees ges bes>',
          followed by code to display it, for example:
            '<c ees ges bes> \\super {"-7(" {\\small\\raise #0.5 \\flat} "5)"}'.
          The LilyPond code has to escape backslashes, thus use '\\' to obtain '\'.
          These two elements are passed over to LilyPond verbatim, without any check.
          This option can be used any number of times.
  
  Ties    (-hties, -help-ties):
  --------------------------
    -oties, -omit-ties
          Omit ties in MusicXML data
  
  Slurs    (-hslurs, -help-slurs):
  --------------------------
    -oslurs, -omit-slurs
          Omit slurs in MusicXML data.
  
  Ligatures    (-hligs, -help-ligatures):
  --------------------------
  
  Dynamics    (-hdyns, -help-dynamics):
  --------------------------
    -odyns, -omit-dynamics
          Omit dynamics in MusicXML data
    -adb, -all-dynamics-below
          Ignore dynamics placement and set it to 'below'.
  
  Wedges    (-hweds, -help-wedges):
  --------------------------
    -owedges, -omit-wedges
          Omit '<wedge/>' in MusicXML data.
    -awb, -all-wedges-below
          Ignore wedges placement and set it to 'below'.
  
  Tuplets    (-htups, -help-tuplets):
  --------------------------
    -itups, -indent-tuplets
          Indent tuplets notes on a line of their own,
          instead of keeping the on one and the same line.
  
  Lyrics    (-hlyrics, -help-lyrics):
  --------------------------
    -olyrics, -omit-lyrics
          Omit lyrics in MusicXML data.
    -awftl, -add-words-from-the-lyrics
          Add words with the lyrics contents, keeping the latter untouched.
          This may come in handy when MusicXML data has been obtained from scanned images.
    -asn, -add-stanzas-numbers-to-lyrics
          Add stanzas numbers to lyrics.
    -ld, -lyrics-durations STYLE
          The 2 LilyPond lyrics durations STYLEs available are:
          explicit, implicit, .
          Using 'implicit' prevents the creation of lyrics attached to rests by LilyPond,
          use 'explicit' in such cases.
          The default is 'lyricsDurationsExplicit'.
    -nolpl, -no-lilypond-lyrics
          Don't generate any lyrics in the LilyPond code.
  
  Strings    (-hstrings):
  --------------------------
    -rsn, -roman-string-numbers
          Generate '\romanStringNumbers' in each voice
          for LilyPond to generate roman instead of arabic string numbers.
    -aos, -avoid-open-strings
          Generate '\set TabStaff.restrainOpenStrings = ##t' in each voice
          to prevent LilyPond from using open strings.
  
  Tablatures    (-htabs, -help-tablatures):
  --------------------------
    -mtab, -modernTab
          Generate '\moderntab' instead of the default '\tab'.
    -tfn, -tabFullNotation
          Generate '\tabFullNotation' to obtain more complete tab notation,
          including note stems.
  
  Harmonies    (-hharms, -help-harmonies):
  --------------------------
    -oharms, -omit-harmonies
          Omit harmonies in MusicXML data.
    -shv, -show-harmony-voices
          Show the parts harmony voices in the MSR data
          even though it does not contain music.
  
  Figured basses    (-hfigbass, -help-figured-basses):
  --------------------------
    -ofigbasses, -omit-figured-basses
          Omit figured basses in MusicXML data.
    -sfbv, -show-figured-bass-voices
          Show the figured bass harmony voices in the MSR data
          even though they do not contain music.
  
  Header    (-hheader, -help-header):
  --------------------------
    -ufawt, -use-filename-as-work-title
          Use the file name as work title if there is none in the MusicXML data.
          Standard input (-) becomes 'Standard input' in that case.
    -ulap, -use-lyricists-as-poets
          Set the 'poet' to the value of 'lyricist' in the LilyPond code \header.
          This is useful because LilyPond doesn't feature a 'lyricist' variable.
  
  Paper    (-hpaper, -help-paper):
  --------------------------
    -paper-height HEIGHT
          Set the LilyPond 'paper-height' paper variable to HEIGHT in the LilyPond code.
          HEIGHT should be a positive floating point or integer number,
          immediately followed by a unit name, i.e. 'in', 'mm' or 'cm'.
          By default, LilyPond uses 297 mm (A4 format).
    -paper-width WIDTH
          Set the LilyPond 'paper-width' paper variable to WIDTH in the LilyPond code.
          WIDTH should be a positive floating point or integer number,
          immediately followed by a unit name, i.e. 'in', 'mm' or 'cm'.
          By default, LilyPond uses 210 mm (A4 format).
    -hshift, -horizontal-shift SHIFT
          Set the LilyPond 'horizontal-shift' paper variable to SHIFT in the LilyPond code.
          SHIFT should be a floating point or integer number,
          immediately followed by a unit name, i.e. 'in', 'mm' or 'cm'.
          The default value is 0.0 mm.
    -indent INDENT
          Set the LilyPond 'indent' paper variable to INDENT in the LilyPond code.
          INDENT should be a floating point or integer number,
          immediately followed by a unit name, i.e. 'in', 'mm' or 'cm'.
          The default value is 0.0 mm.
    -short-indent SHORT_INDENT
          Set the LilyPond 'short-indent' paper variable to SHORT_INDENT in the LilyPond code.
          SHORT_INDENT should be a floating point or integer number,
          immediately followed by a unit name, i.e. 'in', 'mm' or 'cm'.
          The default value is 0.0 mm.
    -ragged-bottom
          Set the LilyPond 'ragged-bottom' paper variable to '##f' in the LilyPond code.
          LilyPond's default value is '##t'.
    -ragged-last
          Set the LilyPond 'ragged-last' paper variable to '##f' in the LilyPond code.
          LilyPond's default value is '##t'.
    -ragged-last-bottom
          Set the LilyPond 'ragged-last-bottom' paper variable to '##f' in the LilyPond code.
          LilyPond's default value is '##t'.
    -ragged-right
          Set the LilyPond 'ragged-right' paper variable to '##f' in the LilyPond code.
          LilyPond's default value is '##t'.
    -page-count PAGE_COUNT
          Set the LilyPond 'page-count' paper variable to PAGE_COUNT in the LilyPond code.
          PAGE_COUNT should be a positive integer.
          By default, this is left to LilyPond'.
    -system-count SYSTEM_COUNT
          Set the LilyPond 'system-count' paper variable to SYSTEM_COUNT in the LilyPond code.
          SYSTEM_COUNT should be a positive integer.
          By default, this is left to LilyPond'.
  
  Layout    (-hlayout, -help-layout):
  --------------------------
    -gss, -global-staff-size FLOAT
          Set the LilyPond '#(set-global-staff-size ...)' to FLOAT in the LilyPond code.
          FLOAT should be a floating point or integer number.
          The default is '20.000000'.
    -kss, -keep-staff-size
          Use the staff size value found in the MusicXML data.
  
  Ouptut    (-houptut, -help-ouptut):
  --------------------------
    -m2lpsok, -msr2lpsr-score-output-kind OUTPUT_KIND
          Use OUTPUT_KIND to create the LPSR blocks,
          as well as in the generated LilyPond code.
          The 7 LilyPond score output kinds available are:
            parts-and-score, parts-and-score-one-file, parts-only, 
          parts-only-one-file, score-and-parts, score-and-parts-one-file and score-only.
          '-one-file' means that LilyPond will produce a single file
          containing all the scores and/or parts.
          Otherwise, one file will be generated for each score and/or part.
          The default is 'score-only'.
    -lpv, -lilypond-version STRING
          Set the LilyPond '\version' to STRING in the LilyPond code.
          The default is '2.19.83'.
    -length-unit UNIT
          Set the LilyPond length variables unit to UNIT in the forthcoming options.
          The 3 LilyPond length variables units available are:
          cm, in and mm.
          This option should precede options that set paper size and indents
          if they don't specify a unit.
          The default is 'mm'.
    -ambitus
          Generate an ambitus range at the beginning of the staves/voices.
    -custos
          Generate custos at the end of the lines.
    -alldurs, -all-durations
          Generate all LilyPond durations.
          By default, a duration equal to preceding one found in the current voice
          is omitted for code conciseness.
    -iln, -input-line-numbers
          Generate after each note and barline a comment containing
          its MusicXML input line number.
          This is useful when debugging xml2ly.
    -omn, -original-measure-numbers
          Generate after each end of measure a comment containing
          its original MusicXML measure number.
          This is useful for adding line breaks and page breaks, and when debugging xml2ly.
    -pim, -positions-in-measures
          Generate after each note and barline a comment containing
          its position in the measure.
          This is useful when debugging xml2ly.
    -abn, -all-bar-numbers
          Generate LilyPond code to show all bar numbers.
    -amn, -all-measure-numbers
          Generate LilyPond code to show all measure numbers.
          This option is a synonym to '-abn, -all-bar-numbers'.
    -rmn, -reset-measure-number RESET_NUMBER_SPEC
          Generate a '\set Score.currentBarNumber = #NEW' command
          at the beginning of measure OLD in the LilyPond code.
          RESET_NUMBER_SPEC can be:
          'OLD = NEW'
          or
          "OLD = NEW" .
          OLD is the MusicXML original measure number (a string),
          that can be generated in the LilyPond code in '| % ...' comments
          with option '-omn, -original-measure-numbers'.
          NEW is a LilyPond (integer) measure number.
          This comes in handy when scanning several movements from a single PDF score,
          in which case measure numbers are a single sequence.
          There can be several occurrences of this option.
    -gbabn, -generate-box-around-bar-number BAR_NUMBER
          Generate a box around LilyPond purist bar number BAR_NUMBER,
          where BAR_NUMBER is an integer.
          This implies that bar numbers are centered on the bars.
          There can be several occurrences of this option.
    -imlb, -ignore-musicxml-line-breaks
          Ignore the line breaks from the MusicXML input - let LilyPond decide about them.
    -blairm, -break-lines-at-incomplete-right-measures
          Generate a '\break' command at the end of incomplete right measures
          which is handy in popular folk dances and tunes.
    -slenm, -separator-line-every-n-measures N
          Generate an additional separator line for readability every N measures,
          where N is a positive integer.
          Nothing special is done by default.
    -impb, -ignore-musixcml-page-breaks
          Ignore the page breaks from the MusicXML input - let LilyPond decide about them.
    -llc, -ledger-lines-color RGB_COLOR
          Use RGB_COLOR for the ledger lines.
          RGB_COLOR should be of the form 'r,g,b',
          with r, g and b being float numbers between 0.0 and 1.0 inclusive.
    -jazz, -jazz-fonts
          Use the LilyJazz font for notes, braces, text and chords.
          It can be downloaded from https://github.com/OpenLilyPondFonts/lilyjazz.
          This font should be installed so that LilyPond can use it, see:
          https://github.com/OpenLilyPondFonts/lilyjazz/blob/master/LilyPond-Fonts-Installation-And-Usage.txt.
    -xi, -xml2ly-infos
          Generate initial comments showing the compilation date.
    -lpcom, -lilypond-comments
          Generate comments showing the structure of the score
          such as '% part P_POne (P1).
    -global
          Generate a 'global' empty variable and place a use of it
          at the beginning of all voices.
    -nolpc, -no-lilypond-code
          Don't generate any LilyPond code.
          That can be useful if only a summary of the score is needed.
    -lpcd, -lilypond-compile-date
          Generate code to include the compilation date
          when LilyPond creates the score.
    -draft, -draft-mode
          Generate a difficult to use score
          to get only an overview in the resulting PDF file.
    -paco, -point-and-clic-off
          Generate \pointAndClickOff at the beginning of the LilyPond code
          to reduce the size of the resulting PDF file.
    -jianpu
          Generate the score using jianpu (numbered) notation
          instead of the default western notation.
          That option needs lilypond-Jianpu to be accessible to LilyPond
          (https://github.com/nybbs2003/lilypond-Jianpu/jianpu10a.ly).
  
  MIDI    (-hmidi, -help-midi):
  --------------------------
    -midtempo, -midi-tempo MIDI_TEMPO_SPEC
          Generate a '\tempo' command in the \midi block.
          MIDI_TEMPO_SPEC can be:
          'DURATION = PER_SECOND'
          or
          "DURATION = PER_SECOND" .
          DURATION is a string such as '8.', and PER_SECOND is an integer.
          The single or double quotes are used to allow spaces around the '=' sign,
          otherwise they can be dispensed with.
          Using double quotes allows for shell variables substitutions, as in:
          PER_SECOND=66
          xml2ly -midiTempo "8. ${PER_SECOND}" .
          The default is '4 = 90'.
    -no-midi
          Generate the '\midi' block as a comment instead of active code.

—

Le fichier converti ci-dessous est https://github.com/grame-cncm/libmusicxml/blob/lilypond/files/musicxml/basic/HelloWorld.xml :

menu@macbookprojm: ~/libmusicxml-git/files/musicxml > xml2ly basic/HelloWorld.xml -global-staff-size 30 -trace-passes -cpu
xml2ly: inputSourceName = "basic/HelloWorld.xml", outputFileName = ""
%--------------------------------------------------------------
This is xml2ly 0.93 from libmusicxml2 v3.20
Launching conversion of "basic/HelloWorld.xml" to LilyPond
Time is Saturday 2020-09-26 @ 18:54:01 CEST
LilyPond code will be written to standard output

The command line is:
  xml2ly basic/HelloWorld.xml -gss 30 -tpasses -cpu
or:
  xml2ly basic/HelloWorld.xml -global-staff-size 30 -trace-passes -display-cpu-usage
  
The command line options and arguments have been analyzed
convertMusicXMLToMxmlTree(): inputSourceName: "basic/HelloWorld.xml", passNumber: "Pass 1"
%--------------------------------------------------------------

%--------------------------------------------------------------
  Pass 1: building the xmlelement tree from "basic/HelloWorld.xml"
%--------------------------------------------------------------

% MusicXML data uses "UTF-8" encoding

%--------------------------------------------------------------
  Pass 2a: translating the mxmlElement tree into an MSR skeleton
%--------------------------------------------------------------

%--------------------------------------------------------------
  Pass 2b: translating the mxmlElement tree into a MSR
%--------------------------------------------------------------

<!--=== part "P1", line 15 ===-->
  
  <!--=== measure '1', line 17 ===-->

%--------------------------------------------------------------
  Pass 3: translating the MSR into a LPSR
%--------------------------------------------------------------

LilyPond code will be written to standard output

%--------------------------------------------------------------
  Pass 4: writing the LPSR as LilyPond code
%--------------------------------------------------------------
\version "2.19.83"

% Comment or adapt next line as needed (default is 20)
#(set-global-staff-size 30.000000)

\header {
  title              = "Hello World!"
}

\paper {
  paper-height                   = 297.0\mm
  paper-width                    = 210.0\mm

}

\layout {
  \context {
    \Score
    autoBeaming = ##f % to display tuplets brackets
  }
  \context {
    \Voice
  }
}

% Pick your choice from the next two lines as needed
myBreak = { \break }
%myBreak = { }

% Pick your choice from the next two lines as needed
myPageBreak = { \pageBreak }
%myPageBreak = { }

Part_POne_Staff_One_Voice_One = \absolute {
  \language "nederlands"
  \key c \major
  \numericTimeSignature \time 4/4
  
  \clef "treble"
  c'1 | % 2
  \barNumberCheck #2
}

\book {
  \header {
  }
  
  \score {
    <<
      
      \new Staff = "Part_POne_Staff_One"
      \with {
      }
      <<
        \context Voice = "Part_POne_Staff_One_Voice_One" <<
          \Part_POne_Staff_One_Voice_One

    \layout {
      \context {
        \Score
        autoBeaming = ##f % to display tuplets brackets
      }
      \context {
        \Voice
      }
    }
    
    \midi {
      \tempo 4 = 90
    }
  }
  
}

Timing information:

Activity  Description                                         Kind       CPU (sec)
--------  --------------------------------------------------  ---------  ---------

Pass 1    build xmlelement tree from file                     mandatory    0.00236
Pass 2a   build the MSR skeleton                              mandatory    0.00037
Pass 2b   build the MSR                                       mandatory    0.00061
Pass 3    translate MSR to LPSR                               mandatory    0.00038
Pass 4    translate LPSR to LilyPond                          mandatory    0.00049

    Total  Mandatory   Optional
---------  ---------  ---------
  0.00420    0.00420    0.00000