1MIDI2ABC(1)                 General Commands Manual                MIDI2ABC(1)
2
3
4

NAME

6       midi2abc - program to convert MIDI format files to abc notation
7

SYNOPSIS

9       midi2abc  -f  infile [-xa] [-ga] [-a acbeats] [-m time signature] [-ppu
10       parts per unit] [-aul denominator of unit length] [-gu] [-b  bars]  [-Q
11       tempo]  [-u  pulses]  [-k  key]  [-c channel] [-obpl] [-bpl bars] [-bps
12       bars]  [-o  filename]  [-s]  [-sr  units]  [-sum]  [-nt]   [-splitbars]
13       [-splitvoices]  [-midigram]  [-mftext] [-nogr] [-title string] [-origin
14       string]
15
16

DESCRIPTION

18       midi2abc takes a MIDI format file and converts it to something as close
19       as  possible  to  abc text format. The user then has to add text fields
20       not present in the MIDI header and possibly tidy up the abc  note  out‐
21       put.
22
23       The  output of midi2abc is printed to the screen. To save it to a file,
24       use the redirection operator, (e.g. midi2abc -f file.mid > file.abc) or
25       specify the output file using the -o option.
26
27       Use  only  one  or none of the options -u -gu, -b and -Q. Midi2abc nor‐
28       mally converts the MIDI time units into quantum units  normally  corre‐
29       sponding  to  the  abc 1/16th note or 1/32nd note.  If none of these is
30       present, the program will use the PPQN information in the  MIDI  header
31       to  compute  the suitable conversion factor. For most MIDI files on the
32       web, it is recommended to rely on the MIDI header information  and  not
33       use any of the options other than the formatting options.
34
35       The  program  will extract the time signature infromation from the MIDI
36       file if it is present. Otherwise it will assume 4/4 or you could  spec‐
37       ify it with -m. option.
38
39       If  the tune has an anacrusis, you can use either the -ga or -xa option
40       to estimate the its length. Alternatively, you can  specify  its  value
41       using  the  -a option. The anacrusis is specified in half unit lengths,
42       where the unit length is defined by the L: field.  For  example  if  L:
43       1/8,  then  a  quarter  note would be indicated by the value 4, (4 1/16
44       units).
45
46   OPTIONS
47       -a acbeats
48              where acbeats specifies the anacrusis in half unit lengths.
49
50       -xa    extract the anacrusis from file by finding the first strong note
51
52       -ga    guess the anacrusis by minimizing the number of ties across bars
53
54       -m time signature
55              time signature
56
57       -b bars
58              number of bars wanted in output
59
60       -Q tempo
61              tempo in quarter-notes per minute
62
63       -u pulses
64              Allows you to specify directly the number of midi pulses per abc
65              time unit.
66
67       -ppu parts per abc unit length
68              Normally,  the  smallest  note unit that midi2abc can extract is
69              half the L: unit length.This is called the quantum  unit.   Thus
70              for  L: 1/8, midi2abc can extract 1/16 notes but not 1/32 notes.
71              You can change this by specifying -ppu 4 for example. The number
72              of parts should be a power of 2.
73
74       -aul denominator of abc unit length
75              Normally midi2abc chooses a unit length of 1/8 or 1/16 depending
76              upon the time signature. For time signatures  smaller  than  3/4
77              the  L:  1/16  is  used and for larger time signatures L: 1/8 is
78              used. You can specify the unit length  to  be  used  using  this
79              parameter. Thus -aul 32 will cause midi2abc to use a unit length
80              of 1/32 nd note.
81
82       -gu    Tells midi2abc to estimate the number of  midi  pulses  per  abc
83              time unit from the note duration or spacing in the MIDI file.
84
85       -gk    Tells midi2abc to guess the key signature by minimizing the num‐
86              ber of accidentals even if the key signature is  already  speci‐
87              fied  in  the MIDI file. By default the key signature is the one
88              specified in the MIDI file.  If it is not  specified,  then  the
89              program guesses the key signature by minimizing accidentals.
90
91       -k key key signature: -6 to 6 sharps.
92
93       -c channel
94              select only this midi channel.
95
96       -f infile
97              input file in midi format
98
99       -o output file
100              specifies the output abc file name.
101
102       -s     do not discard very short notes.
103
104       -sr quantum units
105              do not notate a short rest smaller than the specified size after
106              a note. If the size (in quantum units) is zero, nothing is done.
107              For larger values, the rest is absorbed into the preceding note.
108              In other words, the preceding note is lengthened to include that
109              rest.
110
111       -sum   print a short summary of the input midi file.
112
113       -nt    do not look for triplets or broken rhythm
114
115       -obpl  Print only one bar per line instead of 4. For complex music this
116              improves the readability and avoids some problems with some  abc
117              to postscript converters. This option is deprecated.
118
119       -nogr  (No  note grouping.) Inserts a space between all notes. It makes
120              a less pretty postscript file but it is easier to edit.
121
122       -bpl nbars
123              Print nbars of music on every line followed by a backslash.
124
125       -bps nbars
126              When nbars have been printed (including those lines joined by  a
127              backslash continuation) go to a new line (with no backslash).
128
129       -splitbars
130              This  parameter  changes the way midi2abc prints chords composed
131              of notes  of  unequal  length  (polyphonic  chords).   Normally,
132              midi2abc  joins  the  longer notes to the notes in the following
133              chord using ties. A more readable output, can be obtained if the
134              measure  is  split  into separate parts using the '&' feature in
135              abc notation. The algorithm for dividing the notes  in  a  poly‐
136              phonic  chord  to  separate  voices (label_splits in midi2abc.c)
137              needs some improvement. I welcome any assistance.
138
139       -splitvoices
140              This parameter like above handles polyphonic chords by splitting
141              an entire voice into multi voices.
142
143       -midigram
144              When  this  option appears, all other options are ignored and no
145              abc file is produced. Instead a list of all notes  in  the  MIDI
146              file  are printed in a fixed format. Each line represents a pair
147              of MIDI note on/off event. The line contains the on/off time  of
148              the  note, its track number, channel number, midi pitch and midi
149              velocity. The last record indicates the  duration  of  the  MIDI
150              file  in  MIDI  pulse units. The output is designed to go into a
151              graphical user interface which will produce a  graphical  repre‐
152              sentation (piano roll).
153
154       -mftext
155              When  this  option appears, all other options are ignored and no
156              abc file is produced. Instead a list of all  the  MIDI  commands
157              are  printed. The output is designed to go into a graphical user
158              interface provided by runabc.tcl.
159
160       -title string
161              Replaces the default title field following  T:  with  the  given
162              string.
163
164       -origin string
165              Adds an O: field with the given string.
166
167
168
169   FEATURES
170       *  The  key  is  chosen  so  as  to minimize the number of accidentals.
171       Alternatively, the user can specify the  key  numerically  (a  positive
172       number  is  the number of sharps, a negative number is minus the number
173       of flats).
174
175       * Note length can be set by specifiying the total number of bars or the
176       tempo  of the piece. Alternatively the note length can be read from the
177       file.  However, by default it is deduced in a heuristic manner from the
178       inter-note  distances.  This means that you do not have to use the MIDI
179       clock as a metronome when playing in a tune from a keyboard.
180
181       * Barlines are automatically inserted. The user specifies the number of
182       measures  in the anacrusis before the first barline and the time signa‐
183       ture.
184
185       * The program can guess how the length  of  the  anacrusis,  either  by
186       looking  for  the  first  strong note or minimizing the number of notes
187       split by a tie across a barline.
188
189       * Where a note extends beyond a bar break, it is split  into  two  tied
190       notes.
191
192       * The output has 4 bars per line.
193
194       *  Enough accidental signs are put in the music to ensure that no pitch
195       errors occur if a barline is added or deleted.
196
197       * The program attempts to group notes sensibly in each bar.
198
199       * Triplets and broken rhythm (a>b) are supported.
200
201       * Chords are identified.
202
203       * Text information from the original MIDI file is included as comments.
204
205       * The -c option can be used to select only 1 MIDI  channel.  Events  on
206       other channels are ignored.
207
208   LIMITATIONS
209       midi2abc does not ...
210
211       *  Supply  tune  title, composer or any other field apart from X: , K:,
212       Q:, M: and L: - these must be added by hand afterwards, though they may
213       have been included in the text of the MIDI file.
214
215       * Support duplets, quadruplets, other esoteric features.
216
217       * Support mid-tune key or time signature changes.
218
219       * Deduce repeats. The output is just the notes in the input file.
220
221       *  Recover an abc tune as supplied to abc2midi. However, if you want to
222       do this, "midi2abc  -xa -f file.mid" comes close.
223

SEE ALSO

225       abc2ps(1), abc2midi(1), abc2abc(1)
226

AUTHOR

228       James Allwright <J.R.Allwright@westminster.ac.uk>
229

SUPPORTED

231       Seymour Shlien <seymour.shlien@crc.ca>
232

VERSION

234       This man page describes midi2abc version 2.91 from March 09 2008.
235
237       Copyright 1999 James Allwright
238
239       midi2abc is supplied "as is" without any warranty. It is free  software
240       and can be used, copied, modified and distributed without fee under the
241       terms of the GNU General Public License.
242
243
244
245
246                                 10 March 2008                     MIDI2ABC(1)
Impressum