| [ << External programs ] | [Top][Contents][Index] | [ Suggestions for writing files >> ] |
| [ < Converting from other formats ] | [ Up : Converting from other formats ] | [ Invoking musicxml2ly > ] |
4.3.1 Invoking midi2ly
midi2ly 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
Staff and
channels into
Voice 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.
Ismert problémák és figyelmeztetések
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.
| [ << External programs ] | [Top][Contents][Index] | [ Suggestions for writing files >> ] |
| [ < Converting from other formats ] | [ Up : Converting from other formats ] | [ Invoking musicxml2ly > ] |