Skip to main content
Topic: MUSICXML TO NOTEWORTHY CONVERTER (Read 16527 times) previous topic - next topic

MUSICXML TO NOTEWORTHY CONVERTER

This tool convert musicxml files to nwctxt files

- The input file must be a score-partwise musicxml file.
- The output file is a nwctxt file.
- Different voices are placed on different (layered) staves.
- For some features that aren't supported in NWC itself, a 'user object' is used. You may see a popup that alerts you to download
a missing plugin.

- Known issues:
  - Features that aren't supported in NWC and for which no user object exists or for which I can't determine the correct parameters,
  will give erroneous results, e.g. tuples other than triples, cross-staff beams and slurs.
  - Because of the layering, some notes, their accidentals or dots may overlap with each other. This can be fixed by setting
  the properties 'Extra Accidental Spacing', 'Extra Note Spacing' and/or 'Extra Dot Spacing'.
  - If you encounter other issues, please let me know.

This is a stand alone Windows program, not a classic nwc user tool, so you can't invoke it from within NWC.
You can download a Windows installer program in  https://www.opagust.be/?q=content/mxml2nwc.

In order to download the installation file, you'll now have to be logged in.
You may use an account I created:
- username: 'NWC User'
- password: 'Usertools'
Or you can create your own account, so you can be informed of future updates.
-Versions:
- 15/09/2021: 1.0: Original version
- 02/11/2021: 1.0.1: bug fixes

INSTALLATION:
    Download and run the installation file.
    During installation, the target folder is shown and can be modified.
    After installation, a shortcut 'MXML2NWC' will be created on your desktop.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #1
I'm getting this error when I try to run it.

(It took me a while to find the program. It would be nice if it gave the option of creating a shortcut on my desktop :) )

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #2
I'm getting this error when I try to run it.

(It took me a while to find the program. It would be nice if it gave the option of creating a shortcut on my desktop :) )

I'm looking into it.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #3
I'm getting this error when I try to run it.

(It took me a while to find the program. It would be nice if it gave the option of creating a shortcut on my desktop :) )

Hi Mike,

1) About the error:

One of the first things the tool does is looking into the Windows registry to find the folder for the object plugins (wich you can see in NWC via 'Tools/Options', tab 'Folders').
I'm searching with register key ' \HKEY_CURRENT_USER\SOFTWARE\NoteWorthy Software\NoteWorthy Composer 2\Folders' for an entry 'UserPlugins'. That always worked on my (Windows 10) computer. I don't know why it doesn't work on yours, but the error can easily be intercepted.

When the tool inserts an user object and the corresponding plugin is not found in the plugin folder, a popup is shown, saying "You need to download following object plugin: ...".
But the purpose is only to inform the user of a missing plugin, the user object itself will be present in the output file anyway.
So now I've changed the program to intercept that error and go on.
In that case you can get popups 'You need to download...' for one or more user objects, even if you already downloaded it.

2)About  finding the program:
During installation the target folder is shown and can be modified as well. But it can be easily overlooked, so I will explicitly state that.

3) About a desktop shortcut:
I've changed the installation procedure: a desktop shortcut 'MXMX2NWC' will be created. Unfortunately I couldn't find out how to include it as an option,so it will always be created.

Go to  https://www.opagust.be/?q=content/mxml2nwc to download a new Windows installer for the new version of the program.

I'm looking forward for your feedback.

Gust
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #4
Thanks for the response. First, I will let you know that I got the tool to run, and I will be testing it on several MusicXML files shortly.  Next, I'll let you know what I discovered about the error.

When I examined the registry path you gave, it was empty on my system (that is, it contained only (Default) with (value not set).  I ran NWC and went to Tools > Options... > Folders and there was an entry for Object Plugins, which listed ":programdata:\Noteworthy Software\nwc2\UserPlugins". Just for fun, I highlighted this entry and clicked Modify... and then clicked OK without changing anything. I then reran RegEdit32 and lo and behold, there was now a string named UserPlugins in that key, with the expected value.  So it appears that NWC will create the string once you modify a folder value from its default. (I should mention that I recently had to reinstall Windows 10, and hence NWC, so my system was in a "clean slate" mode.)  I would suggest that if you don't find a UserPlugins string in the registry, that you could assume the default user plugin location that NWC uses.

Thanks again for the quick turnaround.

Mike

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #5
I would suggest that if you don't find a UserPlugins string in the registry, that you could assume the default user plugin location that NWC uses.

I note that suggestion, but I'll wait a little longer to implement it until I get the results of your further testing.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #6
I tried to convert a file from Capella 7 to MusicXml and then to NWC. Unfortunately, there's some hiccup - is this the right place to ask? I have added the XML file (as a zip) as well as the error I encounter ...

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #7
I tried to convert a file from Capella 7 to MusicXml and then to NWC. Unfortunately, there's some hiccup - is this the right place to ask? I have added the XML file (as a zip) as well as the error I encounter ...

H.M.
This is the right place to ask.
I'll look into it.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #8
Found and corrected the error (Decimal number were I supposed an integer).

The new version (1.0.1) is available on https://www.opagust.be/?q=content/mxml2nwc
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #9
First of all, thanks! - and wow!!! - this is and will be really, really helpful for me: In Germany, laymen's scores are mostly written in Capella. Being able to get them into NWC is great (even though there's some work to be done afterwards to clean up, of course - depending on the quality I want to get).

There's one thing that I would think about: The installer is not signed, and so it complains about an "unknown publisher". I feel that I would not recommend this program to anyone with the advice "just click on advanced and install anyway" (even though I did this, of course). A "right" solution is of course to purchase a code-signing certificate (quick googling found $83/year, less if purchased over 3 years, at https://cheapsslsecurity.com); but I've never done this, and the process (identity verification) might be a hassle? Publishing the Python script and a starter .cmd/-bat file, with additional instructions on how to install Python might be another, and simpler, way to go ...

Last, the 1.0 version is now quite useless on the website, isn't it?

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #10
  • Thanks for your positive respons.
    Because I never found a unambiguous syntax description for MXML files, I had to develop this tool with trial and error, testing with files from different sources.
    I did not know about XML files generated by Capella before, so I'm glad it worked out so well.
  • As to the 'unknown publisher' fact: My website has no commercial intention. The majority of the downloads are NWC related, and I suppose the NWC users 'know' me enough from the forum. The other downloads are intented for my personal friends and family (but  not exclusively of course).  So if someone cancels the install process because I'm unkwown, so be it.
  • Removing the 1.0 version before I got a positive respons seemed a little premature.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER - the next experiment

Reply #11
Granted, everything  :))

A much more brutal experiment: I found an open source OMR ("optical music recognition") program called Audiveris on GitHub. I took a somewhat complicated score - it is a modified version of John Rutter's "Dormi Jesu", which we currently rehearse in our choir, which I have written with NWC (we had to change a few things, because of SSAB, and because ... well ...) ---> see attachment "20210922-ch+p.Rutter_DormiJesu.pdf".

Audiveris creates .omr files. In this case, the resulting OMR file has about 1,5 MB (also when zipped - seems to be some image file format), so I couldn't append it here.

Audiveris can export to MusicXML, so this is what I did. The result is a .mxl file, which is a zipped XML file ---> see attachment "20210922-ch+p.Rutter_DormiJesu.mxl.zip" - I zipped the MXL, because the forum does not accept .mxl files. Opening the .mxl with MXML2NWC does not work - it seems that it does not see that this is a zipped file which needs unzipping (and yes, MXML2NWC does not accept .mxl as a standard extension for files it wants to open, so this is an "advertised feature"). Still, I have the (small) feature request that .mxl files are accepted, i.e. unzipped and then worked on the XML.

Manual unzipping of the .mxl yielded an XML file, which MXML2NWC actually digested, with a host of messages which I ignored (and did not read; and maybe would not have understood). Still, it created an NWCTXT file which is actually "usable" in the sense that one can extract substantial parts from it in NWC (which is the whole idea of OMR).

I also opened the .mxl file coming out of Audiveris in Musescore. Musescore complained that this was not a valid MusicXML file, but after pressing "Ignore" it also gobbled it up and created a score, which I again exported as MusicXML ---> see "20210922-ch+p.Rutter_DormiJesu_ReexportedFromMusescore.mxl.zip. Once more, I had to manually unpack the .mxl. Now, when I gave this to MXML2NWC, it ran into some Pythonian error.

I daresay I would be interested that this process works - even if with problems and lost information and whatever ... it might help me to create more musical renderings from scores lying around. Is there any possibility to improve, a little, on the problems above?

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #12
Accepting (unzipped) .mxl files will be a piece of (apple) cake.

I will soon download, unzip and run your files to see what messages and error they will generate.
And hopefully I will be able to explain the messages and correct the error.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #13
The new version (1.0.2) is available on https://www.opagust.be/?q=content/mxml2nwc

Quote
I zipped the MXL, because the forum does not accept .mxl files. Opening the .mxl with MXML2NWC does not work - it seems that it does not see that this is a zipped file which needs unzipping (and yes, MXML2NWC does not accept .mxl as a standard extension for files it wants to open, so this is an "advertised feature"). Still, I have the (small) feature request that .mxl files are accepted, i.e. unzipped and then worked on the XML.
A zipped *.mxl file is now accepted as input. An unzipped *.xml file will be generated and processed. The *.xml file will be saved  in the same directory as the input file.

Quote
Manual unzipping of the .mxl yielded an XML file, which MXML2NWC actually digested, with a host of messages which I ignored (and did not read; and maybe would not have understood).
When I unzipped your first file and used it as input for MXML2NWC, I had 2 popups with an error message 'Invalid Chord Error' with techincal information, that I happened to understand. Twice it concerned a generated nwctxt line that was not a legal NWCTXT object.
With the information in the popups I could find the cause in the input file: in 2 places a chord with two identical chord elements.
In this new version I replaced the error popups with information (see attachment) wich is hopefully more readable. It contains the staff name and measure number, the erroneous nwctxt line and the one that was generated instead.

Quote
I also opened the .mxl file coming out of Audiveris in Musescore. Musescore complained that this was not a valid MusicXML file, but after pressing "Ignore" it also gobbled it up and created a score, which I again exported as MusicXML ---> see "20210922-ch+p.Rutter_DormiJesu_ReexportedFromMusescore.mxl.zip. Once more, I had to manually unpack the .mxl. Now, when I gave this to MXML2NWC, it ran into some Pythonian error.
The Pythonian error when using your second, Musescore, file,- was again due to the presence of a decimal number where my program expected an integer. I fixed that and also a few other places where I thought a decimal number could be admitted. After running this new MXML2NWC version on your 2nd file, I got the same 2 popups as for your 1st file, so my conclusion is that the reason is due to the output of Audiveris.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #14
Thank you! - and onwards, to new enterprises:

a) I just scanned a modern transcription of a four-movement symphony of the obscure German composer Otto Carl Erdmann Duke of Kospoth (1753-1817). His great-great-great-nephew or something lives in our town, and for a birthday of the old gentleman I'll play a piano reduction I wrote ... but I'd also like to have the symphony played with some nice soundfonts (I'll try Sonatina Orchestra), and for this, I need the whole score. Instead of writing it, I'll try Audiveris + MXML2NWC! I'll write a separate reply for this.

b) In the attachment are (in a single .zip) two more .mxl files produced by Audiveris. The input for this was a scan of Ruth Elaine Schram's arrangement of "Go, Tell It On The Mountain" (see http://www.hmmueller.de/Scans/RuthSchram_GoTellItOnTheMountain.pdf - "permanently out of print", according to the publisher). I'd like to create a rehearsal voice/mp3 for a soloist singer from this via NWC. Audiveris produces two "movements", where the latter is the separate coda starting on the last page but one. Giving the first file to MXML2NWC 1.0.2 unfortunately creates another Python stacktrace ... Maybe you could look into this.

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #15
Kospoth's symphony worked nicely* for the 1st, 2nd and 3rd movement. The mxls produced by Audiveris already have a fair share of problems (however, some are from untypical notations in the score), but the result is quite usable. However, the 4th movement stumps MXML2NWC 1.0.2 (I hope - I just installed it over the previous one; does the installer replace it? ... it would be nice if there were a version info somewhere), with another Python error. The zipped .mxls are in the attachment (however, due to renaming, the XMLs stored inside the mxls do have strange names from my scanning operation - I hope this is fine).

* However, there are a few things where I stumble
a) The first staff of each NWCTXT contains "a million" PgTxts at  the start (see NWCTXT result of second movement in the attachment).
b) When opening, the files require a font "Default" which I apparently don't have.
c) Opening another .mxl file often (always?) crashes MXML2NWC later. You can try it with the symphony: First, convert and save movement 1; then, press "SELECT ..." again and open movement 3. "CONVERT" will result in an error - see attachment.

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #16
b) In the attachment are (in a single .zip) two more .mxl files produced by Audiveris. The input for this was a scan of Ruth Elaine Schram's arrangement of "Go, Tell It On The Mountain" (see http://www.hmmueller.de/Scans/RuthSchram_GoTellItOnTheMountain.pdf - "permanently out of print", according to the publisher). I'd like to create a rehearsal voice/mp3 for a soloist singer from this via NWC. Audiveris produces two "movements", where the latter is the separate coda starting on the last page but one. Giving the first file to MXML2NWC 1.0.2 unfortunately creates another Python stacktrace ... Maybe you could look into this.

H.M.

The Python stacktrace was due to the fact that Audiveris interpreted a chord symbol as a lyric syllable in lyric line 3 on a staff without  lyric lines 1 nor 2.
So in the next version of MXML2NWC  (coming soon, I hope), I will ignore lyrics assigned to lyric lines that  are 'out of order'.

P.S. I managed to download and install Audiveris. I used your pdf as input and I saw a lot of pink areas after transcription. I think these are the places where Audiveris had some difficulties to correctly 'read' the score and as a consequence may lead to incorrect areas  in the resulting NWCTXT file after running MXML2NWC.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #17
Kospoth's symphony worked nicely* for the 1st, 2nd and 3rd movement. The mxls produced by Audiveris already have a fair share of problems (however, some are from untypical notations in the score), but the result is quite usable. However, the 4th movement stumps MXML2NWC 1.0.2 (I hope - I just installed it over the previous one; does the installer replace it? ... it would be nice if there were a version info somewhere), with another Python error. The zipped .mxls are in the attachment (however, due to renaming, the XMLs stored inside the mxls do have strange names from my scanning operation - I hope this is fine).

* However, there are a few things where I stumble
a) The first staff of each NWCTXT contains "a million" PgTxts at  the start (see NWCTXT result of second movement in the attachment).
b) When opening, the files require a font "Default" which I apparently don't have.
c) Opening another .mxl file often (always?) crashes MXML2NWC later. You can try it with the symphony: First, convert and save movement 1; then, press "SELECT ..." again and open movement 3. "CONVERT" will result in an error - see attachment.

H.M.

The new version (1.0.3) is available on https://www.opagust.be/?q=content/mxml2nwc

  • Yes, the installer replaces the previous one.
    The window title bar now shows the version number.
  • I fixed the errors. The first one (list index out of scope) was a real bug. The second one was a beam property 'backward hook' that NWC can't digest. Unknown beam properties will now be ignored.
  • The "million" PgTxts are derived from the <credit-words> tags in the xml file. Audiveris seems to create these tags for everything that it can't recognize as musical symbol? Example:
     "<credit-words default-x="1686" default-y="11" font-family="sans-serif" font-size="198" font-weight="bold">—-—wv—~'—-</credit-words>"
  • The font 'Default' is derived from the tag "<lyric-font font-family="Default" font-size="10"></lyric-font>". I now replace it with 'Times New Roman'.
  • Opening an converting more than one file in the same run can cause some problems. Probable cause is that some variables are not properly restored. I found it to much effort to spit this out, so now I keep the select button disabled after opening a file. So you'll have to exit and restart the program, which seems to me not a big effort to ask for.
  • Your fourth movement prodced a lot of popups for invalid chords (caused by identical chord members in one chord object). So I replaced the multiple popups by showing these warnings in one extra window, tat doesn't halt the execution.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #18
Great - all items fine (especially, reopening the converter for more files is really no problem).

So, I now try to use the results to create a useful score. My initial experience with the "Go, tell it" score is: Not a nice job. The voices are not separated as one would hope - sometimes two-voice chords in a staff, but a few notes spill into another staff; long slurs and cresc/decresc, with many haphazard texts in between; and at times there are missing notes or dots, leading to too short measures.

It might be that a more useful process is actually: Remove everything except notes and rests (probably with a user tool), create a correct "naked score" from these; and finally add all the "small things" (and not so small ones) - either manually or, at a few places, by copying something over from the "ORM-ed" score.

The whole enterprise is certainly not for the faint-hearted, at least with this Audiveris+Converter pipeline; where the main "problem", but also "heavy-weight-lifter" is Audiveris: What it can and cannot do essentially defines the result. So be it. I'll see what I learn ...

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #19
It might be that a more useful process is actually: Remove everything except notes and rests (probably with a user tool), create a correct "naked score" from these; and finally add all the "small things" (and not so small ones) - either manually or, at a few places, by copying something over from the "ORM-ed" score.

The whole enterprise is certainly not for the faint-hearted, at least with this Audiveris+Converter pipeline; where the main "problem", but also "heavy-weight-lifter" is Audiveris: What it can and cannot do essentially defines the result. So be it. I'll see what I learn ...

Indeed, I agree that the output of Audiveris is the main problem here.
Maybe I can add a window to MXML2NWC where you can select/deselect the item types to convert ?

As for the sometimes missed notes or dots: In audiveris the measures that are too short after the transcription are colored pink, so that should be a help to locate them quickly in the nwctxt file.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #20
Just a short "still working on it" message: I'm right now converting scans of modern prints of the 4 movements of a Kospoth symphony (2 oboes, 2 horns, strings) to NWC.

My process will require two passes through the NWC score: The first one makes all the notes and measure lengths correct - i.e., all notes are where they belong; the second is the fine-tuning process. I'm right now in the first pass, where I learn that Audiveris sometimes ignores (or despairs on) complete pages; first, I rewrote such missing segments manually - but now, I let Audiveris do another scan of that single pages - it comes out roughly right, so that after running it through MXML2NWC, I can paste in the respective segments (what is sorely missing for this from NWC, is vertical - mutli-staff - marking and copy/paste).

Right now I work with a single screen, but this is somewhat tedious. Tomorrow, I'll try two screens - one for the source PDF, the other for NWC.

Re selecting/deselecting item types, right now "Global Modification (adp)" with DELETE is sufficient; at one point I also did a F3-Del-Sequence. What might be helpful, is a switch to remove the "System Break" marks from bar lines - the NWC score will definitely be laid out differently.

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #21
Hi, Heinrich.
Just a short "still working on it" message on my behalf:
I'm working on version 1.1 of MWML2NWC, in which the conversion is done in 3 phases: analyse, setup and convert.
In the setup phase a window with 2 tabs is shown, that enables the user to setup the Title Page layout and the staff properties, see attachments.
I will add a checkbox for system and page breaks.
Any further suggestions from your side are very welcome.

I also added a 'Loggings' and 'Warnings' frame that are filled during the conversion, see third attachment.

Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #22
All this looks good. One more thing would be nice: A checkbox that suppresses custom note velocities on dynamics - I might want to use NWC's standard values. I'll now try to "conduct" (add agogics, volume, velocity, tempo, ornaments, ...) to the four symphony movements = this has not much to do with MXML2NWC.  After that, I'll try the process with another symphony - I have three or four more scans lying around here!

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #23
Help !  This error message means nothing to me !


Any help appreciated.


Rich.
Rich.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #24
Help !  This error message means nothing to me !


Any help appreciated.


Rich.
Hello Rich,

Can you attach or send me the input file?
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #25
Sent

R.
Rich.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #26
Hi Richard,

The error occurs in the first measure, when trying to determine the length of the first element. This is done  by means of the <duration> element.

Excerpts from the musicmxl reference:
<duration>:
"Duration is a positive number specified in division units."

<divisions>
"Parent element: <attributes>
Musical notation duration is commonly represented as fractions. The <divisions> element indicates how many divisions per quarter note are used to indicate a note's duration. "

<attributes>
"The <attributes> element contains musical information that typically changes on measure boundaries. This includes key and time signatures, clefs, transpositions, and staving."

So, in order to determine the length of a note or rest, the division unit must be known, which is part of a <attributes> element.
In your file, the first <attributes> element occurs for the first time in measure 6, so the division unit is not known before that.

When I moved the <attributes> element to the start of measure 1 in your xml file, the error didn't occur anymore.
I'll send you a personal mail with the corrected xml file and the resulting nwctxt file (happy tune, by the way).
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #27
Hi Opagust,

Thank you.  I shall continue to test where I am able to.

A question following on from this please.
I think the error occurred because in the original pdf file, the voice staff does not start until the second system.
Therefore the program that generated the mxl file did not place any duration information for the voice line until the second system (measure 6).

There are many songs where either voice or an instrument starts at a later measure, and the xml generating program will only show duration info t the point the music for that staff starts. However, the staff is placed there at the beginning giving the error you have described.

Are you planning to overcome this in a later version of your program or will it be expected that a user tries to edit the mxl file in text editor in order to resolve the problem.  ( I probably would not know what to look for !)

Nice job by the way  look forward to further versions.


Cheers

Rich.

Rich.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #28
Hi Rich,

As I said, I'm working on the next version.

I think it's not too difficult to include a 'look ahead' and search for a divisions element further in a staff, before starting to  process the first measure.
That should solve the problem.

I hope to publish the next version soon.

In the meanwhile, if you have the same problem in another xml file:
- Open the file in a text editor and look for the first occurence of  '<attributes>
- Before that you'll find a preceding line with '<measure number =...'
- If it's the same error situation, that measure number will be > 1.
- Then copy all the lines from '<attributes>' to '</attributes>', as in your file:
Code: [Select · Download]
	
<attributes>
<divisions>2</divisions>
<key>
<fifths>-4</fifths>
</key>
<clef>
<sign>G</sign>
<line>2</line>
</clef>
</attributes>
- Now look higher in the file for a line with '<measure number="1">'
- Paste the copied lines after that line
- Save the file with another name.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #29
Version 1.1 is now available on https://www.opagust.be/?q=content/mxml2nwc

Changes are:
    - Some bug fixes.
    - Revised lyrics treatment.
    - The input file name can be passed as command line argument.
    - Major changes:
        * After the input file is selected, it will be analysed and a setup window is presented.
        * Via this setup window, one can set options, configure the title page and deselect/select parts, change
            the staff properties and start or cancel the conversion process.
        * Two frames for loggings and warnings are added.
        * A new button to directly open the saved file in NWC.
        * Help buttons on main window and on each tab of the etup window.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #30
And here is the Help text :

- The input file must be a score-partwise musicxml file; extensions: .musicxml, .xml or .mxl. Files with
    extension *mxl are compressed but will automatically unpacked in a .xml file.
- The output file is a nwctxt file.
- Different voices are placed on different (layered) staves.
- For some features that aren't supported in NWC itself, a 'user object' is used. You may see a popup that alerts you
  to download a missing plugin.

Upon installation a shortcut icon was created on your desktop. You can drag and drop a musicxml file upon that icon,
or double click it and manually select the file to be converted via the button 'Select a musicxml file'.

The processing consists of a few consecutive stages, which are logged in the 'Loggings' frame.
There's also a 'Warnings' frame to draw your attention on possibly incorrect input or processing. Each warning always
includes the staff name and measure number.

The input file is read and analysed, after which a 'Setup' window appears.
This will give you the opportunity to:
 - Check or uncheck some processing options via the 'Options' tab.
 - Tune the title page, via the 'Title Page' tab.
 - Deselect parts, change staff properties and/or deselect lyric lines, via the 'Staves' tab.
More detailed help info is available via the help buttons on these tabs.

After pressing 'CONVERT' on the setup window, the conversion process is started.
When the conversion is completed, you can save or 'save as...' the output file.
Next you can directly open that file in NWC (without leaving the program), via the appropriate button (on condition
that NWC is installed in 'C:/Program Files (x86)/Noteworthy Software/NoteWorthy Composer 2/NWC2.exe').
If you had warnings in the warning frame, you can easily switch between MXML2NWC and NWC to check these measures.


And the help windows for the setup tabs in attachments:
Always look on the bright side of life!

 

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #31
(on condition that NWC is installed in 'C:/Program Files (x86)/Noteworthy Software/NoteWorthy Composer 2/NWC2.exe').
Well, you can look in the registry where NWC2 is installed.
E.g.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\NWC2.EXE\shell\nwc2\command
or
HKEY_CLASSES_ROOT\nwctxtFile\shell\nwc2\command

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #32
Well, you can look in the registry where NWC2 is installed.
E.g.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\NWC2.EXE\shell\nwc2\command
or
HKEY_CLASSES_ROOT\nwctxtFile\shell\nwc2\command

Thanks, Flurmy!

I updated and replaced version 1.1
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #33
Hello Opagust,

I have tried out your converter on a score that I created in MuseScore some time ago for our choir, namely Randall Thompson's "Alleluia". For the most part it created a very faithful rendition, comparing side by side with the page view in MuseScore. There were a few anomalies:
  • I was informed that there were 3 unknown user objects in the score. Going to Manage Objects... I saw the unlikely names of Pos:11.612, Pos:16.046 and Pos:5.522.  Opening the nwctxt file in a text editor, I searched for these strings and found the following elements:
    Code: (nwc) [Select · Download]
    |Text|Text:dolcissimo
    |Pos:5.522|Font:StaffItalic

    Code: (nwc) [Select · Download]
    |Tempo|Tempo:50|Text:Meno mosso
    |Pos:11.612|Font:StaffBold

    Code: (nwc) [Select · Download]
    |Text|Text:espressivo
    |Pos:16.046|Font:StaffItalic

    It looks like your converter inserted a stray newline for those three elements.  I decided to look at the MusicXML file to see whether there were newlines after those elements, and indeed there were. I deleted the trailing newlines and reimported the score, and there were no extraneous user objects. Perhaps your converter could strip any trailing newlines from text elements to prevent this from occurring.
  • There were a few instances of incorrectly applied slurs, where the slur did not extend far enough. The slur looks correct in MuseScore, and I did not try to decode what was in the MusicXML file to see if that was causing the problem. If you wish, I can forward the .mxl file to you (along with the MuseScore score, if that helps).
Thanks again for creating this very useful tool.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #34
A great tool - very helpful right now for getting (parts of) PDFs via Audiveris to NWC, for my crank organ arrangements.

I have another problematic MXL file; Audiveris already stumbles on many things in the score, creates a "corrupted" MXL, which I could load into MuseScore and then "beautify" a little. However MXML2NWC then exits with an exception ... I have attached the error message and the MXL file - hopefully you can see what the problem is!

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #35
If you wish, I can forward the .mxl file to you (along with the MuseScore score, if that helps)

Yes, that would be helpful. And can you also tell where the slurs didn't extend far enough?
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #36
A great tool - very helpful right now for getting (parts of) PDFs via Audiveris to NWC, for my crank organ arrangements.

I have another problematic MXL file; Audiveris already stumbles on many things in the score, creates a "corrupted" MXL, which I could load into MuseScore and then "beautify" a little. However MXML2NWC then exits with an exception ... I have attached the error message and the MXL file - hopefully you can see what the problem is!

H.M.

The error is caused by these elements in part 'P1':
Code: [Select · Download]
    <measure number="36" width="187.79">
      <attributes>
        <clef>
          <sign>F</sign>
          <line>5</line>
          </clef>
        </attributes>

The 'sign' and 'line' elements are used to determine a key for this dictionary in my program :
Code: [Select · Download]
CLEF_SIGNS = {
    'G,2': 'Treble',
    'F,4': 'Bass',
    'C,3': 'Alto',
    'C,4': 'Tenor',
    'percussion,None': 'Percussion'
}is


So 'F,5' is an invalid key.
IMHO this can be caused by:
  • The score has a bass clef positioned one line above the 'normal' bass clef. NWC does not support it, neither does my program.
  • Or: Audiveris incorrectly read the position. (In part 'P2', measure number "0", I found  a normal 'F,4' clef)

So maybe I could change my program to ignore the line number (except for the 'C' clefs) and print a warning if the line number differs from the 'normal' one? 
 

Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #37
Thanks for your analysis!

...Or: Audiveris incorrectly read the position. (In part 'P2', measure number "0", I found  a normal 'F,4' clef)...
So maybe I could change my program to ignore the line number (except for the 'C' clefs) and print a warning if the line number differs from the 'normal' one? 
Audiveris definitely finds clefs - especially bass clefs - at astonishing places, e.g. if an eighth flag has a few pixels missing or so. So it would, in my opinion, be the best thing to simply ignore such "impossible clefs".

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #38
Theoretically, in the dreaded "setticlavio" (seven clefs), there are four position for the C clef (Soprano, Mezzosoprano, Contralto, Tenore) and two positions for the F clef (Baritono and Basso) (and just one for the treble clef!  ;D ).
But I never saw a treble or bass clef in any other position than the usual, and anyway NWC doesn't allows for all of them, so I agree with you.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #39
Version 1.1.1 is now available in https://www.opagust.be/?q=content/mxml2nwc

Changes:

    * More permissive treatment for 'line' value in the 'clef' element
    * Omitting linebreaks in 'Text' objects.
    * Bug fix in slur processing
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #40
Version 1.1.1 is now available in https://www.opagust.be/?q=content/mxml2nwc

Changes:

    * More permissive treatment for 'line' value in the 'clef' element
    * Omitting linebreaks in 'Text' objects.
    * Bug fix in slur processing

I'm seeing the correct slur handling for the sample file I sent you, but I'm getting the same mangled |Text and |Tempo objects as before (line break inserted before |Pos)
Edit: My bad, I just realized that the sample file I sent you already had the line breaks stripped out  :-[  Let me forward a copy of the original XML that hasn't been fixed.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #41
I'm seeing the correct slur handling for the sample file I sent you, but I'm getting the same mangled |Text and |Tempo objects as before (line break inserted before |Pos)
Edit: My bad, I just realized that the sample file I sent you already had the line breaks stripped out  :-[  Let me forward a copy of the original XML that hasn't been fixed.
Hi Mike,
Let this be a comfort for you: I also made a mistake. I tested on '/n' instead of '\n'.

Version 1.1.1 is now updated.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #42
Are you certain you uploaded the new file to your website? I downloaded and reinstalled the program, and I'm getting the same behavior as before.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #43
Are you certain you uploaded the new file to your website? I downloaded and reinstalled the program, and I'm getting the same behavior as before.
Shame on me :-[ !
I downloaded and reinstalled it myself and you're absolutely right.
I suppose I forgot to push te save button after uploading the new version.

I now have changed the version number to 1.1.1.0, uploaded this version to my website, pushed the save button, then downloaded and reinstalled it on my computer and tested it on your file and it seems now to be OK.
I sincerely hope you agree with me.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #44
I do agree with you :) Everything looks good this time.  Thanks again for the fixes and improvements.

Mike

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #45
Congrats to you Opagust - Your converter gets better and better.

I wonder if you would consider looking at each staff in turn and removing the key signature if it is the same as the previous key signature on that staff.

If you keep exactly the same page structure as the mxl file, then this would not be a problem, but the chances are that once converted to NoteWorthy, the page structure will be different and so you would not want a key signature to be shown mid system.

Thanks for the consideration.

Rich.
Rich.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #46
This has now, in a very short time, become a standard tool that I use heavily with IMSLP scores (and, recently, paper scores I got from my trumpetist): The chain Audiveris -> Musescore -> MXML2NWC typically delivers enough pieces of a scanned score to NWC that the result is useful.

- Audiveris often delivers very patchy and weird results; but still, complete melody and bass lines can often be extracted from the result (sometimes assembling them from two or three staves) to save a fair lot of typing time.
- The intermediate Musescore step (open MXL, save it anew) usually roughens out a few problems that Audiveris has with MXL files.
- I usually start with a new NWC file from scratch, put the MXML2NWC-created NWCTXT in a second window, "tile" both - and copy-pasting starts.

H.M.

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #47
New version 1.1.2 available on https://www.opagust.be/?q=content/mxml2nwc.

Changes:
* Superfluous key signatures are not converted.
* Bug fixed for percussion clef.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #48
@Richard Woodroffe send me the screenshot of an error.
It concerned a page-layout tag without a margins tag.
I fixed it so that this situation is intercepted.

New version 1.1.3 available on https://www.opagust.be/?q=content/mxml2nwc.
Always look on the bright side of life!

Re: MUSICXML TO NOTEWORTHY CONVERTER

Reply #49
Again @Richard Woodroffe informed me of an error: after changing the name of a staff in de setup window, the lyrics of that staff were not saved.
Thanks, Richard, for your clear explanation of what changes you had made, so I could quickly find and fix the error.

The new version 1.1.4 is now available in https://www.opagust.be/?q=content/mxml2nwc
Always look on the bright side of life!