summaryrefslogtreecommitdiff
path: root/support/xml2pmx/doc/Readme.XML2PMX
blob: 04165c2269fd140f9b08253eb392dcb497c24775 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
(***************************************************************************)
(****************Copyright 2015,2016,2017 Dieter Gloetzel ******************)
(***************************************************************************)
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    
	You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. 
	
1.  Introduction
	"MusicXML", ( http://www.musicxml.com/ ) originally developed by Recordare INC
	and now owned by Finale ( https://www.finalemusic.com/ ), is the leading 
	musical data exchange format. XML2PMX provides an import facility for 
	sheet music stored in MusicXML format to PMX and MusiXTeX, the leading free 
	software for musical typesetting. Thus we are now able to import published MusicXML sources
	as well as MusicXML sources created by OCR scanning, 
	e.g. with Sharpeye of VISIV ( http://www.visiv.co.uk ).

2. PMX  
	developed by Don Simons (dsimons(at)roadrunner(dot)com) is an easy to use, 
        yet powerful preprocessor for the musical typesetting system MusiXTeX.
        http://icking-music-archive.org/software/htdocs/index.html
	An excellent introduction to using PMX is
	http://icking-music-archive.org/software/pmx/pmxccn.pdf

3. XML2PMX 
	has been developed by the author with "Oberon Plugin for Windows 
	Version 2.5" of ETHZ Zürich on Windows 10.
	https://github.com/Spirit-of-Oberon/ETH-Oberon-PlugIn-Win32
	
        XML2PMX is available as Windows-EXE (32 Bit) and as Linux binary (32 Bit).
	XML2PMX requires a TeX, MusiXTeX and PMX installation.
	For Unix please see:   https://tug.org/texlive/
	For Windows please see: https://miktex.org/2.9/setup
	
4. Coverage of MusicXML
	The following MusicXML features are detected and translated to PMX:
	- maximum  of 24 staves/voices and 400 measures 
    	- two voices per staff
    	- maximum of two staves per instrument
    	- notes and rests up to 64th, including tuplets and grace notes, 
    	- maximum of 2 dots
    	- chords, accidentals
    	- some annotations like Fermata, Staccato, Tremolo etc. 
    	- ties, slurs and beams
    	- definition of meter, fifths, clefs and their changes on the fly
    	- dynamic marks: hairpins, "ff" etc., piano damping pedal
    	- title and composer, and texts above or below the staff
    	- barlines, repeats, volta
    	- instrument names,
    	- origin of XML file copied to the resulting PMX file
	- accepts Windows files  (records ended by 0DX OAX) 
	  as well as Unix files  (records ended by 0AX)
	- resulting PMX-file on Unix has records ended by 0AX.
	- resulting PMX-file on Windows has records ended by 0DX 0AX.
	
5. New features:
	- There is a new command line field "options", 
	  which may contain one or several of the five letters "PDVSL"
	  in arbitrary sequence in upper or lower case.
	- Lyrics are extracted and stored in a separate file (option L=Lyrics)
	- several options for console output (P=parsed data, D=directions, V=voices, S=statistics,)
	- automatic detection of pickup
	- incomplete measures or voices are automatically filled with blind rests

6. Limitations
	Some more elaborate situations like beams crossing staves or chords crossing staves
	have not yet been covered.

7. Usage on MS Windows command line: 
    ===================================================================
		XML2PMX "xml-file with path" "pmx-file with path" "options"
	===================================================================
	The doublequotes are required.
	"options" contains a sequence (without blanks) of one or several of 
	the letters "p", "d", "v", "s" and "l" .
	Their meaning is the following:
	_______________________________________________________________
	|  p  | XML parser output; not recommended unless the terminal |
	|     | window process has enough storage                     |
	|-------------------------------------------------------------|
	|  d  | information on "directions" (dynamical marks etc)     |
	|-------------------------------------------------------------|
	|  v  | distribution of voices over instruments and measures  |
	|-------------------------------------------------------------|
	|  s  | statistics of MusicXML tags like <note>, <measure> etc|
	|-------------------------------------------------------------|
	|  l  | for extracting lyrics in a separate file              |
	|_____________________________________________________________|
	
	The generated PMX file will in general be complete and can be processed by "musixtex".
	
	If not, you can often solve the problem with minor changes in the PMX code. 

	After the XML2PMX run you will find intermediate results in the 
	terminal window which may be helpful for debugging.

	Once you have a generated PMX file with all of the notes extracted, the bulk work has been done.
	It is then easy to improve the results on the PMX side.

8.1 MusicXML test data 	
        You will find MusicXML-sources for testing under:

	http://www.musicxml.com/music-in-musicxml/example-set/
	
	The following pieces from this source (and a few more) have been tested:
	
	- Schubert: "Ave Maria" (Ellen’s Gesang III), D. 839 "SchbAvMaSample.xml"
	 
	- Beethoven: "An die ferne Geliebte", Op. 98 "BeetAnGeSample.xml"
	  
	- Lee Actor "Prelude to a tragedy": "ActorPreludeSample.xml"
		sample with 22 instruments and 41 measures
	
	- Mahler: "Lieder eines fahrenden Gesellen", "MahlFaGe4Sample.xml"
	
8.2 OCR scanned sheet music
	The MusicXML results from the tool Sharpeye from VISIV 
	(http://www.visiv.co.uk/) have been tested successfully.

Contact: 

     Feel free to contact me at <d.gloetzel(at)web(dot)de>  
     in order to report errors, propose improvements or     
     other comments.