Re: Problems with musicxml2ly

2022-12-21 Thread mark damerell
Thank you very much all who replied. Paul Hodges said (in part):

... Music XML files always require a lot of processing to get acceptable
> output  ...
>

 This is certainly true in this instance!! Thank you all.


Re: Problems with musicxml2ly

2022-12-20 Thread Jacques Menu
Well, well, it seems I’m getting too old to try and help other users, and that 
the only misleading thing is my environment being set to have ‘.mxl’ files 
opened by MuseScore...

Sorry for the (large) noise!

JM




Re: Problems with musicxml2ly

2022-12-20 Thread Silvain Dupertuis

I tried this:

1. opening the file with MuseScore (3.6 portable) 2. reexporting in MusicXML format, 3, 
then importing the resulting file into Lilypond:


Now the import works, but there are still a certain number of errors in the Lilypond file 
when I try to process the file (warnings are in French). I do not have the time and did 
not try and correcting them...


AbsoluteDynamicEvent non attaché
Avertissement : liaison de prolongation non terminée (3×)

Avertissement : trait d'union sans suite ; escamoté

and the process stops with error code 6

Le 20.12.22 à 09:36, Jacques Menu a écrit :

Hello Mark,


Unfortunately I do not know any way to produce a small xml  that will give this 
error.
The file I wanted was "O holy night" by Adolphe Adam (translated into English) 
adapted
by P. Le Bas.
It came from this address:

https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22


The legend on this page is misleading: the files that can be downloaded clicking on the 
supposedly MusicXML icon have a ‘.mxl’ suffix, i.e. they are MuseScore files in fact:




I know, it’s unfortunate that this suffix is so close to ‘.xml’…

The first page this gives in the recent MuseScore 4.0.0r is:




Exporting all the parts to MusicXML produces the attached O_Holy_Night.xml file. Note 
that MusicXML is a textual format, and one can open such files with any text editor:




Here again. a suffix point: historically, MusicXML has used ‘.xml’, which is marked as 
obsolete by MuseScore. An attempt to change that to ‘.musicxml’ doesn’t seem to have 
gained approval yet, though.


Converting O_Holy_Night.xml to LilyPond with:

*musicxml2ly (LilyPond) 2.23.82*

*Copyright (c) 2005--2022 by*

*    Han-Wen Nienhuys ,*

*    Jan Nieuwenhuizen  and*

*    Reinhold Kainhofer *

*    Patrick L. Schmidt *


produces the attached O_Holy_Night.ly, converted to the attached O_Holy_Night.pdf file 
by LilyPond.


HTH!

JM








--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: Problems with musicxml2ly

2022-12-20 Thread Paul Hodges

From:   Jacques Menu  





The legend on this page is misleading: the files that can be downloaded 
clicking on the supposedly MusicXML icon have a ‘.mxl’ suffix, i.e. they are 
MuseScore files in fact:

.mxl files are the standard compressed form of Music XML files; the Music XML 
file is compressed as a .zip file which is then renamed .mxl.









As to the original issue - my experience is that Music XML files always require 
a lot of processing to get acceptable output - I just treat them as a means of 
inputting notes, and remove all the extraneous formatting, and simplify and 
rewrite the score layout until it's correct.  Music XML is far from a 
satisfactory medium for transmitting formatted scores.


Sometimes I find it helps to read the Music XML into Dorico and write a new 
Music XML file from there; but in this case Dorico sees similar problems, with 
five staves for the organ, and also overlaid words in some places which 
LilyPond manages better.


Paul





Re: Problems with musicxml2ly

2022-12-20 Thread m.tarensk...@kpnmail.nl
MusicXml files can have .xml .mxl or .musicxml filename extension.Musescore file format uses .mscz extension.Verzonden vanaf mijn Huawei mobiele telefoon Oorspronkelijk bericht Onderwerp: Re: Problems with musicxml2lyVan: Jean Abou Samra Aan: Jacques Menu ,mark damerell Cc: lilypond-user Le 20/12/2022 à 09:36, Jacques Menu a écrit :> Hello Mark,>>> Unfortunately I do not know any way to produce a small xml  that will >> give this error.>> The file I wanted was "O holy night" by Adolphe Adam (translated into >> English) adapted>> by P. Le Bas.>> It came from this address: https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22>> The legend on this page is misleading: the files that can be > downloaded clicking on the supposedly MusicXML icon have a ‘.mxl’ > suffix, i.e. they are MuseScore files in fact:Are you sure? I think .mxl is the extension for MusicXML files compressed in a standard way. Seehttps://www.w3.org/2021/06/musicxml40/tutorial/compressed-mxl-files/So the issue smells like a musicxml2ly bug to me, but I didn't investigate much more.Best,Jean

Re: Problems with musicxml2ly

2022-12-20 Thread Silvain Dupertuis

I do not think the problem is with the msl format, which is an archive 
containing a xml file.
I tried on another mxl file directly and it worked. But it was actually a score coming 
from Lilypond.
In the case of Minuit, I tried extracting the xml file from the mxl file and using 
musicxml2ly on the mxl archive gives the same result (and the same errors)...



Le 20.12.22 à 09:36, Jacques Menu a écrit :

Hello Mark,


Unfortunately I do not know any way to produce a small xml  that will give this 
error.
The file I wanted was "O holy night" by Adolphe Adam (translated into English) 
adapted
by P. Le Bas.
It came from this address:

https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22


The legend on this page is misleading: the files that can be downloaded clicking on the 
supposedly MusicXML icon have a ‘.mxl’ suffix, i.e. they are MuseScore files in fact:




I know, it’s unfortunate that this suffix is so close to ‘.xml’…

The first page this gives in the recent MuseScore 4.0.0r is:




Exporting all the parts to MusicXML produces the attached O_Holy_Night.xml file. Note 
that MusicXML is a textual format, and one can open such files with any text editor:




Here again. a suffix point: historically, MusicXML has used ‘.xml’, which is marked as 
obsolete by MuseScore. An attempt to change that to ‘.musicxml’ doesn’t seem to have 
gained approval yet, though.


Converting O_Holy_Night.xml to LilyPond with:

*musicxml2ly (LilyPond) 2.23.82*


*Copyright (c) 2005--2022 by*

*    Han-Wen Nienhuys ,*

*    Jan Nieuwenhuizen  and*

*    Reinhold Kainhofer *

*    Patrick L. Schmidt *


produces the attached O_Holy_Night.ly, converted to the attached O_Holy_Night.pdf file 
by LilyPond.


HTH!

JM









--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: Problems with musicxml2ly

2022-12-20 Thread Jean Abou Samra



Le 20/12/2022 à 09:36, Jacques Menu a écrit :

Hello Mark,

Unfortunately I do not know any way to produce a small xml  that will 
give this error.
The file I wanted was "O holy night" by Adolphe Adam (translated into 
English) adapted

by P. Le Bas.
It came from this address:

https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22


The legend on this page is misleading: the files that can be 
downloaded clicking on the supposedly MusicXML icon have a ‘.mxl’ 
suffix, i.e. they are MuseScore files in fact:



Are you sure? I think .mxl is the extension for MusicXML files 
compressed in a standard way. See


https://www.w3.org/2021/06/musicxml40/tutorial/compressed-mxl-files/

So the issue smells like a musicxml2ly bug to me, but I didn't 
investigate much more.


Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Problems with musicxml2ly

2022-12-19 Thread mark damerell via LilyPond user discussion
Sorry about the length of this: In outline: I tried to use  musicxml2ly  on
a  xml  file.
This ran with no error, but when I ran  lilypond on the result,  I got a
flood of warnings
& then a fatal error & no output.  I append the (truncated) error report I
hope.

Unfortunately I do not know any way to produce a small  xml  that will give
this error.
The file I wanted was "O holy night" by Adolphe Adam (translated into
English) adapted
by P. Le Bas.
It came from this address:


https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22

& it was the first item listed.  It was available in  pdf  , mid  ,  mp3 ,
xml  and  sib.
jsonformatter.org   said it is a valid  xml  file. The  pdf  looks good.  I
tried  midi2ly
& the result was really weird.  Please any advice?
rmd@rmd:~/Music/night$ musicxml2ly O\ Holy\ Night\ -\ NP.xml 
musicxml2ly: Reading MusicXML from O Holy Night - NP.xml ...
musicxml2ly: Converting to LilyPond expressions...
musicxml2ly: warning: Negative skip -3/2 (from position 249/2 to 123)
musicxml2ly: warning: Negative skip -9/8 (from position 993/8 to 123)


[ 350 similar errors]


musicxml2ly: Converting to LilyPond expressions...
musicxml2ly: Converting to LilyPond expressions...
musicxml2ly: warning: Negative skip -1 (from position 275/2 to 273/2)
musicxml2ly: Converting to LilyPond expressions...
Traceback (most recent call last):
  File "/usr/bin/musicxml2ly", line 2986, in 
main()
  File "/usr/bin/musicxml2ly", line 2981, in main
voices = convert (filename, options)
  File "/usr/bin/musicxml2ly", line 2892, in convert
score = extract_score_structure (mxl_pl, staff_info)
  File "/usr/bin/musicxml2ly", line 430, in extract_score_structure
staff = read_score_part (el)
  File "/usr/bin/musicxml2ly", line 383, in read_score_part
staff.instrument_name = extract_display_text (partname)
  File "/usr/bin/musicxml2ly", line 907, in extract_display_text
child = el.get_maybe_exist_named_child ("display-text")
  File "/usr/share/lilypond/2.18.2/python/musicxml.py", line 114, in 
get_maybe_exist_named_child
return self.get_maybe_exist_typed_child (get_class (name))
  File "/usr/share/lilypond/2.18.2/python/musicxml.py", line 123, in 
get_maybe_exist_typed_child
raise "More than 1 child", klass
TypeError: exceptions must be old-style classes or derived from BaseException, 
not str
rmd@rmd:~/Music/night$ 

Re: Enconding problems with musicxml2ly

2018-11-16 Thread Lukas-Fabian Moser

Hi Urs,

In the ly file created by musicxml2ly, any quoted string contains 
strange characters which prevent Lilypond from compiling the file. On 
my system, they are displayed thus (I include Kate's warning):


This was discussed recently. I don't recall exactly what it was about 
but you might search the archives (both lilypond-user and 
bug-lilypond). I would think it has to do with the pretty old Python 
version shipped with LilyPond. As a workaround (you're right that's 
definitely not the way it *should* be) you should be able to remove 
these "characters" automatically.


Thanks for the pointer - I don't usually follow the goings on in 
bug-lilypond, which is where that recent discussion took place. I'm sorry!


For future reference: The problem is discussed in

https://lists.gnu.org/archive/html/bug-lilypond/2018-08/msg00038.html
and
http://lists.gnu.org/archive/html/lilypond-user/2017-05/msg00230.html

It's not so bad since it turns out that (as Urs suggested) killing the 
spurious "Delta" signs by search (e.g. in Frescobaldi) solves 
the problem. So it's just a slight inconvenience.


Best
Lukas


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Enconding problems with musicxml2ly

2018-11-15 Thread Urs Liska


Am 16.11.18 um 08:29 schrieb Lukas-Fabian Moser:


Dear List,

I try to transfer music written in MuseScore 2.3.2 (Linux) to Lilypond 
using MuseScore's musicxml export and musicxml2ly from 2.19.80.


In the ly file created by musicxml2ly, any quoted string contains 
strange characters which prevent Lilypond from compiling the file. On 
my system, they are displayed thus (I include Kate's warning):


This also happens with literal strings (pizz, arco etc.), which are 
perfectly straightforward ASCII in the .musicxml file generated by 
MuseScore.


Can anybody give me a hint what makes musicxml2ly produce such 
characters? (If I remove them by hand, the produced .ly file works 
just fine, but of course that's not the way to go in a score that 
contains plenty of text markings.)




This was discussed recently. I don't recall exactly what it was about 
but you might search the archives (both lilypond-user and bug-lilypond). 
I would think it has to do with the pretty old Python version shipped 
with LilyPond. As a workaround (you're right that's definitely not the 
way it *should* be) you should be able to remove these "characters" 
automatically.


HTH
Urs



Best
Lukas


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Enconding problems with musicxml2ly

2018-11-15 Thread Lukas-Fabian Moser

Dear List,

I try to transfer music written in MuseScore 2.3.2 (Linux) to Lilypond 
using MuseScore's musicxml export and musicxml2ly from 2.19.80.


In the ly file created by musicxml2ly, any quoted string contains 
strange characters which prevent Lilypond from compiling the file. On my 
system, they are displayed thus (I include Kate's warning):


This also happens with literal strings (pizz, arco etc.), which are 
perfectly straightforward ASCII in the .musicxml file generated by 
MuseScore.


Can anybody give me a hint what makes musicxml2ly produce such 
characters? (If I remove them by hand, the produced .ly file works just 
fine, but of course that's not the way to go in a score that contains 
plenty of text markings.)


Best
Lukas

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with musicxml2ly

2017-05-10 Thread Simon Albrecht

Am 10.05.2017 um 10:08 schrieb Don Gingrich:

I thought(hoped) that we had got past the
days of "Standards aren't":-)


That’s a good thing to hope for. Though… 
Thumbs up to MEI…

Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with musicxml2ly

2017-05-10 Thread Richard Shann
On Wed, 2017-05-10 at 18:08 +1000, Don Gingrich wrote:
> On Wed, 10 May 2017 08:45:40 Richard Shann wrote:
[...]
> And, by the way, the chordnames above the staves vanished
> somewhere in your import.

Denemo's MusicXML import is very crude, it doesn't even try for chord
names, lyrics and probably quite a lot of other things, just
concentrates on reducing the labor of putting in all those dratted notes
and durations again. The upside of this is that it will often get you
*something* while musicxml2ly generally used to give up if it
encountered something bad in the input.
> 
> I've now got two versions that I can try to work with.
> 
> So, thanks for having a go.

Happy to test out musicXML import via Denemo any time, in the hopes of
finding places to improve it.

Richard





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with musicxml2ly

2017-05-10 Thread Don Gingrich
On Wed, 10 May 2017 08:45:40 Richard Shann wrote:
> On Wed, 2017-05-10 at 13:43 +1000, Don Gingrich wrote:
> > Perhaps cubase does something unusual with the setup
> > of the XML file?
> 
> Unfortunately MusicXML is IMHO just a rag-bag of ideas for fields to
> describe poorly documented music features, every program devises its own
> interpretation of the "standard".

I thought(hoped) that we had got past the
days of "Standards aren't" :-)

Unfortunately it seems not much has changed since my early 
experience in the 80s. 

I only posted this because I thought that it might be useful to
those working on musicxml2ly.

And, by the way, the chordnames above the staves vanished
somewhere in your import.

I've now got two versions that I can try to work with.

So, thanks for having a go.

Cheers,

-Don
> 
> FWIW I imported this via Denemo and it looked ok - not sure what it
> should look like. Attached is the LilyPond source generated and the PDF
> I get.
> 
> Richard



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with musicxml2ly

2017-05-10 Thread Richard Shann
On Wed, 2017-05-10 at 13:43 +1000, Don Gingrich wrote:
> Perhaps cubase does something unusual with the setup
> of the XML file?

Unfortunately MusicXML is IMHO just a rag-bag of ideas for fields to
describe poorly documented music features, every program devises its own
interpretation of the "standard".

FWIW I imported this via Denemo and it looked ok - not sure what it
should look like. Attached is the LilyPond source generated and the PDF
I get.

Richard


output-Default Score Layout.pdf
Description: Adobe PDF document

%% LilyPond file generated by Denemo version 2.1.3

%%http://www.gnu.org/software/denemo/

\version "2.18.0"

CompactChordSymbols = {}
#(define DenemoTransposeStep 0)
#(define DenemoTransposeAccidental 0)
DenemoGlobalTranspose = #(define-music-function (parser location arg)(ly:music?) #{\transpose c c#arg #})
titledPiece = {}
AutoBarline = {}
AutoEndMovementBarline = \bar "|."

% The music follows

MvmntIVoiceI = {
<> ^\markup \bold {"Levi Jackson Rag" }}






\score
{ %Start of Selection from current movement
  <<

%Start of Staff
\new Staff = "voice 1"  << 
 \new Voice = "MvmntIVoiceI"  { 
  \clef treble\key c \major\time 2/4   \MvmntIVoiceI
} %End of voice

>> %End of Staff

  >>

\header {

}

} %End of Movement



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Problems with musicxml2ly

2017-05-09 Thread Don Gingrich
Just tried to import a cubase XML file and hit a 
*bunch* of errors.

I did finally get a .ly, but it was a struggle and required the
command line version rather than working in Frescobaldi.

I post this, not so much asking for assistance, but as possibly
useful data for those working on  musicxml2ly. So, no replies
required unless I've stuffed up something obvious.

Perhaps cubase does something unusual with the setup
of the XML file?

Cheers

-Don

XML file follows: (sorry, it's *BIG*, but didn't know where/how to edit for 
minimum example)

__

#>  musicxml2ly --no-beaming -v "Levi Jackson Rag.xml"
musicxml2ly: Reading MusicXML from Levi Jackson Rag.xml ...
musicxml2ly: Converting to LilyPond expressions...
musicxml2ly: warning: Unable to convert chord type none to lilypond.
musicxml2ly: warning: Unable to convert chord type none to lilypond.
musicxml2ly: warning: Unable to convert chord type none to lilypond.
musicxml2ly: warning: Unable to convert chord type none to lilypond.
musicxml2ly: warning: Unable to convert chord type none to lilypond.
musicxml2ly: warning: Unable to convert chord type none to lilypond.
musicxml2ly: warning: Unable to convert chord type none to lilypond.
Traceback (most recent call last):
  File "/usr/bin/musicxml2ly", line 2986, in 
main()
  File "/usr/bin/musicxml2ly", line 2981, in main
voices = convert (filename, options)
  File "/usr/bin/musicxml2ly", line 2887, in convert
(voices, staff_info) = get_all_voices (parts)
  File "/usr/bin/musicxml2ly", line 2574, in get_all_voices
part_ly_voices[n] = musicxml_voice_to_lily_voice (v)
  File "/usr/bin/musicxml2ly", line 2189, in musicxml_voice_to_lily_voice
for a in musicxml_harmony_to_lily_chordname (n):
  File "/usr/bin/musicxml2ly", line 1690, in musicxml_harmony_to_lily_chordname
ev.root = musicxml_chordpitch_to_lily (root)
  File "/usr/bin/musicxml2ly", line 1628, in musicxml_chordpitch_to_lily
r.alteration = mxl_cpitch.get_alteration ()
  File "/usr/share/lilypond/2.18.2/python/musicxml.py", line 1098, in 
get_alteration
return interpret_alter_element (ch)
  File "/usr/share/lilypond/2.18.2/python/musicxml.py", line 40, in 
interpret_alter_element
val = eval(alter_elm.get_text ())
  File "", line 2

^
IndentationError: unexpected indent

#> cat "Levi Jackson Rag.xml"

http://www.musicxml.org/dtds/partwise.dtd;>



Cubase, Version 7.0.5, Build 2197
2017-05-09




7.01
40


1682
1190

86
88
86
88











1
0







480

1


2
4


G
2




D

none

D




Levi Jackson Rag

1



by Pat Shaw

1



240
1
eighth
1



D
5

240