| [ << External programs ] | [Top][Contents][Index] | [ Suggestions for writing files >> ] |
[ < Invoking midi2ly ] | [ Up: Converting from other formats ] | [ Invoking abc2ly > ] |
4.3.2 Invoking musicxml2ly
MusicXML is an XML dialect for representing music notation. It is the de-facto standard for interchanging scores between notation programs. However, some of its elements are rather low-level and graphic-oriented, which makes it non-trivial (and sometimes even impossible) to automatically convert them to LilyPond.
The Python script musicxml2ly extracts notes,
articulations, score structure, and lyrics from ‘part-wise’
MusicXML files, writing them to a .ly file. It is run from
the command line as follows.
musicxml2ly [option]… file
Note that by ‘command line’ we mean the command line of the operating system. See Converting from other formats, for more information about this.
By default, musicxml2ly strips off the extension from
file and appends .ly to construct the output file
name. If file is ‘-’, the script reads from
standard input (and writes to standard output) instead.
If the file called file cannot be found, file.xml, file.musicxml, and file.mxl are also tried as input files.
The following options are supported by musicxml2ly.
-a, --absoluteConvert pitches in absolute mode.
--bookPut the top-level score into a
\book { ... }block. This might be useful for further processing withlilypond-book.--cp, --credit-page=nSpecify the page from which LilyPond should take
<credit>data to fill the\headerblock. To suppress the handling of<credit>elements, pass value 0. The default value is 1, i.e., take the data from the first page.--ds, --dynamics-scale=factorScale
<dynamics>elements by a non-negative factor; value 0 means to use LilyPond’s standard size for dynamics. This option might be needed for MusicXML files that use a music font like ‘Maestro’, where the size of dynamics symbols like ‘f’ or ‘p’ differ greatly from LilyPond’s ‘Emmentaler’ glyphs.--fb --fretboardsConvert
<frame>events to a separateFretBoardvoice instead of markups.-h, --helpPrint usage information and a summary of all the available command-line options.
-l, --language=langUse lang for pitch names, e.g.,
deutschfor note names in German. Allowed values are the note input languages supported by LilyPond, see Note names in other languages.--loglevel=log-levelSet the output verbosity to log-level. Possible values are
NONE,ERROR,WARN,PROGRESS(which is the default), andDEBUG.-m, --midiActivate the MIDI block in the output LilyPond file.
--nb, --no-beamingDo not convert beaming information, use LilyPond’s automatic beaming instead.
--nd, --no-articulation-directionsDo not convert directions (‘^’, ‘_’, or ‘-’) for articulations, dynamics, etc.
--npb, --no-page-breaksIgnore page breaks.
--npl, --no-page-layoutDo not convert the exact page layout and breaks. This is a shortcut for options --npb, --npm, and --nsb.
--npm, --no-page-marginsIgnore page margins.
--nrp, --no-rest-positionsDo not convert exact vertical position of rests.
--nsb, --no-system-breaksIgnore system breaks.
--nsd, --no-stem-directionsIgnore stem directions given in the MusicXML file, use LilyPond’s automatic stemming instead.
--nt, --no-taglineDon’t emit a LilyPond tagline (at the bottom of the last page).
-o, --output=fileSet the output file name to file. If file is ‘-’, the output will be printed to standard output.
--oe, --ottavas-end-early=t[rue]/f[alse]Expect
<octave-shift>end elements before the associated<note>(as in the ‘Finale’ notation software) if value is ‘t’ (ortrue). Default is ‘f’ (orfalse).-r, --relativeConvert pitches in relative mode (this option is set by default).
--sm, --shift-duration=valueShift durations and time signatures by value; for example, value -1 doubles all durations, and value 1 halves them.
--sn --string-numbers=t[rue]/f[alse]Control output of string numbers; value ‘f’ (or
false) disables them. Default is ‘t’ (ortrue).--tc, --tab-clef=tab-clef-nameSwitch between two versions of tab clefs. Possible values for tab-clef-name are
tab(the default) andmoderntab.--transpose=to-pitchSet pitch to transpose by the interval between pitch ‘c’ and to-pitch.
-v, --verboseBe verbose.
--versionShow version number and exit.
-z, --compressedInput file is a compressed MusicXML file. By default, this option is active if the input file has .mxl as the extension.
| [ << External programs ] | [Top][Contents][Index] | [ Suggestions for writing files >> ] |
[ < Invoking midi2ly ] | [ Up: Converting from other formats ] | [ Invoking abc2ly > ] |