Am So., 17. Nov. 2019 um 15:44 Uhr schrieb Thomas Morley
<[email protected]>:
> And there is musicxml.ly and xml-library.scm as well.
Please always obtain a 80-characters-line-width.
In musicxml.ly you give an optional string?-argument and convert to
symbol later, why not directly?
I'd use `format“ instead of string-append.
So my suggestion would be:
musicxml =
#(define-void-function (parser location type music)
((symbol? 'dtd) ly:score-or-music?)
(_i "Print a file with the musicxml representation of @var{music} ")
(call-with-output-file
(format #f "~a~a.xml"
(ly:parser-output-name parser)
(if (ly:score? music) "-score" ""))
(lambda (port) (write-musicxml music port type))))
Cheers,
Harm