| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Music can be entered also by importing it from other formats. This chapter documents the tools included in the distribution to do so. There are other tools that produce LilyPond input, for example GUI sequencers and XML converters. Refer to the website for more details.
These are separate programs from lilypond itself, and are
run on the command line; see Command-line usage for more
information. If you have MacOS 10.3 or 10.4 and you have trouble
running some of these scripts, e.g. convert-ly, see
(web)MacOS X section ‘MacOS X’ in General Information.
We unfortunately do not have the resources to maintain these programs; please consider them “as-is”. Patches are appreciated, but bug reports will almost certainly not be resolved.
4.3.1 Invoking midi2ly | Importing MIDI. | |
4.3.2 Invoking musicxml2ly | Importing MusicXML. | |
4.3.3 Invoking abc2ly | Importing ABC. | |
4.3.4 Invoking etf2ly | Importing Finale. | |
| 4.3.5 Other formats |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
midi2lymidi2ly translates a Type 1 MIDI file to a LilyPond
source file.
MIDI (Music Instrument Digital Interface) is a standard for digital instruments: it specifies cabling, a serial protocol and a file format. The MIDI file format is a de facto standard format for exporting music from other programs, so this capability may come in useful when importing files from a program that has a converter for a direct format.
midi2ly converts tracks into
(internals)Staff section ‘Staff’ in Internals Reference and
channels into
(internals)Voice section ‘Voice’ in Internals Reference contexts. Relative mode is used
for pitches, durations are only written when necessary.
It is possible to record a MIDI file using a digital keyboard, and
then convert it to ‘.ly’. However, human players are not
rhythmically exact enough to make a MIDI to LY conversion trivial.
When invoked with quantizing (‘-s’ and ‘-d’ options)
midi2ly tries to compensate for these timing errors, but is
not very good at this. It is therefore not recommended to use
midi2ly for human-generated midi files.
It is invoked from the command-line as follows,
midi2ly [option]… midi-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.
The following options are supported by midi2ly.
-a, --absolute-pitchesPrint absolute pitches.
-d, --duration-quant=DURQuantize note durations on DUR.
-e, --explicit-durationsPrint explicit durations.
-h, --helpShow summary of usage.
-k, --key=acc[:minor]Set default key. acc > 0 sets number of sharps;
acc < 0 sets number of flats. A minor key is indicated by
:1.
-o, --output=fileWrite output to file.
-s, --start-quant=DURQuantize note starts on DUR.
-t, --allow-tuplet=DUR*NUM/DENAllow tuplet durations DUR*NUM/DEN.
-v, --verboseBe verbose.
-V, --versionPrint version number.
-w, --warrantyShow warranty and copyright.
-x, --text-lyricsTreat every text as a lyric.
Overlapping notes in an arpeggio will not be correctly rendered. The first note will be read and the others will be ignored. Set them all to a single duration and add phrase markings or pedal indicators.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
musicxml2lyMusicXML is an XML dialect for representing music notation.
musicxml2ly extracts notes, articulations, score structure and
lyrics from ‘part-wise’ MusicXML files then writes them to a
‘.ly’ file. It is run from the command-line as follows;
musicxml2ly [option]… file.xml |
Note that by ‘command-line’, we mean the command line of the operating system. See Converting from other formats, for more information about this.
If ‘-’ is used instead of file.xml, musicxml2ly
reads all input directly from the command line.
The following options are supported by musicxml2ly:
-a, --absoluteconvert pitches in absolute mode.
--fb --fretboardsconverts <frame> events to a separate FretBoard voice instead of
markups.
-h, --helpprint usage and a summary of all the available command line options.
-l, --language=LANGuse LANG for pitch names, e.g. deutsch for note names in
German.
--loglevel=LOGLEVELSets the output verbosity to LOGLEVEL. Possible values are
NONE, ERROR, WARNING, PROGRESS (default) and
DEBUG.
--lxmluse the lxml.etree Python package for XML-parsing; uses less memory and cpu time.
-m, --midiactivate the midi block in the .ly 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.
--nrp, --no-rest-positionsdo not convert exact vertical position of rests.
--nsb, --no-system-breaksignore system breaks.
--npl, --no-page-layoutdo not convert the exact page layout and breaks (shortcut for
--nsb --npb --npm options).
--npb, --no-page-breaksignore page breaks.
--npm, --no-page-marginsignore page margins.
--nsd, --no-stem-directionsignore stem directions from MusicXML, use lilypond’s automatic stemming instead.
-o, --output=FILEset the output filename to FILE. If file is ‘-’, the output will be printed to stdout. If not given, xmlfile.ly will be used instead.
-r, --relativeconvert pitches in relative mode (default).
--transpose=TOPITCHthe interval between pitch c and TOPITCH to transpose by.
--sm, --shift-meter=BEATS/BEATTYPEchange the length|duration of notes as a function of a given time
signature to make the score look faster or slower, (e.g. 4/4 or
2/2).
--tc, --tab-clef=TABCLEFNAMEswitch between two versions of tab clefs (tab and
moderntab).
--sn --string-numbers=t[rue]/f[alse]deactivate string number stencil with --string-numbers
false. Default is true.
-v, --verbosebe verbose.
--versionshow version number and exit.
-z, --compressedinput file is a zip-compressed MusicXML file.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
abc2lyNote: This is not currently supported and may eventually be removed from future versions of LilyPond.
ABC is a fairly simple ASCII based format. It is described at the ABC site:
abc2ly translates from ABC to LilyPond. It is invoked as
follows:
abc2ly [option]… abc-file |
The following options are supported by abc2ly:
-b, --beams=Nonepreserve ABC’s notion of beams
-h, --helpthis help
-o, --output=fileset output filename to file.
-s, --strictbe strict about success
--versionprint version information.
There is a rudimentary facility for adding LilyPond code to the ABC source file. For example;
%%LY voices \set autoBeaming = ##f |
This will cause the text following the keyword ‘voices’ to be inserted into the current voice of the LilyPond output file.
Similarly,
%%LY slyrics more words |
will cause the text following the ‘slyrics’ keyword to be inserted into the current line of lyrics.
The ABC standard is not very ‘standard’. For extended features (e.g., polyphonic music) different conventions exist.
Multiple tunes in one file cannot be converted.
ABC synchronizes words and notes at the beginning of a line;
abc2ly does not.
abc2ly ignores the ABC beaming.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
etf2lyNote: This is not currently supported and may eventually be removed from future versions of LilyPond.
ETF (Enigma Transport Format) is a format used by Coda Music
Technology’s Finale product. etf2ly will convert part of an
ETF file to a ready-to-use LilyPond file.
It is invoked from the command-line as follows;
etf2ly [option]… etf-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.
The following options are supported by etf2ly:
-h, --helpthis help
-o, --output=FILEset output filename to FILE
--versionversion information
The list of articulation scripts is incomplete. Empty measures
confuse etf2ly. Sequences of grace notes are ended
improperly.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
LilyPond itself does not come with support for any other formats, but some external tools can also generate LilyPond files. These are listed in (web)Easier editing section ‘Easier editing’ in General Information.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by gub on July 13, 2020 using texi2html 1.82.
Outros idiomas: català, deutsch, español, français, magyar, italiano, 日本語.
Sobre seleção automática de idioma.