4 @chapter Converting to LilyPond format.
20 @cindex importing MIDI
22 Midi2ly translates a MIDI input file to a LilyPond source file. MIDI
23 (Music Instrument Digital Interface) is a standard for digital
24 instruments: it specifies cabling, a serial protocol and a file format.
26 The MIDI file format is a de facto standard format for exporting music
27 from other programs, so this capability may come in useful when you want
28 to import files from a program that has no converter for its native
31 It is possible to record a MIDI file using a digital keyboard, and then
32 convert it to @file{.ly}. However, human players are not rhythmically
33 exact enough to make a MIDI to LY conversion trivial. midi2ly tries to
34 compensate for these timing errors, but is not very good at this. It is
35 therefore not recommended to use midi2ly for human-generated midi
36 files. Correcting the quantization mistakes of the human player takes a
39 Hackers who know about signal processing are invited to write a more
40 robust midi2ly. midi2ly is written in Python, using a module written in
41 C to parse the MIDI files.
44 @subsection Invoking midi2ly
47 midi2ly [@var{OPTION}]@dots{} @var{MIDI-FILE}
50 @unnumberedsubsec Options
53 @item -b, --no-quantify,
54 Write exact durations, e.g.: `a4*385/384'.
56 Print lots of debugging stuff.
58 Show a summary of usage.
59 @item -I, --include=@file{DIR},
60 Add DIR to search path.
61 @item -k, --key=ACC[:MINOR],
62 Set default key. ACC > 0 sets number of sharps; ACC < 0 sets number
63 of flats. A minor key is indicated by ":1".
65 Assume no plets or double dots, assume smallest (reciprocal) duration 16.
66 @item -o, --output=@file{FILE},
67 Set @file{FILE} as default output.
72 @item -s, --smallest=N,
73 Assume no shorter (reciprocal) durations than N.
77 Show the warranty with which midi2ly comes. (It comes with @strong{NO WARRANTY}!)
78 @item -x, --no-double-dots,
79 Assume no double dotted notes.
89 @cindex Coda Technology
91 ETF (Enigma Transport Format) is a format used by Coda Music
92 Technology's Finale product. This program will convert part of an ETF
93 file to a ready-to-use LilyPond file.
95 @subsection Invoking etf2ly
99 etf2ly [@var{OPTION}]@dots{} @var{ETF-FILE}
102 Convert ETF to LilyPond.
104 @unnumberedsubsec Options
108 @item -o,--output=FILE
109 set output filename to FILE
117 The list of articulation scripts is incomplete. Empty measures confuse
124 ABC is a fairly simple ASCII based format. It is described at
125 @uref{http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt}.
128 @cindex Importing ABC
130 @subsection Invoking abc2ly
133 abc2ly [@var{OPTION}]@dots{} @var{ABC-FILE}
136 Convert ABC to LilyPond.
138 There is a rudimentary facility for adding lilypond code to the ABC
139 source file. If you say:
142 %%LY voices \property Voice.noAutoBeaming=##t
145 This will cause the text following the keyword ``voices'' to be inserted
146 into the current voice of the lilypond output file.
151 %%LY slyrics more words
154 will cause the text following the ``slyrics'' keyword to be inserted
155 into the current line of lyrics.
157 @unnumberedsubsec Options
161 @item -o,--output=FILE
162 set output filename to FILE
169 The ABC standard is not very "standard". For extended features
170 (eg. polyphonic music) different conventions exist.
172 Multiple tunes in one file cannot be converted.
174 ABC synchronizes words and notes at the beginning of a line; abc2ly does
177 abc2ly ignores the ABC beaming.
182 PMX is a MusiXTeX preprocessor written by Don Simons, see
183 @uref{http://icking-music-archive.sunsite.dk/Misc/Music/musixtex/software/pmx/}.
189 @subsection Invoking pmx2ly
192 pmx2ly [@var{OPTION}]@dots{} @var{PMX-FILE}
195 Convert PMX to LilyPond.
197 @unnumberedsubsec Options
202 @item -o,--output=FILE
203 set output filename to FILE
215 Musedata (@uref{http://www.musedata.org/}) is an electronic library of
216 classical music scores, currently comprising about 800 composition
217 dating from 1700 to 1825. The music is encoded in so-called Musedata
219 (@uref{http://www.ccarh.org/publications/books/beyondmidi/online/musedata}).
220 musedata2ly converts a set of musedata files to one .ly file, and will
221 include a @code{\header} field if a @file{.ref} file is supplied
223 @subsection Invoking musedata2ly
226 musedata2ly [@var{OPTION}]@dots{} @var{MUSEDATA-FILE}
229 Convert Musedata to LilyPond.
231 @unnumberedsubsec Options
236 @item -o,--output=@var{file}
237 set output filename to @var{file}
240 @item -r,--ref=@var{reffile}
241 read background information from ref-file
249 MUP (Music Publisher) is a shareware music notation program by Arkkra
250 Enterprises. It is also the name of the input format. Mup2ly will
251 convert part of a Mup file to a ready-to-use LilyPond file.
256 @subsection Invoking mup2ly
259 mup2ly [@var{OPTION}]@dots{} @var{MUP-FILE}
262 Convert Mup to LilyPond.
264 @unnumberedsubsec Options
268 show what constructs are not converted, but skipped.
269 @item D, --define=@var{NAME}[=@code{EXP}]
270 define macro @var{NAME} with opt expansion @code{EXP}
271 @item -E,--pre-process
272 only run the pre-processor
275 @item -o,--output=FILE
276 write output to @var{FILE}
280 print warranty and copyright. Mup2ly comes with absolutely @strong{NO WARRANTY}.
286 Currently, only plain notes (pitches, durations), voices and staves are