1 @c -*- coding: latin-1; mode: texinfo; -*-
3 @node Converting from other formats
4 @chapter Converting from other formats
6 Music can be entered also by importing it from other formats. This
7 chapter documents the tools included in the distribution to do so.
8 There are other tools that produce LilyPond input, for example GUI
9 sequencers and XML converters. Refer to the
10 @uref{http://@/lilypond@/.org,website} for more details.
15 * Invoking midi2ly:: Importing MIDI.
16 * Invoking etf2ly:: Importing Finale.
17 * Invoking abc2ly:: Importing ABC.
18 * Invoking mup2ly:: Importing MUP.
24 @node Invoking midi2ly
25 @section Invoking @command{midi2ly}
29 @command{midi2ly} translates a Type@tie{}1 MIDI file to a LilyPond source
32 MIDI (Music Instrument Digital Interface) is a standard for digital
33 instruments: it specifies cabling, a serial protocol and a file
34 format. The MIDI file format is a de facto standard format for
35 exporting music from other programs, so this capability may come in
36 useful when importing files from a program that has a convertor for a
39 @command{midi2ly} converts tracks into @internalsref{Staff} and
40 channels into @internalsref{Voice} contexts. Relative mode is used
41 for pitches, durations are only written when necessary.
43 It is possible to record a MIDI file using a digital keyboard, and
44 then convert it to @file{.ly}. However, human players are not
45 rhythmically exact enough to make a MIDI to LY conversion trivial.
46 When invoked with quantizing (@code{-s} and @code{-d} options)
47 @command{midi2ly} tries to compensate for these timing errors, but is not
48 very good at this. It is therefore not recommended to use @command{midi2ly}
49 for human-generated midi files.
52 It is invoked from the command-line as follows,
54 midi2ly [@var{option}]@dots{} @var{midi-file}
58 The following options are supported by @command{midi2ly}.
61 @item -a, --absolute-pitches
62 Print absolute pitches.
64 @item -d, --duration-quant=@var{DUR}
65 Quantize note durations on @var{DUR}.
67 @item -e, --explicit-durations
68 Print explicit durations.
71 Show summary of usage.
73 @item -k, --key=@var{acc}[:@var{minor}]
74 Set default key. @math{@var{acc} > 0} sets number of sharps;
75 @math{@var{acc} < 0} sets number of flats. A minor key is indicated by
78 @item -o, --output=@var{file}
79 Write output to @var{file}.
81 @item -s, --start-quant=@var{DUR}
82 Quantize note starts on DUR.
84 @item -t, --allow-tuplet=@var{DUR}*@var{NUM}/@var{DEN}
85 Allow tuplet durations @var{DUR}*@var{NUM}/@var{DEN}.
94 Show warranty and copyright.
96 @item -x, --text-lyrics
97 Treat every text as a lyric.
103 Overlapping notes in an arpeggio will not be correctly rendered. The
104 first note will be read and the others will be ignored. Set them all
105 to a single duration and add phrase markings or pedal indicators.
108 @node Invoking etf2ly
109 @section Invoking @command{etf2ly}
114 @cindex Coda Technology
116 ETF (Enigma Transport Format) is a format used by Coda Music
117 Technology's Finale product. @command{etf2ly} will convert part of an ETF
118 file to a ready-to-use LilyPond file.
120 It is invoked from the command-line as follows.
123 etf2ly [@var{option}]@dots{} @var{etf-file}
126 The following options are supported by @command{etf2ly}:
131 @item -o,--output=FILE
132 set output filename to FILE
140 The list of articulation scripts is incomplete. Empty measures
141 confuse @command{etf2ly}. Sequences of grace notes are ended improperly.
144 @node Invoking abc2ly
145 @section Invoking @code{abc2ly}
149 ABC is a fairly simple ASCII based format. It is described at the ABC site:
152 @uref{http://@/www@/.gre@/.ac@/.uk/@/~c.walshaw/@/abc2mtex/@/abc@/.txt}.
155 @command{abc2ly} translates from ABC to LilyPond. It is invoked as follows:
158 abc2ly [@var{option}]@dots{} @var{abc-file}
161 The following options are supported by @command{abc2ly}:
166 @item -o,--output=@var{file}
167 set output filename to @var{file}.
169 print version information.
172 There is a rudimentary facility for adding LilyPond code to the ABC
173 source file. If you say:
176 %%LY voices \set autoBeaming = ##f
179 This will cause the text following the keyword ``voices'' to be inserted
180 into the current voice of the LilyPond output file.
185 %%LY slyrics more words
188 will cause the text following the ``slyrics'' keyword to be inserted
189 into the current line of lyrics.
194 The ABC standard is not very ``standard''. For extended features
195 (e.g., polyphonic music) different conventions exist.
197 Multiple tunes in one file cannot be converted.
199 ABC synchronizes words and notes at the beginning of a line;
200 @command{abc2ly} does not.
202 @command{abc2ly} ignores the ABC beaming.
205 @node Invoking mup2ly
206 @section Invoking @command{mup2ly}
208 Mup (Music Publisher) is a shareware music notation program by Arkkra
209 Enterprises. @command{mup2ly} will convert part of a Mup file to LilyPond
210 format. It is invoked from the command-line as follows:
212 @cindex Music Publisher
217 mup2ly [@var{option}]@dots{} @var{mup-file}
220 The following options are supported by @command{mup2ly}:
224 show what constructs are not converted, but skipped.
225 @item -D, --define=@var{name}[=@code{exp}]
226 define macro @var{name} with opt expansion @code{exp}
227 @item -E,--pre-process
228 only run the pre-processor
231 @item -o,--output=@var{file}
232 write output to @var{file}
236 print warranty and copyright.
242 Only plain notes (pitches, durations), voices, and staves are
247 @section Other formats
249 LilyPond itself does not come with support for other formats, but
250 there are some external tools that also generate LilyPond files.
256 @uref{http://@/denemo@/.sourceforge@/.net/,Denemo}.
258 @uref{http://@/www@/.nongnu@/.org/@/xml2ly/, xml2ly}, that imports
259 @uref{http://@/www@/.musicxml@/.com/,MusicXML}
261 @uref{http://@/rnvs@/.informatik@/.tu@/-chemnitz@/.de/@/~jan/@/noteedit/@/noteedit@/.html,NoteEdit}
262 which imports MusicXML
264 @uref{http://@/www@/.all@/-day@/-breakfast@/.com/@/rosegarden/,Rosegarden},