Skip to main content
Topic: NWCCONVERTOR (Read 57745 times) previous topic - next topic

NWCCONVERTOR

With this program you can convert NWC text files to Musicxml files and vice versa.
You can download it athttps://www.opagust.be/?q=content/nwcconvertor
In order to download the file, you'll 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.

INSTALLATION:
    Download and run the installation file. (REMARK: The name of the file after the download can (depending on the browser used) differ from the file name on the download page. If necessary you should add the extension.)
    During installation, the target folder is shown and can be modified.
    After installation, a shortcut 'NWCCONVERTOR' will be created on your desktop.

___________________

The first time tou run this program, you'll see the options window. When you click 'OK', your choices will be saved.

On the main window you see a row of action buttons, a loggings frame and a warnings frame.
In the loggings frame the stages of the processing are shown, the warnings frame is used for reporting situations
that demand your attention.
Depending on the progress of the processing, each button will be enabled or disabled.

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

- The input file must be a either a NWC text file (extension '.nwctxt') or a musicxml file (extensions: '.musicxml',
  '.xml' or '.mxl'. Files with extension .mxl are compressed files; they will automatically be unpacked in a .xml file.
- A musicxml file is converted into a '.nwctxt' file.
- A nwc file is converted into a '.musicxml' or '.xml' file (according to the options).

The input file is analyzed and a setup window is displayed. The setup window consists of 2 tabs: a titlepage tab and
a staves/parts or part/staves tab. They differ according to the direction of the conversion.
Press the appropriate button on the right side to show detailed explanation.

After pressing 'CONVERT' on the setup window, the conversion process is started. Press the appropriate button to show
detailed information concerning the conversion for each direction.

When the conversion is completed, you can save or 'save as...' the output file. The file name is determined as follows:
 - the dot of the extension is turned into a dash:
 - the extension is added:
    ° '.nwctxt' for the Musicxml -> NWC conversion,
    ° the extension from the options for the NWC to Musicxml conversion.

Next you can directly open that file without leaving the program, via the button 'OPEN the converted file'.
The file will be opened within the program you specified in the options.

Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #1
Downloaded!  :D  - but I don't know when I'll try it or need it ... at the moment, unmusical things are in the way ...

H.M.

Re: NWCCONVERTOR

Reply #2
Got it.  No time tonight to explore, but I've downloaded it at least - thanks mate.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: NWCCONVERTOR

Reply #3
Download worked fine (a bit slow), but Win10 just named it "download" - I had to rename it to the name you gave it. You might want to look into that. Haven't run the installer yet - I'll let you know if there are any issues when I get to it, but it's probably going to be much later in the day.

Re: NWCCONVERTOR

Reply #4
To begin with: thank you!  :)

Then, in case you want to process automatically also the .nwc files, you can ask NWC itself.
Quote
-convert: This option can be used to convert a file from one format to another.
Usage: nwc2.exe -convert "[input-file]" "[output-file]"

Both files are required on the command line and the file extension determines the conversion.
Supported conversions include:
.nwc    -> .nwctxt, .mid, or .info
.nwctxt -> .nwc, .mid, or .info
Conversions to .mid support a "-0" option for type 0 files.

Re: NWCCONVERTOR

Reply #5
Download worked fine (a bit slow), but Win10 just named it "download" - I had to rename it to the name you gave it. You might want to look into that. Haven't run the installer yet - I'll let you know if there are any issues when I get to it, but it's probably going to be much later in the day.
Actually, this happened to me too...
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: NWCCONVERTOR

Reply #6
Installation went OK (after assuring Windows that it wasn't going to destroy my hard drive or steal my identity). However, a simple .nwctxt file (a song for voice and guitar) generated multiple errors and refused to convert to musicxml after several tries. The error log is apparently uncapturable from the program; I'd be willing to send you a copy of the log if you release a new version with an option to save the log as a text file. In any event, this version of nwcconvertor will be deleted, and  I'll go back to  using http://nwc2musicxml.appspot.com/. Too bad: if it worked, it would be a great addition to my tool set.

Re: NWCCONVERTOR

Reply #7
Installation went OK (after assuring Windows that it wasn't going to destroy my hard drive or steal my identity). However, a simple .nwctxt file (a song for voice and guitar) generated multiple errors and refused to convert to musicxml after several tries. The error log is apparently uncapturable from the program; I'd be willing to send you a copy of the log if you release a new version with an option to save the log as a text file. In any event, this version of nwcconvertor will be deleted, and  I'll go back to  using http://nwc2musicxml.appspot.com/. Too bad: if it worked, it would be a great addition to my tool set.
If a 'real' error occurs, a popup is shown and the program is aborted. So there is now way to save that log within the program. But then you can copy that popup within Windows.
In the program itself there is e logging frame that logs the actions that were performed, it isn't an error log. Next to it is the warning frame, that shows 'possible' errors or that things that couldn't be converted. You can always copy that via CTRL-A, CTRL-C.

But the simplest way to solve this is that you send me a copy of the input file. I have send you a personel message with my email adress.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #8
Download worked fine (a bit slow), but Win10 just named it "download" - I had to rename it to the name you gave it. You might want to look into that. Haven't run the installer yet - I'll let you know if there are any issues when I get to it, but it's probably going to be much later in the day.

I was already informed about this via a comment on my website. It has apparently to do with the way your browser handles the download. I found out that Google Chrome named it 'dowload'. Indeed you have to add the extension '.msi' to execute it.
In Firefox, you get a random name, but with the right extension, so you can execute it. I didn't try any other browsers.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #9
To begin with: thank you!  :)

Then, in case you want to process automatically also the .nwc files, you can ask NWC itself.
Thanks, Flurmy.

I'll have to find out how to invoke that within my Python program and receive a result. But a user can always open a nwc file in NWC and save it as a nwctxt file.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #10
Hmmm,   Downloaded andinstalled.

Clicked on NWCCONVERTER Icon.  Error message straight away. This was without trying to load any file, but just on clicking the icon.
Picture attached.
I tried downloading and installing a second time with the same result .

Fortunately, the install did not overwrite the older mxml2nwc program and so I have reverted to using that.
Incidentally, I too have always had the "download" naming problem both for this and the previous program and have always had to copy the name before clicking it to download and then renaming.

Richard


Rich.

Re: NWCCONVERTOR

Reply #11
It looks a lot like the installer is searching some files... in the disk of Opagust!  :D  (absolute paths)

Incidentally, I too have always had the "download" naming problem both for this and the previous program and have always had to copy the name before clicking it to download and then renaming.
So do I, but since I'm using an old version of Firefox and XP it looked normal.  ;D

Re: NWCCONVERTOR

Reply #12
The first update with bugfixes is available at https://www.opagust.be/?q=content/nwcconvertor

- 1.0.1: Bugfixes:
    - Interception FileNotFoundError when looking for register entries (bug reported by @Richard Woodroffe)
    - Recalculation of measure length for voice numbers > 1 (bug reported by @William Ashworth)
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #13
Confirm update has solved my problem.  nwcconverter now loads OK (But not had time to test yet)

Richard
Rich.

Re: NWCCONVERTOR

Reply #14
Thanks, Opagust. I'll try to find time to test it later today.

Re: NWCCONVERTOR

Reply #15
It looks a lot like the installer is searching some files... in the disk of Opagust!  :D  (absolute paths)

Well, it looks like but it's a bit more complicated (sofisticated?) than that. The installation file is created via the Python module cx_freeze.
When you run the installation file, not only an executable is created from the source files, but also copies of the source files and their original file names. Not to search for them, but to create a popup window when a fatal error occurs, in which the author (me in this case) is informed which instructions lead to the error, with file name and line number. And that helps me a lot to quickly find the cause of the error.
But as a consequence, the user can see some absolute paths from my computer.
So, if you can hack my computer, you'll know where to look if you want to solve the error yourself.  ;D
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #16
I added this text on my website:
Quote
REMARK: The name of the file after the download can (depending on the browser used) differ from the file name on the download page. If necessary you should add the extension.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #17
Version 1.0.2 is available at https://www.opagust.be/?q=content/nwcconvertor.

- 1.0.2: Bugfixes:
    - Clef, time and key were duplicated in further staves.
    - Correction test for inserting invisible rests.
    - Handling of quotes in text fields.
    - Interception of missing 'volume' in midi-instrument-tag.
    - Correction of processing last bar line of a staff.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #18
Very slow download, indeed.
What's up, doc?

Re: NWCCONVERTOR

Reply #19
Very slow download, indeed.
What's up, doc?
It's 38.6 Mb.
What do you mean by 'slow'?

I can't get out of my sofa before the download has ended.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #20
23'12"...
And I tried three times in different moments.

Re: NWCCONVERTOR

Reply #21
8"
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #22
FYI I just tried a test download and got 8" too, 'n I'm in Oz

Maybe @Flurmy has some comms issues between where is and where Opagust's hosting service is.

I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: NWCCONVERTOR

Reply #23
I'm confused here by the time notation. Is Flurmy saying 23 minutes and 12 seconds, or 23 hours and 12 minutes? And are the rest of you saying 8 minutes or 8 seconds?

I generally would use : notation, but I realize that can be ambiguous also, unless you specify all 3 numbers.

Re: NWCCONVERTOR

Reply #24
8 seconds.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #25
A separate reply about the download. A number of people (including myself) have observed/complained that when they download the file, it gets the filename "download" rather than the intended name. The URL in the download link is:

https://www.opagust.be/?q=system/files/NWCCONVERTOR-1.0.2-amd64.msi

However, I think that if you change the URL to:

https://www.opagust.be/system/files/NWCCONVERTOR-1.0.2-amd64.msi

Then the file will be saved with the original name (although Windows might warn you that it's not a frequently downloaded file, and make you choose "Keep anyway")


Re: NWCCONVERTOR

Reply #26
A separate reply about the download. A number of people (including myself) have observed/complained that when they download the file, it gets the filename "download" rather than the intended name. The URL in the download link is:

https://www.opagust.be/?q=system/files/NWCCONVERTOR-1.0.2-amd64.msi

However, I think that if you change the URL to:

https://www.opagust.be/system/files/NWCCONVERTOR-1.0.2-amd64.msi

Then the file will be saved with the original name (although Windows might warn you that it's not a frequently downloaded file, and make you choose "Keep anyway")
Thanks, Mike

The download link is automatically generated by the website CMS(Drupal), when I upload a file.
I see two solutions:
1) I hide the original field where I download the file and add a field with the modified URL. Unfortunately, I can't modify the structure of exsting download pages. So I'l have to create a new sctucture and copy the existing pages.
OR:
2) Mention the changed URL in the forum topic

For now I go for the second solution.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #27
I'm confused here by the time notation. Is Flurmy saying 23 minutes and 12 seconds, or 23 hours and 12 minutes? And are the rest of you saying 8 minutes or 8 seconds?
I generally would use : notation, but I realize that can be ambiguous also, unless you specify all 3 numbers.
It's ambiguous if you use the : notation with just two items.

In Italian we have "minuti primi" (from the Latin "pars minuta prima", meaning "first small part") e "minuti secondi" (Latin: "pars minuta secunda",  "second small part"). This is where the names "minuto" and "secondo" comes from.
So the "minuti primi" are indicated with <'>, and "minuti secondi" with <">.
Hence 23'12" means 23 primi and 12 secondi.

Re: NWCCONVERTOR

Reply #28
Tonight is much better: something less than a minute.

Re: NWCCONVERTOR

Reply #29
I'm beginning to despair that NWC will ever have the ability to import and export MusicXML files like most modern notation programs. Sigh...

Re: NWCCONVERTOR

Reply #30
Tried it (needed a MusicXML for a colleague with another program).

1. A bug? In the resulting MusicXML, when opened with Musescore, the barlines of 1st and 2nd stave are connected; but not in the NWCTXT. Also a test conversion with https://nwc2musicxml.appspot.com/ does not connect them.

2. Eighths are not beamed in NWCTXT, but are beamed in the result (also with https://nwc2musicxml.appspot.com/). Would it be possible to suppress auto-beaming in Musescore via some info in the MusicXML?

H.M.

Re: NWCCONVERTOR

Reply #31
Tried it (needed a MusicXML for a colleague with another program).

1. A bug? In the resulting MusicXML, when opened with Musescore, the barlines of 1st and 2nd stave are connected; but not in the NWCTXT. Also a test conversion with https://nwc2musicxml.appspot.com/ does not connect them.

2. Eighths are not beamed in NWCTXT, but are beamed in the result (also with https://nwc2musicxml.appspot.com/). Would it be possible to suppress auto-beaming in Musescore via some info in the MusicXML?

H.M.
About 1.:  Apparently Musescore connects barlines for staves with orchestral brackets. In nwcconvertor I set group-barline to 'yes' if the bars are to be connected, but do nothing for non connected bars. So in the next version I will always create a group-barline tag, with either "yes" or "no" as value. (Remark: appspot seems to ignore the orchestral brackets).

About 2.: I can't find anything in the musicxml documentation about suppressing automatic beams. I don't know if this can be disabled in Musescore.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #32
A separate reply about the download. A number of people (including myself) have observed/complained that when they download the file, it gets the filename "download" rather than the intended name. The URL in the download link is:

https://www.opagust.be/?q=system/files/NWCCONVERTOR-1.0.2-amd64.msi

However, I think that if you change the URL to:

https://www.opagust.be/system/files/NWCCONVERTOR-1.0.2-amd64.msi

Then the file will be saved with the original name (although Windows might warn you that it's not a frequently downloaded file, and make you choose "Keep anyway")

I managed to change the URL's for the downloads.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #33
WARNING:
Some bugs in the processing of the option window:
In the frames 'open output file with':
- you can choose a value via one of the combo boxes, but that has no effect;
- the regions left of the 'Browse' button is editable; this can cause a fatal error if it's changed to an invalid file name.

SO: changing via the 'Browse' button is the only valid and working way.

This will be fixed in the next version.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #34
About 2.: I can't find anything in the musicxml documentation about suppressing automatic beams. I don't know if this can be disabled in Musescore.
According to this and this, it seems that (always?!) adding <supports element="beam" type="yes"/> could do the trick.

H.M.

Re: NWCCONVERTOR

Reply #35
According to this and this, it seems that (always?!) adding <supports element="beam" type="yes"/> could do the trick.

H.M.

Thanks, Heinrich!
Indeed that does the trick.
It will be included in the next version (comming soon!)
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #36
Version 1.03 is available in https://www.opagust.be/content/nwcconvertor.

    - Connection of bar lines: always create group-barline tag, with 'yes' or 'no' as value.
    - Correction in the processing of fields concerning 'open output with' in the option window.
    - Adding <supports element="beam" type="yes"/> in the musicxml file to suppress automatic beaming in Musescore.
    - Bug fix in processing after unchecking a part in the setup window of xml to nwc conversion;
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #37
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.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #38
Version 1.04 is available on athttps://www.opagust.be/content/nwcconvertor.

    - Adding a checkbox 'Convert custom velocities for dynamics' in hte option window.
    - Converting user object 'BarLabel.ms' as text'.
    - When the nwc score has the option BarLabels set to 'All Systems', and a staff has no abbreviation set.
        the bar label will be used as abbreviation.
    - Dealing with (invisible) tab characters in lyrics.
Always look on the bright side of life!


Re: NWCCONVERTOR

Reply #40
Version 1.0.5 is available on at https://www.opagust.be/content/nwcconvertor.

    - Correcting a typo (that caused an error for @HMM)
    - Adding code for processing time-modification/normal-type and normal-dots
    - Correcting processing of wedges in parts with different voices
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #41
Bach worked! - but here is my next problem :( ... attached below as a ZIP. It says KeyError: ('P4', 2, '1') ...

H.M.

Re: NWCCONVERTOR

Reply #42
A new version (1.0.5.1) which corrected a bug (for staff where first voice number > '1'), is available inhttps://www.opagust.be/content/nwcconvertor

Remark:
After I installed a new Python version (the programming language), the package for creating a windows installer was depreciated. So I had to use another package, that creates an executable of nwcconvertor itself.
After unzipping the download file, you can directly run it (I hope, it did for me :) )
And if you want a desktop shortcut, you will have to create it yourself.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #43
Thank you! - works!

What is a little strange: In m.6, in the S./A. staff, there is a "hidden? eighth rest" - MuseScore shows it in light grey. This pause is not converted into the nwctxt file, so that from there on, all the bar lines are shifted by one eighth. Could such "grey"/"hidden?" rests also be converted?

H.M.

Re: NWCCONVERTOR

Reply #44
Thank you! - works!

What is a little strange: In m.6, in the S./A. staff, there is a "hidden? eighth rest" - MuseScore shows it in light grey. This pause is not converted into the nwctxt file, so that from there on, all the bar lines are shifted by one eighth. Could such "grey"/"hidden?" rests also be converted?

H.M.

Yes, I noticed it too.
In my program, invisible rests are created, when a part has more than 1 staff/voice and the summed duration of the notes/rests of a
following staff/voice < the duration in the first.
But in this case, it's a single staff/single voice part and in measure six, there's really missing a  8th duration, acccording to the time signature. See this snippet from the input file:
Code: [Select · Download]
    <measure number="6" width="185">
      <note default-x="17">
        <pitch>
          <step>B</step>
          <alter>-1</alter>
          <octave>4</octave>
        </pitch>
        <duration>12</duration>
        <voice>1</voice>
        <type>quarter</type>
        <dot/>
        <stem default-y="-55.5">down</stem>
        <lyric default-y="-84" number="1">
          <syllabic>single</syllabic>
          <text>hills,</text>
        </lyric>
      </note>
      <direction>
        <direction-type>
          <wedge spread="12" type="stop"/>
        </direction-type>
      </direction>
      <note default-x="85">
        <rest/>
        <duration>8</duration>
        <voice>1</voice>
        <type>quarter</type>
      </note>
    </measure>

So in that case, my program shows a red warning, as it does also when the duration should be > the time signature.
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #45
Ah - and the "grey" rest I see in MuseScore is added by that program, when it sees that a measure is not "full length" (because it is one of those typical "rigid measure-length" programs). Understood. Ok - then it is what it is. Thx.

H.M.

Re: NWCCONVERTOR

Reply #46
Quote
Attribute value not quoted in 'measure number = "1"'
What's wrong?

Then the only option is "exit", and when I click "exit" it's kidding me asking "You didn't convert the input file, do you really want to exit?".  :)

Re: NWCCONVERTOR

Reply #47
Attribute value not quoted in 'measure number = "1"'
What's wrong?

The error message is misleading: the attribute value is within quotes, but there's a space before the first quote, what caused the error.
In the syntax rules for xml I can't find that spaces round the equal sign are forbidden, so I have to change my program to admit that.
This change will be included in the next version (coming soon, in the mean while you can edit your input file, changing all ' = ' into '=').

Quote
Then the only option is "exit", and when I click "exit" it's kidding me asking "You didn't convert the input file, do you really want to exit?".  :)

I'll also skip that question after an error (no kidding!)
Always look on the bright side of life!

Re: NWCCONVERTOR

Reply #48
Thank you a lot!

Re: NWCCONVERTOR

Reply #49
Version 1.0.6 is available at https://www.opagust.be/content/nwcconvertor.
- 1.0.6:
    - admitting comment line(s) before DOCTYPE line.
    - admitting spaces around the = sign for an attribute
    - modifications to deal with multiple files in a compressed mxl file

Remark: When you process a compressed mxl file with multiple musicxml files, a popup window will appear with the names of these  files. All of them will be extracted and saved, but only the first (the 'rootfile') will be converted. You'll have to restart the program several times to convert the other extracted files.
Always look on the bright side of life!