Browse Source

Update documentation.

master
kevin 3 years ago
parent
commit
1f9895a6c0
2 changed files with 63 additions and 106 deletions
  1. 42
    85
      README.md
  2. 21
    21
      doc/xscore_gen.md

+ 42
- 85
README.md View File

@@ -1,86 +1,42 @@
1 1
 Prerequisites
2 2
 =============
3 3
 
4
-fftw fftw-devel atlas atlas-devel alsa-lib alsa-lib-devel fltk fltk-devel
4
+libcm fftw fftw-devel atlas atlas-devel alsa-lib alsa-lib-devel
5 5
 
6 6
 
7
+About
8
+=====
7 9
 
8
-In the 'template generation' mode the program generates a text file that contains information
9
-of interest from the MusicXML file. We refer to the text file as the as the 'decoration' file
10
-because it allows the score to be further decorated by adding additional information to the score.
10
+`cmtools` is a wrapper program for a collection of utility programs implemented by `libcm`.
11
+It is particullary useful for a variety of score processing tasks. 
11 12
 
12
-In the 'escore generation' mode the program outputs a data file in CSV format which contains
13
-the score in a format which is conveniently readable by a score matching program. The program
14
-also generates a MIDI file which allows the clarified score to be rendered with a sampler.
15
-An additional SVG (scalable vector graphics) file is generated which shows the score in
16
-piano roll form along with any problems that the program may have had during the conversion process.
13
+Electronic Score Generation and Merging
14
+=======================================
17 15
 
16
+Parse a MusicXML file and generate a textual representation which can be augmented manually or programatically.
17
+The textual representation is referred to as a 'score edit file' or sometimes just 'edit file'.
18 18
 
19
+This command will generate an edit file as long as the specified edit file does not already exist.
19 20
 
20 21
 ```
21
-cmtool --score_gen -x <xml_file> -d <dec_fn> {-c <csvOutFn>} {-m <midiOutFn>} {-s <svgOutFn>} {-r report} {-b begMeasNumb} {t begTempoBPM}
22
-
23
-
24
-Enumerated group: Action selector 
25
-
26
-    -S --score_gen  
27
-    Run the score generation tool.
28
-
29
-    -T --timeline_gen  
30
-    Run the time line generation tool.
31
-
32
-    -M --meas  
33
-    Generate perfomance measurements.
34
-
35
--x --xml_fn <filename> 
36
-    Name of the input MusicXML file.
37
-
38
--d --dec_fn <filename> 
39
-    Name of a score decoration file.
40
-
41
--c --csv_fn <filename> 
42
-    Name of a CSV score file.
43
-
44
--p --pgm_rsrc_fn <filename> 
45
-    Name of program resource file.
46
-
47
--m --midi_out_fn <filename> 
48
-    Name of a MIDI file to generate as output.
49
-
50
--i --midi_in_fn <filename> 
51
-    Name of a MIDI file to generate as output.
52
-
53
--s --svg_fn <filename> 
54
-    Name of a HTML/SVG file to generate as output.
55
-
56
--t --timeline_fn <filename> 
57
-    Name of a timeline to generate as output.
58
-
59
--r --report_fn <filename> 
60
-    Name of a status file to generate as output.
22
+cmtools --score_gen -x <xml_file> -d <edit_fn>
23
+```
61 24
 
62
--f --debug_fl  (required)
63
-    Print a report of the score following processing.
25
+The edit file generated by this command provides a way to link additional information
26
+to the score.  [The details for editing the file are here.](https://gitea.larke.org/klarke/cmtools/src/branch/master/doc/xscore_gen.md).
64 27
 
65
--b --beg_meas <int> 
66
-    The first measure the to be written to the output CSV, MIDI and SVG files.
28
+Once the edit file has been completed the MusicXML and edit file information can
29
+be merged to create an 'electronic score' in the form of a CSV file using the following command. 
67 30
 
68
--e --beg_bpm <int> 
69
-    Set to 0 to use the tempo from the score otherwise set to use the tempo at begMeasNumb.
70
-	
71
--n --svg_stand_alone_fl 
72
-    Write the SVG output with an HTML wrapper.
31
+```
32
+cmtools --score_gen -x <xml_file> -d <edit_fn> {-c <csvOutFn>} {-m <midiOutFn>} {-s <svgOutFn>} {-r report} {-b begMeasNumb} {t begTempoBPM}
33
+```
73 34
 
74
--z --svg_pan_zoom_fl
75
-    Include the SVG pan-zoom control (--svg_stand_alone must also be enabled)
35
+Along with the CSV file this command can also generate an SVG (scalable vector graphics) file which shows the
36
+augmented score in piano roll form, and a MIDI file which can be used to render the score with a synthesizer.
76 37
 
77
--h --help  
78
-    Print this usage information.
79 38
 
80
--v --version  
81
-    Print version information.
82 39
 
83
-```
84 40
 
85 41
 
86 42
 Score Following and Timeline Marker Generator
@@ -90,7 +46,7 @@ Perform score following based tasks.
90 46
 Generate the time line marker information used by the performance program resource file.
91 47
 
92 48
 ```
93
-cmtool --score_follow -c <csv_score_fn> -i <midi_in_fn> -r <report_fn> -s <svg_out_fn> -m <midi_out_fn> -t <timeline_fn>
49
+cmtools --score_follow -c <csv_score_fn> -i <midi_in_fn> -r <report_fn> -s <svg_out_fn> -m <midi_out_fn> -t <timeline_fn>
94 50
 ```
95 51
 
96 52
 If `<midi_out_fn>` is given then the a copy of `<midi_in_fn>` will be created with 
@@ -126,7 +82,7 @@ is used as a substitute for a real player.
126 82
 
127 83
 
128 84
 ```
129
-cmtool --meas_gen -p <pgm_rsrc_fn> -r <report_fn>
85
+cmtools --meas_gen -p <pgm_rsrc_fn> -r <report_fn>
130 86
 ```
131 87
 
132 88
 
@@ -147,7 +103,7 @@ Example `<pgm_rsrc_fn>`:
147 103
 Example call with output file snippet:
148 104
 
149 105
 ```
150
-cmtool --meas_gen -g ~/src/cmtools/examples/perf_meas/pgm_rsrc_round2.js -r ~/src/cmtools/examples/perf_meas/perf_meas_out.js
106
+cmtools --meas_gen -g ~/src/cmtools/examples/perf_meas/pgm_rsrc_round2.js -r ~/src/cmtools/examples/perf_meas/perf_meas_out.js
151 107
 
152 108
 {
153 109
   meas : 
@@ -187,7 +143,7 @@ Score Report
187 143
 Generate a human readable score report from a score CSV file.
188 144
 
189 145
 ```
190
-cmtool --score_report -c <csvScoreFn> -r <scoreRptFn>"
146
+cmtools --score_report -c <csvScoreFn> -r <scoreRptFn>"
191 147
 
192 148
 ```
193 149
 
@@ -225,7 +181,7 @@ Score Merge
225 181
 Copy the manual edits from 'frag.txt' to the correct location, beginning with measure 284, in the blank edit file 'edit0.txt'.
226 182
 
227 183
 ```
228
-cmootls  --merge_edit -d edit0.txt  -b 284 -k frag.txt -o temp.txt
184
+cmtools  --merge_edit -d edit0.txt  -b 284 -k frag.txt -o temp.txt
229 185
 ```
230 186
 
231 187
 All the events in 'frag.txt' may not be able to be located in 'edit0.txt'. Warning messages will be generated for
@@ -250,7 +206,7 @@ MIDI File Reports
250 206
 
251 207
 Generate a MIDI file report and optional SVG piano roll image."
252 208
 
253
-    cmtool --midi_report -i <midiInFn> -r <midiRptFn> {-s <svgOutFn> {--svg_stand_alone_fl} {--svg_pan_zoom_fl}  }
209
+    cmtools --midi_report -i <midiInFn> -r <midiRptFn> {-s <svgOutFn> {--svg_stand_alone_fl} {--svg_pan_zoom_fl}  }
254 210
 
255 211
 
256 212
 Timeline Report
@@ -258,7 +214,7 @@ Timeline Report
258 214
 
259 215
 Generate human readable report from a time line setup file.
260 216
 
261
-    cmtool --timeline_report -t <timelineInFn> -l <tlPrefix> -r <rptOutFn>
217
+    cmtools --timeline_report -t <timelineInFn> -l <tlPrefix> -r <rptOutFn>
262 218
 
263 219
 tlPrefix is the folder where data files for this timeline are stored.	
264 220
 
@@ -266,7 +222,7 @@ tlPrefix is the folder where data files for this timeline are stored.
266 222
 Score Follow Report
267 223
 ===================
268 224
 
269
-    cmtool  --score_follow -c round2.csv -i new_round2.mid -r report.txt -s report_svg.html
225
+    cmtools  --score_follow -c round2.csv -i new_round2.mid -r report.txt -s report_svg.html
270 226
  
271 227
  
272 228
 SVG Description
@@ -276,7 +232,8 @@ SVG Description
276 232
 - Red borders around MIDI events that did not match.
277 233
 - Line is drawn to MIDI events that matched to multiple score events. The lines
278 234
 are drawn to all score events after the first match.
279
- 
235
+   
236
+   ![Example SVG Image](doc/score_follow_0.png)
280 237
 
281 238
 Audio Device Test
282 239
 =================
@@ -291,18 +248,18 @@ This test also excercises the real-time audio buffer which implements most of th
291 248
 ```
292 249
 
293 250
 ```
294
--s --srate <real>     Audio system sample rate.
295
--z --hz <real>     Tone frequency in Hertz.
296
--x --ch_index <uint>     Index of first channel index.
297
--c --ch_cnt <uint>     Count of audio channels.
298
--b --buf_cnt <uint>     Count of audio buffers. (e.g. 2=double buffering, 3=triple buffering)
299
--f --frames_per_buf <uint>     Count of audio channels.
251
+-s --srate <real>            Audio system sample rate.
252
+-z --hz <real>               Tone frequency in Hertz.
253
+-x --ch_index <uint>         Index of first channel index.
254
+-c --ch_cnt <uint>           Count of audio channels.
255
+-b --buf_cnt <uint>          Count of audio buffers. (e.g. 2=double buffering, 3=triple buffering)
256
+-f --frames_per_buf <uint>   Count of audio channels.
300 257
 -i --in_dev_index <uint>     Input device index as taken from the audio device report.
301
--o --out_dev_index <uint>     Output device index as taken from the audio device report.
302
--r --report_flag     Print a report of the score following processing.
303
--h --help      Print this usage information.
304
--v --version      Print version information.
305
--p --parms      Print the arguments.
258
+-o --out_dev_index <uint>    Output device index as taken from the audio device report.
259
+-r --report_flag             Print a report of the score following processing.
260
+-h --help                    Print this usage information.
261
+-v --version                 Print version information.
262
+-p --parms                   Print the arguments.
306 263
 ```
307 264
 
308 265
 MIDI Audio Sync (MAS)

+ 21
- 21
doc/xscore_gen.md View File

@@ -1,7 +1,7 @@
1
-xscore_gen
1
+score_gen
2 2
 ==========
3 3
 
4
-*xscore_gen* parses MusicXML score files and generates a text file
4
+The `cmtools` *score_gen* command parses MusicXML score files and generates a text file
5 5
 which allows the score to be clarified and additional information to
6 6
 be added.  This is the first step in creating a 'machine readable
7 7
 score' based on the 'human readable score'.
@@ -25,15 +25,15 @@ text strings.
25 25
 
26 26
 2. Generate the MusicXML file using the [Dolet 6 Sibelius
27 27
 plug-in](https://www.musicxml.com/).  The resulting MusicXML file is
28
-run through *xscore_gen* and parsed to find any invalid structures
28
+run through *score_gen* and parsed to find any invalid structures
29 29
 such as damper up events not preceeded by damper down events, or tied
30 30
 notes with no ending note. These problems are cleared by careful
31 31
 re-editing of the score within Sibelius until all the problematic
32 32
 structures are fixed.
33 33
 
34
-3. As a side effect of step 2 a template 'decoration' file is generated.
34
+3. As a side effect of step 2 a template 'edit' file is generated.
35 35
 This text file has all the relavant 'machine score' information 
36
-from the XML score as a time tagged list. In this step *decoration* information is manually
36
+from the XML score as a time tagged list. In this step *edit* information is manually
37 37
 added by entering codes at the end of each line.  The codes
38 38
 are cryptic but they are also succinct and allow for relatively
39 39
 painless editing.
@@ -50,7 +50,7 @@ cmtools --score_gen -x GUTIM_20200803_utf8.xml -d edit0.txt -c score.csv -m scor
50 50
 ```
51 51
 
52 52
 As with step 2 this step may need to be iterated several times
53
-to clear syntactic errors in the decoration data.
53
+to clear syntactic errors in the edit data.
54 54
 
55 55
 5. Generate the time line marker information to be used with the performance program:
56 56
 
@@ -78,15 +78,15 @@ There are currently three defined groups
78 78
 
79 79
 ### Score Coloring Chart:
80 80
 
81
-Description         Number   Color
82
-------------------- -------- -------------------------
83
-Even                #0000FF  blue 
84
-Tempo               #00FF00  green
85
-Dyn                 #FF0000  red
86
-Tempo + Even        #00FFFF  green + blue (turquoise)
87
-Dyn   + Even        #FF00FF  red   + blue
88
-Dyn   + Tempo       #FF7F00  red   + green (brown)
89
-Tempo + Even + Dyn  #996633  purple
81
+Description         | Number   | Color
82
+------------------- | -------- | -------------------------
83
+Even                | #0000FF  | blue 
84
+Tempo               | #00FF00  | green
85
+Dyn                 | #FF0000  | red
86
+Tempo + Even        | #00FFFF  | green + blue (turquoise)
87
+Dyn   + Even        | #FF00FF  | red   + blue
88
+Dyn   + Tempo       | #FF7F00  | red   + green (brown)
89
+Tempo + Even + Dyn  | #996633  | purple
90 90
 
91 91
 Decrement color by one (i.e. 0xFE) to indicate the last note in a group
92 92
 of measured notes.  Note that a decremented color stops all active measures
@@ -134,14 +134,14 @@ this problem by editing the first line with `vi`.
134 134
 
135 135
 
136 136
 
137
-Create the decoration file
137
+Create the edit file
138 138
 --------------------------
139 139
 
140 140
 ```
141
-cmtools --score_gen -x myscore.xml -d mydec.txt {--damper}
141
+cmtools --score_gen -x myscore.xml -d myedit.txt {--damper}
142 142
 ```
143 143
 
144
-Here's a snippet of a typical 'decoration' file.
144
+Here's a snippet of a typical 'edit' file.
145 145
 
146 146
 ```
147 147
 Part:P1
@@ -165,7 +165,7 @@ Part:P1
165 165
        14   5     0    3072   768  4.0     -R------------- 3840
166 166
 ```
167 167
 
168
-### Decoration file format
168
+### Edit file format
169 169
 
170 170
 Column | Description
171 171
 -------|-----------------------------
@@ -179,7 +179,7 @@ flags  | event attributes
179 179
 
180 180
 ### Event attribute flags:
181 181
 
182
-Event attribute symbols used in the decoration file:
182
+Event attribute symbols used in the edit file:
183 183
 
184 184
 Desc      | Flag | 
185 185
 ----------|------|-----------------------------------------
@@ -204,7 +204,7 @@ Onset     |  *   | note onset
204 204
 
205 205
 
206 206
 
207
-Decoration Sytax:
207
+Edit Sytax:
208 208
 ------------------
209 209
 
210 210
 ```

Loading…
Cancel
Save