comparison abc2xml/Readme.txt @ 484:4fab69a1027d build-default-207

Add MusicXML conversion to tune pages. Might help someone.
author Jim Hague <jim.hague@acm.org>
date Tue, 17 Jun 2014 09:11:38 +0100
parents
children
comparison
equal deleted inserted replaced
483:681274f40615 484:4fab69a1027d
1 ---- abc2xml ----
2
3 abc2xml is a command line utility that translates ABC notation into MusicXML.
4
5 In principle all elements from ABC are translated, but some translations are only partially
6 implemented. Translated are:
7 - multiple lyric lines per voice
8 - mapping voices to staves, brackets and braces (%%score or %%staves)
9 - voice overlays (only single &-overlays, no multiple &&-overlays yet)
10 - dynamics, slurs, several decorations (ties between different voices are not possible in MusicXML
11 and are changed to slurs when present in ABC. Also (illegal) ties between different pitches are converted
12 to slurs. In both cases a warning message is issued)
13 - grace notes, tuplets
14 - keys (maj, min, mix, dor, phr, lyd, loc and none), meter, tempo
15 - clefs (only most common clef names, tranposition= and middle= are supported)
16 - jazz chord symbols and text annotations
17 - beaming. Only one beam per abc-beam group is translated at the moment, which is
18 sufficient for MuseScore. In musicXML every beam should be explicitly notated, so a 32th
19 note should start 3 beams.
20 - scale, page size and page margins are recognized as either %% or I: directive. The scale value is
21 the distance between two stafflines in millimeters. The other values are also in millimeters unless
22 they are followed by a unit (cm,in,pt).
23 - %%MIDI program and %%MIDI channel (or I:MIDI ..) are translated when used in a current voice
24 (i.e. after a V: definition). The instrument of a voice cannot be changed in the middle of a tune.
25 If one does so, only the last %%MIDI will be used for the whole voice. (and the earlier settings are
26 discarded). %%MIDI transpose is translated and has the same effect as transpose= in the clef, i.e.
27 only play back is transposed, not notation. In %%MIDI program=num, the number should be between 0
28 and 127. Also in %%MIDI channel=num, the number is starts from zero. The midi translation supports
29 mapping multiple voices whith different instruments to one stave. (i.e. the resulting xml part will
30 have multiple instruments). This feature, though present in MusicXML is not supported by MuseScore,
31 nor by Finale Notepad. These programs only allow one instrument per stave.
32 - multiple tunes within one abc file can be converted to a set of xml files, one file per tune.
33
34 In conjunction with xml2abc the translation from xml -> abc -> xml works for all examples
35 in the set from MakeMusic. The translated examples produce reasonable score when typeset with MuseScore.
36
37 ---- Usage: ----
38
39 When you have Python installed:
40 > python abc2xml.py [-h] [-m SKIP NUM] [-o DIR] [-p PFMT] [-z MODE] file1 [file2 ...]
41
42 When you use the Win32 executable:
43 > abc2xml.exe [-h] [-m SKIP NUM] [-o DIR] [-p PFMT] [-z MODE] file1 [file2 ...]
44
45 Translates all .abc files in the file list to MusicXML. Output goes to stdout unless the -o option
46 is given. Wildcards in file names are expanded.
47 Option -h prints help message with explanation of the options
48 Option -m skip num skips skip tunes and then reads at most num tunes.
49 Can be used when abc files contain multiple tunes (tune books) to select only a subset of the tunes.
50 The default skips nothing (skip=0) and reads 1 tune (num=1).
51 Option -o dir translates every .abc file to a separate .xml file with the same name
52 into directory dir. For example, -o. puts all xml files into the same directory where
53 the input files reside.
54 Option -p fmt sets the page format of the ouput. fmt should be a string with 7 float
55 values sepatated by comma's without any spaces. The values are: space, page-height, -width, and
56 page margin left, -right, -top, -bottom. space defines the scale of the whole score and equals the
57 distance between two staff lines in mm. When the -p option is omitted the values default to A4 with
58 10mm margins and space=1.764. All commandline values are in millimeters.
59 Option -z mode or --mxl mode writes compressed xml files with extention .mxl.
60 If mode is a or add both .xml and .mxl files will be written. If mode is r or replace only .mxl
61 files are written.
62
63 ---- Download ----
64
65 The python script: abc2xml.py-58.zip
66 http://wim.vree.org/svgParse/abc2xml.py-58.zip
67
68 Stand alone win32 executable: abc2xml.exe-58.zip
69 http://wim.vree.org/svgParse/abc2xml.exe-58.zip
70
71 ---- ABC Syntax ----
72
73 ABC is recognized by a high level parser that reads the ABC syntax in a notation close to (E)BNF.
74 The drawback of this approach is that many dialects of ABC will cause sytax errors.
75 In addition, the high level parser implementation in pure python (pyparsing.py) is slow.
76 The pyparsing library is included (as a single python file) in abc2xml.py-58.zip