|
@@ -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)
|